Skip to main content

How do I filter events using the release inbound filter?

Issue

I want to stop events from specific release versions from being ingested, so they no longer count against my quota. I am configuring the release inbound filter in my project settings and need to know the correct release format and matching rules.

Applies To

  • SaaS: Business and Enterprise plans (also available during trials)

  • Self-Hosted Users

  • Inbound Filters

Resolution

You can filter events from specific releases using the Releases inbound filter, configured per project.

  1. Go to Settings > Projects > [your project] > Inbound Filters and scroll to Custom Inbound Filters.

  2. Click Add Filter.

  3. Choose a name, data type (All Data Types to match everything), and add a Release condition.

Keep these matching rules in mind:

  • The filter matches the full release name provided during SDK initialisation. With the recommended package prefix, the release is in the format package@version, for example [email protected]. On logs, metrics, and spans, it reads the sentry.release attribute.

  • Text matching. The is, contains, starts with, and ends with operators treat the release as text, with no special casing for SemVer. You can match prefixes with a glob: my-example@1.* matches [email protected], [email protected], and so on. Matching is not case-sensitive. The Releases row always works this way.

  • Version comparisons. In a custom filter, the >, >=, <, and <= operators compare the release as a version:
    – release:<2.0.0 drops every release before 2.0.0. Two conditions make a range: release:>=2.0.0 release:<4.0.0.
    – Missing parts count as zero, so 1.2 equals 1.2.0. A pre-release sorts below its final release, so 1.0.0-rc.1 is less than 1.0.0. The build code, such as +build.2, is ignored.
    – A value with a package, such as [email protected], only matches releases of that package. A value without a package compares against releases of every package.
    – A release without a version, such as a commit hash, never matches a comparison, and Sentry rejects a commit hash as a comparison value.

  • Events without a release. The filter never matches data that has no release, so set a release in your SDK for it to work. The exception is a negated operator: does not contain, does not start with, and does not end with also match data without a release. For example, "release does not contain beta" also drops data sent without a release.

Filtered data is dropped at ingest, appears under Stats as "Filtered", and doesn't count against your quota. The Releases row also applies to Session Replay, Logs, and Application Metrics from the matched release, not only errors. A new custom filter applies to the data type you choose.

For the full matching rules, see the releases inbound filter documentation.

Did this answer your question?