setTag not working with OpenTracingShim #4980
Unanswered
mattspataro
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Can you provide some details about how you're configuring the SDK? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're in the process of migrating our codebase from OpenTracing to OpenTelemetry. We're planning on using the OpenTracingShim to ease the transition. However, we're having issues with setting tags during manual instrumentation. Our legacy OpenTracing code will frequently build a span like this:
The tags that are added with
withTag
seem to be added correctly. However, if we try to add tags after a span has been started, then the tags don't seem to stick:span.setTag("http.response.contentLength", httpResponseContentLength)
It appears like the span that is returned is a
SpanShim
, and the span within theSpanShim
is aio.opentelemetry.api.trace.PropagatedSpan
. ThePropagatedSpan
defined noops for nearly every Span operation (includingsetTag
), which obviously means that no tags are being added. Is there a way to avoid this? What do I need to do so that I can set spans after they have been started?Any help would be appreciated! Thank you!
Beta Was this translation helpful? Give feedback.
All reactions