Skip to content

feat: w3c fields - #646

Merged
maxday merged 3 commits into
mainfrom
maxday/w3c
Oct 7, 2026
Merged

maxday merged 3 commits into
mainfrom
maxday/w3c

Conversation

@maxday

@maxday maxday commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Description of changes:

Add LambdaContext.W3C() for W3C trace-context propagation.

Surfaces the W3C trace-context fields that Lambda carries on clientContext.w3c through a new LambdaContext.W3C() accessor, matching the behavior shipped in the Python (aws-lambda-python-runtime-interface-client#228) and Node.js (aws-lambda-nodejs-runtime-interface-client#201) runtime interface clients.

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

@codecov-commenter

codecov-commenter commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.90476% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.04%. Comparing base (3fa202a) to head (fb9d6ac).

Files with missing lines Patch % Lines
test/dockerized/tasks/main.go 0.00% 23 Missing ⚠️
lambda/invoke_loop.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #646      +/-   ##
==========================================
- Coverage   82.99%   82.04%   -0.96%     
==========================================
  Files          36       37       +1     
  Lines        1429     1487      +58     
==========================================
+ Hits         1186     1220      +34     
- Misses        240      264      +24     
  Partials        3        3              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maxday
maxday marked this pull request as ready for review October 7, 2026 10:02
Comment thread lambdacontext/context.go Outdated
// surfaced through LambdaContext.W3C(). Any other key carried on
// clientContext.w3c is ignored, and any allowlisted key whose value is not a
// JSON string is dropped.
var W3CAllowedFields = []string{"traceparent", "tracestate", "baggage"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we make this immutable?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes! done, thanks

@maxday
maxday requested a review from M-Elsaeed October 7, 2026 10:43
@maxday
maxday merged commit 4111853 into main Oct 7, 2026
14 checks passed
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.

4 participants