Skip to content

Commit

Permalink
chore(dskit): remove jager env mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Umaaz committed Jan 13, 2025
1 parent 870682b commit af352a0
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions cmd/deep/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af352a0

Please sign in to comment.