From af352a0047dea037abdb05f1ca33c386bc9e3d47 Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Mon, 13 Jan 2025 16:57:34 +0000 Subject: [PATCH] chore(dskit): remove jager env mapping --- cmd/deep/main.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/cmd/deep/main.go b/cmd/deep/main.go index e8b1585..6a247cb 100644 --- a/cmd/deep/main.go +++ b/cmd/deep/main.go @@ -307,32 +307,6 @@ func installOpenTelemetryTracer(config *app.Config) (func(), error) { return shutdown, nil } -func migrateJaegerEnvironmentVariables() { - // jaeger-tracing-go: https://github.com/jaegertracing/jaeger-client-go#environment-variables - // opentelemetry-go: https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/jaeger#environment-variables - jaegerToOtel := map[string]string{ - "JAEGER_AGENT_HOST": "OTEL_EXPORTER_JAEGER_AGENT_HOST", - "JAEGER_AGENT_PORT": "OTEL_EXPORTER_JAEGER_AGENT_PORT", - "JAEGER_ENDPOINT": "OTEL_EXPORTER_JAEGER_ENDPOINT", - "JAEGER_USER": "OTEL_EXPORTER_JAEGER_USER", - "JAEGER_PASSWORD": "OTEL_EXPORTER_JAEGER_PASSWORD", - "JAEGER_TAGS": "OTEL_RESOURCE_ATTRIBUTES", - } - for jaegerKey, otelKey := range jaegerToOtel { - value, jaegerOk := os.LookupEnv(jaegerKey) - _, otelOk := os.LookupEnv(otelKey) - - if jaegerOk && !otelOk { - level.Warn(log.Logger).Log("msg", "migrating Jaeger environment variable, consider using native OpenTelemetry variables", "jaeger", jaegerKey, "otel", otelKey) - _ = os.Setenv(otelKey, value) - } - } - - if _, ok := os.LookupEnv("JAEGER_SAMPLER_TYPE"); ok { - level.Warn(log.Logger).Log("msg", "JAEGER_SAMPLER_TYPE is not supported with the OpenTelemetry tracer, no sampling will be performed") - } -} - type otelErrorHandlerFunc func(error) // Handle implements otel.ErrorHandler