Conditionally trace transactions #8316
hansott
started this conversation in
Features / New SDKs (Integrations) / Ideas
Replies: 2 comments 6 replies
-
Hey, you could do |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey @lforst, I tried this but it doesn't work. I still see transactions with |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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 thecontext
object but it seems that this is not the case?Next, we tried to use
transaction.setName()
since the name is passed incontext.transactionContext
but it seems that thetracesSampler
function 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)
Beta Was this translation helpful? Give feedback.
All reactions