Skip to content

Conversation

@jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Dec 13, 2024

Issue #, if available:
Fixes the absence of broken X-Ray context propagation when the underlying HTTP instrumentation is suppressed or disabled.

Similarly to Java and Python, AWS SDK Js instrumentation itself should be able to inject the X-Ray Context into the HTTP Headers:

Note - If the underlying HTTP instrumentation is enabled, then the underlying HTTP Child Span of the AWS SDK Span will overwrite the Trace Context to propagate through headers.

Description of changes:

  • Move patched/extended instrumentations to an patches/extended-instrumentations/ directory
  • Created AwsSdkInstrumentationExtended class that extends upstream AwsInstrumentation to override its patching mechanism of the send method. The overridden method will additionally update the AWS SDK middleware stack to inject the X-Amzn-Trace-Id HTTP header.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Member

@mxiamxia mxiamxia left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@jj22ee jj22ee merged commit a9375ff into main Dec 16, 2024
9 checks passed
@jj22ee jj22ee deleted the aws-sdk-prop-fix3 branch December 16, 2024 22:08
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.

2 participants