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

fix(serverless): Handle incoming "sentry-trace" header #3261

Merged
merged 7 commits into from Feb 18, 2021

Conversation

ahmedetefy
Copy link
Contributor

In AWS Lambda and in GCP function, sentry-trace header was not propagated. This meant transactions were not given a parentTraceId, spanId, and parentSampled attributes

This PR:

  • Injects the sentry_trace headers in transactions created in wrapHandler for AWS and _wrapHttpFunction for GCP

Fixes #3238

@ahmedetefy ahmedetefy requested a review from a team February 16, 2021 12:48
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.27 KB (+0.01% 🔺)
@sentry/browser - Webpack 21.18 KB (0%)
@sentry/react - Webpack 21.2 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 27.36 KB (+0.01% 🔺)

Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

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

Other than the one fix below, looks good!

Oh, and I hope you don't mind, I'm going to change the title, since your changes are on the incoming end of things, rather than the outgoing end.

packages/serverless/test/gcpfunction.test.ts Outdated Show resolved Hide resolved
@lobsterkatie lobsterkatie changed the title fix(serverless): Propagate "sentry_trace" header fix(serverless): Handle incoming "sentry-trace" header Feb 17, 2021
@kamilogorek kamilogorek dismissed lobsterkatie’s stale review February 18, 2021 09:21

Appropriate changes have been made

@ahmedetefy ahmedetefy merged commit 44deaaf into master Feb 18, 2021
@ahmedetefy ahmedetefy deleted the propagate_trace_headers branch February 18, 2021 09:22
ahmedetefy added a commit that referenced this pull request Mar 10, 2021
* Applying sentry-trace in AWSLambdaIntegration transaction

* Propagate trace in AWSLambda functions

* Propagate trace handlers in GCP http functions

* Linting fix

* Linting fixes

* Removed redundant type
This was referenced Mar 14, 2021
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.

AWS Lambda - sentry-trace not being applied to context
3 participants