You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to somehow set the TraceId attribute in existing spans?
I have noticed one of the OTTL examples shows how to update SpanId in existing spans. I tried to analogously set the TraceId, but the TraceId in the span object did not get updated. Curiously, the TraceId in the attached links object did get updated.
I see the documentation states that SpanContext objects are immutable. Is this the underlying reason, and is there any way around it?
Context: In my use case, I need to "inherit" traces from a service relying on the W3C traceparent header, but they also wrongly have rely on their OpenTelemetry TraceId so I need re-set it from the traceparent header.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Is it possible to somehow set the
TraceId
attribute in existing spans?I have noticed one of the OTTL examples shows how to update
SpanId
in existing spans. I tried to analogously set theTraceId
, but theTraceId
in the span object did not get updated. Curiously, theTraceId
in the attachedlinks
object did get updated.I see the documentation states that SpanContext objects are immutable. Is this the underlying reason, and is there any way around it?
Context: In my use case, I need to "inherit" traces from a service relying on the W3C
traceparent
header, but they also wrongly have rely on their OpenTelemetryTraceId
so I need re-set it from thetraceparent
header.Thank you
Beta Was this translation helpful? Give feedback.
All reactions