Skip to content

Comments

Experimenting with Greedy Sampling#3167

Closed
jamescrosswell wants to merge 4 commits intomainfrom
sentry-internal-metrics
Closed

Experimenting with Greedy Sampling#3167
jamescrosswell wants to merge 4 commits intomainfrom
sentry-internal-metrics

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).

@github-actions
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
@bruno-garcia bruno-garcia removed their request for review June 26, 2024 14:28
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.

2 participants