Skip to content
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

Fix XrayPropagator when no header is present #867

Merged
merged 1 commit into from Aug 27, 2022

Conversation

khalsah
Copy link
Contributor

@khalsah khalsah commented Aug 25, 2022

This corrects an issue where using XrayPropagator without the x-amzn-trace-id trace header present would cause spans not to get logged/processed.

Background

My use case is in a project that combines tracing, tracing-opentelemetry, opentelemetry, and opentelemetry-jaeger.

I initially had everything working, but when I added the XrayPropagator I noticed that my spans were no longer appearing in jaeger when I made requests directly to my service. I then switched to TraceContextPropagator and everything worked again.

This change simply copies the logic used in TraceContextPropagator into XrayPropagator.

I tested it in my local project and confirmed that with this change traces without a parent are still appearing in jaeger.

@khalsah khalsah requested a review from a team as a code owner August 25, 2022 00:45
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 25, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: khalsah / name: Hargo Khalsa (db0b14f)

@codecov
Copy link

codecov bot commented Aug 25, 2022

Codecov Report

Merging #867 (db0b14f) into main (c92a1ad) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main    #867     +/-   ##
=======================================
- Coverage   66.6%   66.6%   -0.1%     
=======================================
  Files        113     113             
  Lines       8727    8727             
=======================================
- Hits        5820    5813      -7     
- Misses      2907    2914      +7     
Impacted Files Coverage Δ
opentelemetry-aws/src/lib.rs 89.8% <100.0%> (ø)
opentelemetry-api/src/context.rs 82.9% <0.0%> (-6.0%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@TommyCpp TommyCpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Good catch

@TommyCpp
Copy link
Contributor

MSRV is probably not related. We will bump to 1.56 before release.

@TommyCpp TommyCpp merged commit 043e4b7 into open-telemetry:main Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants