-
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
OTEL_ZIPKIN_ENDPOINT not supported in Zipkin exporter #4926
Comments
Unfortunately, the documentation is out of date. The env vars are only supported via the autoconfiguration module. The docs should be updated to reflect that. |
Is there a working example with Spring Boot 3? Now I have
in the My docker environment is
|
How are you initializing your OpenTelemetry instance? If you want autoconfigure, you'll need to use the autoconfigure classes to initialize it. |
FYI, docs on autoconfigure are available here. |
@giraone Please provide some additional information about your setup, specifically around how you are initializing your OpenTelemetry instance. This autoconfigure example might also be of some use to you. But really, it sounds like you were expecting to just wire up a dependency in maven and have telemetry pop out. That's not really how this works. I know it can be confusing because of "auto" in the name...but "auto" here is referring to configuration. It explicitly does NOT include any auto instrumentation. If I had to guess, I think you might be better off using the java agent (opentelemetry-java-instrumentation), which includes out-of-the-box support for autoconfiguration and includes all the auto-instrumentation as well. |
In the meanwhile, the setup basically works. Traces are correctly exported via OpenTelemetrySdk openTelemetrySdk = AutoConfiguredOpenTelemetrySdk.initialize()
.getOpenTelemetrySdk(); What is not working is propagation of trace ids from client to server. Within one process the spans are correct, but they are not propagated in client-server REST calls. But I have no clue, whether this is a Spring, Micrometer or OpenTelemetry bug or missconfiguration of my setup. The complete code is here: https://github.com/giraone/spring-boot3-demo |
You'll need to make sure you have configured compatible trace propagators on both the client and server for propagation to work correctly. |
Client and Server share the the same code base. They also share the OTEL_PROPAGATORS environment variable. I have used "tracecontext,baggage", "b3", "b3multi" and all 4 together without any success. |
Have you debugged to see what's happening when the propagators are supposed to be extracting the context to put on the wire and take it off the wire on the server side? Have you examined the requests to see if any tracing headers are present? |
Describe the bug
The documentation states, that one can set the OTEL_ZIPKIN_ENDPOINT environment variable, but
When I set the environment variable, I always get
when the receiving service run on a different host. Also vice versa, when I set OTEL_ZIPKIN_ENDPOINT="http://unknown:9411/api/v2/spans", tracing works.
For me it looks like it uses always the localhost default endpoint.
Steps to reproduce
Use
in a Spring Boot 3 Service and set OTEL_ZIPKIN_ENDPOINT.
Then call an endpoint of the app.
Environment
Compiler: openjdk 17.0.4
OS: Ubuntu 20.04
io.opentelemetry:opentelemetry-exporter-zipkin:jar:1.19.0
The text was updated successfully, but these errors were encountered: