-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composite propagation doesn't work because the last propagator sets the span, potentially invalid, even if the previous one finds a valid span #2504
Labels
bug
Something isn't working
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Comments
github-actions
bot
added
the
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
label
Jan 23, 2024
@ecourreges-orange Yes, this is a valid issue. The proposal (third option) looks good, feel free to raise a PR for this. Thanks. |
marcalff
added
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
and removed
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
labels
Jan 24, 2024
ecourreges-orange
added a commit
to ecourreges-orange/opentelemetry-cpp
that referenced
this issue
Jan 25, 2024
… span with a default invalid span, which is especially useful when used with CompositePropagator (open-telemetry#2504) Change wrong string "current-span" in unit tests to proper trace:kSpan which is "active_span"
ecourreges-orange
added a commit
to ecourreges-orange/opentelemetry-cpp
that referenced
this issue
Jan 25, 2024
… active span with a default invalid span, which is especially useful when used with CompositePropagator (open-telemetry#2504) Change wrong string "current-span" in unit tests to proper trace:kSpan which is "active_span"
3 tasks
ecourreges-orange
added a commit
to ecourreges-orange/opentelemetry-cpp
that referenced
this issue
Jan 25, 2024
… active span with a default invalid span, which is especially useful when used with CompositePropagator (open-telemetry#2504) [TEST] Change wrong string "current-span" in unit tests to proper trace:kSpan which is "active_span"
ecourreges-orange
added a commit
to ecourreges-orange/opentelemetry-cpp
that referenced
this issue
Jan 25, 2024
… active span with a default invalid span, which is especially useful when used with CompositePropagator (open-telemetry#2504) [TEST] Change wrong string "current-span" in unit tests to proper trace:kSpan which is "active_span"
ecourreges-orange
added a commit
to ecourreges-orange/opentelemetry-cpp
that referenced
this issue
Jan 25, 2024
… active span with a default invalid span, which is especially useful when used with CompositePropagator (open-telemetry#2504) [TEST] Change wrong string "current-span" in unit tests to proper trace:kSpan which is "active_span"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Describe your environment
v1.13.0 using bazel
Steps to reproduce
Remove this line from the unit test:
opentelemetry-cpp/api/test/context/propagation/composite_propagator_test.cc
Line 80 in a232328
And you will see that the resulting traceId is 0000000..., whereas it should be the one from the valid traceparent header line 79.
What is the expected behavior?
The composite propagator should only set the active_span in the context to a valid one
What is the actual behavior?
The composite propagator sets the active_span at each propagator in its list, whatever the outcome, so the last one always wins, even if invalid.
You can see here:
opentelemetry-cpp/api/include/opentelemetry/trace/propagation/b3_propagator.h
Line 54 in a232328
and here:
opentelemetry-cpp/api/include/opentelemetry/trace/propagation/http_trace_context.h
Line 57 in a232328
Additional context
I see 3 ways of fixing it.
return trace::SetSpan(context, sp);
with these:If you agree, I will post a PR with that.
The text was updated successfully, but these errors were encountered: