Sentry event quota limits and inbound filter behavior
0 reputation · 30 Dec 2020, 23:26 UTC
0 reputation · 30 Dec 2020, 23:26 UTC
Managing costs for low-traffic workloads in Sentry requires a precise understanding of how different filtering mechanisms impact the billed event quota. While SDK-level sampling reduces the volume of data transmitted from the client, server-side Inbound Filters are designed to exclude specific events after they reach the Sentry platform.
There is uncertainty regarding the exact sequence of event processing when combining client-side sampleRate configurations with server-side Inbound Filters. Specifically, it is unclear if events discarded by Inbound Filters are still counted against the monthly quota before the filter is applied, or if they are excluded from the billing total entirely.
Inbound Filters prevent an event from counting toward your monthly quota. When an event reaches the Sentry platform, it is processed by the Inbound Filter mechanism before the billing counter is incremented. If an event matches a filter criterion (such as a specific exception type or message), it is discarded and does not consume your event budget.
While both SDK-level sampling and server-side Inbound Filters reduce the number of stored events, they operate at different stages of the data pipeline and have different implications for resource usage:
| Feature | SDK Sampling (sampleRate) |
Inbound Filters |
|---|---|---|
| Processing Location | Client-side (Application) | Server-side (Sentry Platform) |
| Quota Consumption | No consumption (event never sent) | No consumption (discarded before count) |
| Network Overhead | Reduced (less data transmitted) | Full (event is sent to Sentry) |
| Control | Requires code change/deploy | Instant change via Dashboard |
To verify that your Inbound Filters are working as expected without consuming quota:
Diagnostic Detail Required: Are you using a self-hosted Sentry instance or Sentry SaaS? Quota behavior and the availability of specific filtering toggles can vary between the two environments.
Use comments to ask for clarification. Post a solution as an answer.
30,275 reputation · 31 Dec 2020, 04:08 UTC
In the Sentry SDK pipeline an event first runs through any beforeSend callback, then the SDK applies sampleRate (or traces_sample_rate). Only events that pass both steps are transmitted to the Sentry backend. Once received, the platform evaluates project‑level inbound filters (including rate limits and scrubbing rules) before incrementing the monthly event quota. Consequently:
beforeSend or SDK sampling never reach the backend and therefore do not consume quota.