-
Notifications
You must be signed in to change notification settings - Fork 858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"service.name" not picked up by Jaeger exporter #5944
Comments
This should not be the case and I'm unable to reproduce this behavior myself. Can you create a small sample app reproducing the behavior? |
I know it shouldn't be the case. All of the other variables are being set properly from the environment. I have tried to set the service name via the OTEL_SERVICE_NAME, as well as with OTEL_RESOURCE_ATTRIBUTES, as well as setting System.setProperty("otel.service.name")... No matter what I do, the jaeger traces just say "unknown_service:java" Mainly I'm just wondering if there is something I'm not seeing. I've been scouring the github repository for like 2 days, and everything I see leads me to think this should be working. Env variables set in the image: export OTEL_TRACES_EXPORTER="jaeger"
export OTEL_EXPORTER_JAEGER_ENDPOINT="http://jaeger-collector.jaeger:14250"
export OTEL_PROPAGATORS="jaeger"
export OTEL_TRACES_SAMPLER="parentbased_traceidratio"
export OTEL_TRACES_SAMPLER_ARG="1"
export OTEL_METRICS_EXPORTER="none"
export OTEL_LOGS_EXPORTER="none"
export OTEL_SERVICE_NAME="my-service"
export OTEL_RESOURCE_ATTRIBUTES="service.name=my-service" In the code: try {
otelsdk = AutoConfiguredOpenTelemetrySdk
.initialize()
.getOpenTelemetrySdk()
tracer = otelsdk.getTracer("my-tracer")
span = tracer.spanBuilder(s"my-span").startSpan()
} catch {
case e: Throwable => {
logError(s"failed to initialize open-telemetry: ${e.getMessage}")
throw e
}
} I then proceed to create custom spans, and they are properly exported... but for some ungodly reason, the "service.name" is not being recognized by the jaeger exporter. |
Can you try printing out the string representation of Should yield something like this, which tells which configuration is being picked up:
|
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
Describe the bug
What did you expect to see?
I expected the service.name to match what was set in the environment variable
What version and what artifacts are you using?
Version 1.31.0 for
The text was updated successfully, but these errors were encountered: