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

feat(dynamic-sampling): adapt docs to new dynamic sampling logic #11886

Merged
merged 17 commits into from
Nov 27, 2024

Conversation

shellmayr
Copy link
Member

@shellmayr shellmayr commented Nov 20, 2024

Update the documentation for dynamic sampling to reflect the new status quo:

  • Depending on the feature flag, dynamic sampling operates on transactions or spans
  • Instead of using transaction for the event description, we use events to encompass both transactions and spans.
  • Add a description of manual and automatic mode to set target sample rates

Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2024 10:03am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Nov 27, 2024 10:03am
sentry-docs ⬜️ Ignored (Inspect) Visit Preview Nov 27, 2024 10:03am

Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a place where you're planning to describe the newly introduced organization and project options? I also noticed that the biases don't describe how their behavior is different in the two modes. The most notable differences are:

  • Boost low volume projects is disabled in manual mode
  • Boost low volume transactions uses the sample rate from the project option
  • All other biases compute factors that are independent of the sample rate
  • Recalibration switches to project level


The latest release bias uses a decaying rule to interpolate between a starting sample rate and an ending sample rate over a time window that is statically defined for each platform (the list of time to adoptions is define [here](https://github.com/getsentry/sentry/blob/master/src/sentry/dynamic_sampling/rules/helpers/time_to_adoptions.py#L26-L26). For example, Android has a bigger time window than Javascript because on average Android apps take more time to get adopted by users.
In order to rebalance transactions, the system computes the counts of the transactions for each project and runs an algorithm that, given the sample rate of the organization and the counts of each transaction, computes a new sample rate for each transaction assuming an ideal distribution of the counts.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a recent conversation, you brought up that it is surprising how the algorithm tries to achieve an equal sample count for each "class" (as it is called in code). This could be considered an implementation detail, but I think it's worth writing this down as the desired behavior of the system at this time.

@shellmayr shellmayr marked this pull request as ready for review November 27, 2024 09:47
@shellmayr shellmayr merged commit e4cffea into master Nov 27, 2024
10 checks passed
@shellmayr shellmayr deleted the shellmayr/feat/update-ds-develop-docs branch November 27, 2024 10:41
martinhaintz pushed a commit that referenced this pull request Nov 27, 2024
…ierarchy

* master: (28 commits)
  feat(angular): Update SDK provider setup for Angular 19 (#11921)
  feat(dynamic-sampling): adapt docs to new dynamic sampling logic (#11886)
  update banner for post-launch week promotion (#11964)
  chore(android): Add masking options to AndroidManifest (#11863)
  Bump API schema to 2126f7dd (#11965)
  chore(Profiling): Add callouts and links to Android Profiling troubleshooting info (#11905)
  docs(flutter): Use sentry flutter init in samples (#11858)
  use native crypto to generate uuid (#11959)
  fix vercel integration 404 (#11958)
  Add RN Replay Privacy page (#11798)
  feat(dashboards): Add docs for Dashboard Edit Access Selector (#11822)
  feat(app-starts): Add RN SDK min version (#11650)
  feat(realy): Add Relay best practices guide (#11914)
  docs(sdks): New Scope APIs (#11943)
  docs(sdks): Span Sampling (#11940)
  Add include explaining sample code options (#11866)
  devenv: internal troubleshooting (#11947)
  Bump API schema to 0b18bfae (#11946)
  Bump API schema to 2bee5317 (#11945)
  feat: Link to Replay Issues when we mention Perf Issues as well (#11933)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants