feat: introducing w3c tracing headers propagation#8147
Closed
darklight3it wants to merge 1 commit into
Closed
Conversation
darklight3it
force-pushed
the
feat/support-propagation-of-w3c-headers
branch
from
July 2, 2026 21:23
5f22f9f to
8682fc1
Compare
8 tasks
Contributor
|
moved to #8156 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
N/A — W3C trace context propagation
Description
Adds a build-step middleware that propagates W3C trace context headers (
traceparent,tracestate,baggage) from the LambdaInvokeStoreonto outbound AWS SDK requests.Why: When a Lambda function receives a request with trace context, downstream calls made via the AWS SDK should carry that context forward. This enables distributed tracing across service boundaries on the AWS SDK.
How it works:
@aws/lambda-invoke-store(which the Lambda runtime populates per-invocation from inbound headers)traceparentis present and the outgoing request doesn't already have one, it injectstraceparent,tracestate, andbaggageheadersDesign decisions:
getTraceContextPropagationPlugin) — not auto-added to generated clients.traceparentis the gate:tracestateandbaggageare only propagated whentraceparentis present (per W3C spec).InvokeStore.getInstanceAsync()is memoized at module level — subsequent calls on the hot path just await a resolved promise.Testing
requireRequestsFrom(no network calls)Checklist
*.integ.spec.ts) or E2E tests.@public,@internaltags and enabled doc generation on the package. Remember that access level annotations go below the description, not above.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.