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

Allow parenting with the AWS Lambda span itself. #1323

Merged
merged 5 commits into from
Oct 7, 2020

Conversation

anuraaga
Copy link
Contributor

@anuraaga anuraaga commented Oct 5, 2020

AWS Lambda sets an environment variable with a trace header.

For HTTP requests, this is the header for a span which links back to an original HTTP request, for example from API gateway. For X-Ray users, parenting to this will connect back to the client through intermediate spans exported to X-Ray, while showing lambda processing in between. For non-X-ray users, these intermediate spans won't exist and thus the parent must be the client span itself, not the lambda span so the lambda span needs to be ignored.

For SQS requests, this is the header for a span which is a local root for message processing. It never hurts to parent to this, and links will be added which can be used by other tracing backends without problem.

While I considered adding a special configuration for whether to do this parenting or not, it seems that just configuring the propagator works fine so I documented that behavior instead. It means that if a user isn't using X-ray as a backend but wants to use X-Ray trace propagation format for their HTTP requests, it's not supported - I don't think such a user exists in practice though. Let me know if you have any thoughts.

Anuraag Agrawal added 2 commits October 6, 2020 10:44
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

It means that if a user isn't using X-ray as a backend but wants to use X-Ray trace propagation format for their HTTP requests, it's not supported - I don't think such a user exists in practice though

Makes sense to me. Thanks for the detailed explanations.

@anuraaga anuraaga merged commit 46b0408 into open-telemetry:master Oct 7, 2020
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.

None yet

2 participants