Conditionally trace transactions #8316
hansott
started this conversation in
Features / New SDKs (Integrations) / Ideas
Replies: 2 comments 6 replies
|
Hey, you could do |
0 replies
|
Hey @lforst, I tried this but it doesn't work. I still see transactions with |
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi Sentry, we have a process that checks for pending work. If there's pending work, we do the work:
We don't know upfront whether there's going to be any work. If there's no work, we don't want to sample the transaction for analysis. It's just too much noise (or maybe a lower rate versus transactions with actual work).
We tried to set tags conditionally (based on whether there was work or not):
In
tracesSampler, it would be nice to receive the tags in thecontextobject but it seems that this is not the case?Next, we tried to use
transaction.setName()since the name is passed incontext.transactionContextbut it seems that thetracesSamplerfunction is called at the start of a transaction?TL;DR: Be able to conditionally trace transaction based on what happened within the transaction (either by using Tags or changing the name of the transaction)
All reactions