-
Hello, We are using java automatic instrumentation in some Java SpringBoot microservices. We have also adopted the "W3C Trace Context" strategy for Context propagation. We would return some context info (like the traceid) into the Response Headers. Is there a way to access to these params, in a standard way, through the OpenTelemetry SDK? Of course, we could simply read the headers by their key name (ex.: traceparent) but, in my opinion, this will introduce a strong coupling with the "W3C Trace context" strategy, which we would avoid if possible. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Hi @jkwatson,
Thank you. |
Beta Was this translation helpful? Give feedback.
Span.current().getSpanContext()
should give you what you need, I think.