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(serverlesss): allow disabling transaction traces #9154

Merged
merged 2 commits into from Oct 12, 2023

Conversation

aldenquimby
Copy link
Contributor

@aldenquimby aldenquimby commented Oct 2, 2023

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

Background

  • My team runs Express inside Lambda - we have a monolithic Lambda function with express handling routing, middleware, etc
  • We are using @sentry/node today, and tried adding @sentry/serverless for it's timeout warning, auto-handling of flush, and links to cloudwatch logs
  • But this caused all of our performance transaction traces to have an incorrect name (and various other tag + context issues)

Proposal

  • A new startTransaction boolean flag that turns on/off the transaction tracing feature of @sentry/serverless
  • This will allow our team to use @sentry/serverless, but still rely on express tracingHandler for performance traces
  • This also follows the general approach of the serverless package, where each feature is gated by a wrapOptions flag

Alternatives

  • We tried various ways to have the express transaction name override the Lambda one, but couldn't get that working
  • If there is a way to do that without needing a PR like this, that would be great!

For reviewers

  • I'd recommend hiding whitespace when reviewing

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Thanks a lot @aldenquimby - appreciate the PR!

Release either comes out tomorrow or on Monday - let's see how CI feels 😭

@AbhiPrasad AbhiPrasad merged commit 28b6d75 into getsentry:develop Oct 12, 2023
32 checks passed
@AbhiPrasad
Copy link
Member

@aldenquimby aldenquimby deleted the lambda-disable-transaction branch October 25, 2023 16:37
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