-
Notifications
You must be signed in to change notification settings - Fork 304
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
Added changes to AWSXRayPropagator #2359
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2359 +/- ##
===========================================
+ Coverage 73.91% 86.39% +12.48%
===========================================
Files 267 34 -233
Lines 9615 897 -8718
===========================================
- Hits 7107 775 -6332
+ Misses 2508 122 -2386
Flags with carried forward coverage won't be shown. Click here to find out more.
|
82b6a23
to
85931f7
Compare
Please double check if it does not require changelog entry. Based on the answer, it can be merged as is. |
Yes it doesn't require any changelog entry so can be merged as is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving/merging based on @ppittle review.
Changes
While doing some auto instrumentation testing, we found that adding the AWSXRayPropagator and AWS SDK instrumentation causes a conflict with the propagated
X-Amzn-Trace-Id
. This is a header that is used to propagate X-Ray trace context for trace linking. Lets assume we have an application that makes a call to AWS S3. There will be 2 activities in this case, the S3 activity created by the instrumentationAmazon.AWS.AWSClientInstrumentation
and then aSystem.Net.Http.HttpRequestOut
activity which is an http call tos3.amazonaws.com
. The issue here is that when the httpRequest is created, the AWS SDK injects the traceHeader where the traceId and parent id is set to theAmazon.AWS.AWSClientInstrumentation
S3 activity. However, sinceSystem.Net.Http.HttpRequestOut
is the last outgoing call, the propagator injects the traceHeader fromHttpRequestOut
, basically overwriting the previous context.To overcome this, a change is made is made so that If X-Amzn-Trace-Id already exists in the headers and the carrier is of HttpRequestMessage, This means that the request is coming from the AWS SDK Instrumentation library and in this case, we don't want to overwrite the propagation context from the AWS SDK Span with the context from the outgoing HttpRequestOut.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes