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

Experimenting with Greedy Sampling #3167

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Feb 23, 2024

Playing around with some ideas for how we could use internal Sentry metrics to avoid randomly dropping envelopes:

image

These are published as Sytem.Diagnostics.Metrics and we don't necessarily need to capture these and send them through to Sentry. I did that here just to provide a visual of the metrics being captured.

However, I figured it might be possible to listen to these metrics in process and use them in a custom TraceSampler that adjusted the sample rate down if envelopes started to get dropped and adjusted back up if there was lots of space in the queue...

This could be thought of as a GreedySampler or a PoliteSampler. It would try to find the maximum sample rate that could be sustained before envelopes start to get dropped. That way the envelopes that are being selected out are those related to traces (not those related to crash reports or metrics).

Copy link
Contributor

github-actions bot commented Feb 23, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Experimenting with Greedy Sampling ([#3167](https://github.com/getsentry/sentry-dotnet/pull/3167))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 8796fb1

@jamescrosswell jamescrosswell changed the title Experimenting with internal Sentry metrics Experimenting with Dynamic Sampling Feb 25, 2024
@jamescrosswell jamescrosswell changed the title Experimenting with Dynamic Sampling Experimenting with Greedy Sampling Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants