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

Update the DSC's sample-rate #117

Open
25 tasks
cleptric opened this issue Jan 14, 2025 · 0 comments
Open
25 tasks

Update the DSC's sample-rate #117

cleptric opened this issue Jan 14, 2025 · 0 comments

Comments

@cleptric
Copy link
Member

cleptric commented Jan 14, 2025

Description

As required by Relay and the EAP, the sample_rate in the DSC must specify the actual sample rate of the trace. If an SDK overrides the sample rate of an incoming trace, for example by invoking the tracesSampler, the new rate must be set on the DSC.
Note that usually the DSC is supposed to be immutable, which includes the sample rate, to ensure complete traces. Invoking the tracesSampler purposefully opts out of this and modifies the DSC.

Implementation

On an incoming trace, the DSC's sample_rate is updated if:

  • an explicit sampling decision is forced, e.g. startTransaction(sampled: true)
  • the tracesSampler is invoked
  • the tracesSampleRate is used

Stakeholder(s)

@jan-auer

Team(s)

Mobile, Web Backend, Web Frontend, GDX

SDKs

SDKs

Preview Give feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant