Skip to content

feat: add w3c headers#46

Open
darklight3it wants to merge 4 commits into
awslabs:mainfrom
darklight3it:feat/add-w3c-headers
Open

feat: add w3c headers#46
darklight3it wants to merge 4 commits into
awslabs:mainfrom
darklight3it:feat/add-w3c-headers

Conversation

@darklight3it

@darklight3it darklight3it commented Jun 25, 2026

Copy link
Copy Markdown

Description of changes:

Add W3C distributed tracing support to aws-lambda-invoke-store. This introduces three new protected context fields and their corresponding read-only accessors:

These fields follow the same immutability contract as the existing REQUEST_ID and X_RAY_TRACE_ID keys: they are set once via run() and cannot be modified by user code afterwards.

Testing:

  • Added unit tests covering getter behavior, undefined-when-absent, and write-protection for all three new fields (both single and multi-concurrency modes).

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

@darklight3it darklight3it marked this pull request as ready for review June 25, 2026 12:43
@darklight3it darklight3it requested a review from a team as a code owner June 25, 2026 12:43
@kuhe

kuhe commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

this repo is using changesets, I thought? PR might need a changeset file

@trivikr

trivikr commented Jun 25, 2026

Copy link
Copy Markdown
Member

The changeset bot was removed from the repo for some reason.
It did post message in March in https://www.github.com/awslabs/aws-lambda-invoke-store/pull/34#issuecomment-4038958816 for example.

I've enabled it as of now. I'll request rebase to check if it runs.


UPDATE: Changeset bot was run on rebase and posted comment below

…aceparent, getTracestate, and getBaggage methods covering the happy path, undefined when absent, and protection against modification of the new protected keys.
@trivikr trivikr force-pushed the feat/add-w3c-headers branch from 6e85292 to e6024e5 Compare June 25, 2026 16:49
@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a7c6e9d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws/lambda-invoke-store Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@trivikr trivikr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This needs a changeset file. This should be a minor bump since new APIs are being added.

… documentation for getTraceparent, getTracestate, and getBaggage. Update the global singleton spec to verify w3c fields are accessible through the existing instance mock pattern.
@darklight3it

Copy link
Copy Markdown
Author

@trivikr

This needs a changeset file. This should be a minor bump since new APIs are being added.

Added the changeset and some more tests.

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.

3 participants