sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Ability to provide a browserlist query as an inbound filter

Open QuentinFchx opened this issue 2 years ago • 4 comments

Problem Statement

In the "Inbound Filters" settings, I'd like to provide a browserlist query to filter out events from unsupported browsers.

The current "Filter out known errors from legacy browsers" section is somewhat outdated and we'd like to have more control over which browsers we consider irrelevant.

Thank you in advance :)

Solution Brainstorm

No response

Product Area

Settings - Projects

QuentinFchx avatar Aug 17 '23 13:08 QuentinFchx

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar Aug 17 '23 13:08 getsantry[bot]

Routing to @getsentry/product-owners-settings-projects for triage ⏲️

getsantry[bot] avatar Aug 17 '23 18:08 getsantry[bot]

Hi @QuentinFchx thanks for the feedback, We'll add it to our backlog and keep this issue updated

Dhrumil-Sentry avatar Aug 18 '23 02:08 Dhrumil-Sentry

Going to keep this open and share some of the investigation we did when we added a few more filters.

We did look into browserlist support a little bit when we added the new browser filters and the challenges were around needing to support browserlist query parsing and supporting a somewhat different behavior. for example - browserlist query of firefox > 100 browserlist can tell you the supported versions 101, 102, 103. But what happens when a new version comes out do we filter out 104 if its not in the list?

And then we were trying to figure out if people should upload their browserlist query or the output of supported browsers since our version of the database might be different from theirs. "Last 3 major versions" depends on when the caniuse database was updated and questions around how to update that and inform people of when we update.

scttcper avatar Aug 08 '24 18:08 scttcper

This can be almost done manually.

We use browserslist-useragent-regexp to display an "outdated browser" in our app. We took the opportunity to add tags to Sentry issues in the beforeSend hook, so we can filter by isBrowserSupported being true or false.

Image

We wrote an article about generating & updating the browserlist regex automatically: https://dev.to/365talents/automatically-take-care-of-outdated-browsers-thanks-to-browserslist-and-github-actions-38p7

Hope it helps.

nicooprat avatar Sep 16 '25 16:09 nicooprat