Skip to content
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

feat(propagator-aws-xray): support lineage in xray trace header #2679

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ezhang6811
Copy link

@ezhang6811 ezhang6811 commented Jan 24, 2025

Which problem is this PR solving?

  • Current XRay Propagator does not support Lineage attribute for Lambda invocations, which the other OpenTelemetry language SDK's do so using baggage. see this Java PR for similar solution.
  • We are waiting for confirmation from Lambda team to merge this change across all language SDKs. Review would be appreciated in the meantime.

Short description of the changes

  • Include Lambda lineage attribute in X-Ray trace header.
  • Changed getSpanContextFromHeader to getContextFromHeader in the extract() method, since we must return an updated context with a new baggage object if the lineage exists.

@ezhang6811 ezhang6811 requested a review from a team as a code owner January 24, 2025 23:12
@github-actions github-actions bot requested a review from jj22ee January 24, 2025 23:12
@ezhang6811 ezhang6811 changed the title feat(propagator-x feat(propagator-aws-xray): support lineage in xray trace header Jan 24, 2025
@ezhang6811 ezhang6811 marked this pull request as draft January 28, 2025 20:03
}

fields(): string[] {
return [AWSXRAY_TRACE_ID_HEADER];
}

private getSpanContextFromHeader(
Copy link
Contributor

Choose a reason for hiding this comment

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

Logic overall lgtm.

getContextFromHeader is probably not an accurate method name anymore after these changes.
Since all the extract logic is now here, I think it might make sense to just move all this up into the extract method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants