Skip to content

feat(context): add w3c() helper for W3C trace fields - #657

Open
maxday wants to merge 4 commits into
mainfrom
maxday/w3c
Open

maxday wants to merge 4 commits into
mainfrom
maxday/w3c

Conversation

@maxday

@maxday maxday commented Oct 6, 2026

Copy link
Copy Markdown
Member

Adds Context.w3c() which exposes allowlisted W3C trace-context fields (traceparent, tracestate, baggage) carried on clientContext.w3c, and strips w3c from clientContext so callers can only read trace fields through the helper.

  • aws-lambda-java-core: new default Context.w3c() returning an empty map (backward compatible for existing Context implementations).
  • RIC: LambdaContext reads/allowlists/strips w3c off the client context at construction and returns an unmodifiable map; non-object payloads and non-string values are dropped.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.79%. Comparing base (e38423d) to head (c6aafd0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #657      +/-   ##
============================================
+ Coverage     66.03%   66.79%   +0.76%     
- Complexity      214      223       +9     
============================================
  Files            35       35              
  Lines           998     1018      +20     
  Branches        143      146       +3     
============================================
+ Hits            659      680      +21     
+ Misses          287      286       -1     
  Partials         52       52              
Flag Coverage Δ
aarch64 66.79% <100.00%> (+0.76%) ⬆️
x86_64 66.40% <100.00%> (+0.77%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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 08:50

This branch has not been deployed

No deployments
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