-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for Lambda lineage in X-Ray trace header #2480
Closed
ezhang6811
wants to merge
9
commits into
open-telemetry:main
from
ezhang6811:zhaez/lineage-trace-propagation
Closed
Added support for Lambda lineage in X-Ray trace header #2480
ezhang6811
wants to merge
9
commits into
open-telemetry:main
from
ezhang6811:zhaez/lineage-trace-propagation
Conversation
This file contains 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
0e04e72
to
84abfca
Compare
@AsakerMohd - given your familiarity with the code, can you also review? |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
2a0ea1d
to
7ae6dfe
Compare
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
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.
Update: will hold off on merging this PR until we have confirmed with Lambda that they are ready for this change in all of the OTel language SDKs. Please still provide review in the meantime.
Changes
For Lambda invocations, OpenTelemetry language SDK's are expected to support Lambda Lineage in the X-Ray trace header via W3C baggage. See this Java PR for similar solution in Java.
This PR updates X-Ray Propagator to extract Lineage attribute from X-Ray trace header and add it to baggage in context, as well as inject Lineage from baggage into trace header if it exists. Updated unit tests to verify Lineage is validated and propagated as expected.
There is currently little to no public documentation on the new V2 lineage header, though it has already been utilized for Lambda invocations for a few months. The existing available documentation tends to reference the V1 lineage format, which looks something like
Lineage=a87bd80c:1|68fd508a:5|c512fbe3:2
in the X-Ray trace header. This format tracks up to 16 resource IDs with their respective counters to detect recursive Lambda calls, causing size issues with trace header storage in the past. The V2 Lineage follows the format<Counter><HashedString><Counter>
, i.e.Lineage=200:e65a2c4d:11
. The updated algorithm only tracks a single resource, preventing the header from ever exceeding 18 characters. We've confirmed via E2E tests that this is the Lineage format actively used for Lambda calls.Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes