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

Blocking detector with event volume throttling #3174

Closed
wants to merge 36 commits into from

Conversation

jamescrosswell
Copy link
Collaborator

This is a variant of:

In the other PR (that we want to merge) we removed some code that had been added to address volume concerns.

The original thinking was that if blocking calls exist on a hot path, we don't want to be sending thousands of events that all communicate the same thing. This PR includes a mechanism to record when each blocking call was last reported to Sentry and skip reporting if we detect the same blocking call within a cooldown period (hard coded to 1 day).

In this PR the blocking detector also emits a System.Diagnostics.Metric each time a blocking call is detected, using the code location as a tag, so that people can known how often a particular blocking call occurs.

There were concerns about emitting internal metrics when our Metrics product is so naiscent however... and also about the UX experience, which with this implementation would look something like this:
image

A location tag is added to the blocking call metrics and whilst it would be possible to add this same tag to the blocking call events and use that as a correlation id, there's no "standard" established for doing that across the other Sentry APIs yet (discussions about that haven't happened).

This PR exists mainly to preserve the solution we came up with in case we want to revisit or ressurect it once wider discussions across Sentry are a bit more mature.

bruno-garcia and others added 30 commits October 9, 2023 17:07
@jamescrosswell jamescrosswell changed the title Blocking detector throttled Blocking detector with event volume throttling Feb 26, 2024
Copy link
Contributor

github-actions bot commented Feb 26, 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

- Blocking detector with event volume throttling ([#3174](https://github.com/getsentry/sentry-dotnet/pull/3174))

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 39926f4

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.

3 participants