Repository navigation
Conversation
… limits
Add `global_rate_limit`, `fatal_rate_limit` and `per_fingerprint_rate_limit`
to `SentrySettings`, each with a configurable burst and period.
`max_events_per_second` remains as a shorthand for a per-fingerprint limit.
Events are checked against the per-fingerprint limit first, then passed to
any previous `before_send` hook, then checked against the shared global or
fatal limit, so that events dropped earlier don't use up the shared allowance.
Fatal events have their own limit, when enabled, so that a flood of other
events can't crowd out panics.
Fingerprints are tracked by hash, up to `max_tracked_fingerprints` (10,000 by
default, 0 for no cap). Beyond the cap, new fingerprints are only subject to
the shared limits until idle fingerprints are forgotten.
Dropped events are counted by the new
`sentry_events_rate_limited_total{level,limit}` metric.
BREAKING CHANGE: `SentrySettings` has new public fields, so constructing it
with a struct literal without `..Default::default()` no longer compiles. This
requires a 2.0.0 release of foundations-sentry. Existing
`max_events_per_second` users are now also subject to the default 10,000
tracked fingerprint cap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
global_rate_limit,fatal_rate_limitandper_fingerprint_rate_limittoSentrySettings, each with a configurable burst and period.max_events_per_secondremains as a shorthand for a per-fingerprint limit.Events are checked against the per-fingerprint limit first, then passed to any previous
before_sendhook, then checked against the shared global or fatal limit, so that events dropped earlier don't use up the shared allowance. Fatal events have their own limit, when enabled, so that a flood of other events can't crowd out panics.Fingerprints are tracked by hash, up to
max_tracked_fingerprints(10,000 by default, 0 for no cap). Beyond the cap, new fingerprints are only subject to the shared limits until idle fingerprints are forgotten.Dropped events are counted by the new
sentry_events_rate_limited_total{level,limit}metric.BREAKING CHANGE:
SentrySettingshas new public fields, so constructing it with a struct literal without..Default::default()no longer compiles. This requires a 2.0.0 release of foundations-sentry. Existingmax_events_per_secondusers are now also subject to the default 10,000 tracked fingerprint cap.