Skip to content

DSC: sample_rate is not set when sample decision is forced #5690

Closed

Description

@Lms24

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:

// 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

Activity

  1. added this to the Dynamic Sampling milestone on Sep 2, 2022
  2. self-assigned this
    on Sep 2, 2022
  3. added a commit that references this issue on Sep 2, 2022
    f13fed6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions