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
parent_context=OpenTelemetry.propagation.text.extract({traceparent: ...,baggage: my_baggage})OpenTelemetry::Context.with_current(parent_context)dotracer.in_span("test",attributes: attributes,kind: :consumer)doputsOpenTelemetry.baggage.valuesendend#prints the content of my_baggage
The first keeps the current context active while use the parent span_context data, while the second replaces the current context, yet use the parent span_context data (from the replaced context).
The issue starts with the fact that baggage is not a part of span_context, so for proper propagation of baggage data - we must use the second approach.
The text was updated successfully, but these errors were encountered:
This difference seems really unfortunate. Are we correctly implementing the spec here in tracer.in_span(..., with_parent: ...)? If not, we should fix that. If we are, I wonder if this difference in behaviour should be raised as a spec issue?
AFAIK most instrumentation uses the second approach, so in my perspective - if it's not an issue, I can align the implementation of ruby_kafka with the rest.
regarding the specs - the baggage is not a part of the span_context, which I found it bit weird, but yet confirms that we are aligned with the specs
currently, there is a different logic between:
and
The first keeps the current context active while use the parent span_context data, while the second replaces the current context, yet use the parent span_context data (from the replaced context).
The issue starts with the fact that baggage is not a part of span_context, so for proper propagation of baggage data - we must use the second approach.
The text was updated successfully, but these errors were encountered: