Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

Closes #2004

Problem Statement

The existing time-based log debouncing system throttles events purely based on time intervals per log type. This approach has limitations:

  • Identical errors occurring in rapid succession consume quota unnecessarily
  • Different errors of the same log type get incorrectly throttled together
  • No distinction between repeated errors and unique errors happening close together

Proposal

Replace time-based debouncing with content-based event throttling that deduplicates based on the actual error content (message + stacktrace fingerprint). This ensures:

  • Repeated identical errors are deduplicated within a time window
  • Unique errors are always captured, regardless of timing
  • Quota is preserved without losing distinct error information

Implementation

The new throttling system has the following elements

  • ILogThrottler interface - Abstraction allowing custom throttling implementations via options.SetLogThrottler()
  • ContentBasedThrottler - Default implementation using message + stacktrace fingerprinting with a configurable dedupe window (default: 1000ms)

- Add ILogThrottler interface and ContentBasedThrottler implementation
- Throttle only LogError and LogException events (not breadcrumbs/structured logs)
- Use message + stacktrace fingerprinting to deduplicate repeated errors
- Add configuration via Editor window (Enable Event Throttling checkbox + Dedupe Window)
- Remove old TimeDebounceBase and related classes
- Update integrations to use new throttler

Closes #2004
@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 32e1154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve event debouncing and throtteling

2 participants