Replies: 2 comments
-
hi @danichkac, https://opentelemetry.io/docs/zero-code/java/agent/getting-started/ is generally the easiest way to get started with Java. You would want to add the Java agent to each service. |
Beta Was this translation helpful? Give feedback.
-
Span data is linked together across a distributed system using context propagation. Each service creates and exports its own spans. When a service calls another service, it propagates the current span context, typically as HTTP headers using the W3C trace context propagation specification.
Each service needs to configure its own instance of the OpenTelemetrySdk. After all, there's no way to share object instances across application boundaries in a distributed system.
This question has a nuanced answer. See the GlobalOpenTelemetry javadoc for details. |
Beta Was this translation helpful? Give feedback.
-
Hi, so I'm trying to implement opentelemetry across multiple microservices in both java and python. I've looked into it and I'm quite confused in how it is supposed to get the data across all of them. Should I be initiating it with OpenTelemetrySdk in only one service and then use opentelemetry.api in all the other java services? Also, should GlobalOpenTelemetry be used, because in the documentation it says it is not recommended, so it kind of defeats the purpose of being able to access the same instance across all of the services.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions