-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Milestone
Description
Problem Statement
When starting a transaction, users can force a sample decision by settingtransaction.sampled
to true or false. We don't set the sample rate in the transaction metadata in this case:
sentry-javascript/packages/tracing/src/hubextensions.ts
Lines 55 to 64 in 70883aa
// if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that | |
if (transaction.sampled !== undefined) { | |
transaction.setMetadata({ | |
transactionSampling: { method: 'explicitly_set' }, | |
}); | |
return transaction; | |
} | |
// we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should | |
// work; prefer the hook if so |
Metadata
Metadata
Assignees
Labels
No labels