Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Define ignore_errors & ignore_transactions #884

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

smeubank
Copy link
Member

@smeubank smeubank commented Mar 22, 2023

Background

With improved server side sampling Sentry attempts to already remove some transactions which do not provide value to the user. However this is a known case for many users for a long time. There is the traces sampler function, but the UX for this is bulky when you have a simple use case.

Use case: There transcations and errors which a users never wants sent to sentry, to appear in a feed or count against their quota.

Proposal: provide simple options which is a list of errors/exceptions and transactions, respectively, which the SDK will then always discard and never send to Sentry

Preview: Event Sampling

Similar implementations:
getsentry/sentry-php#1503

JS ignoreErrors: Manage Your Error Quota

@vercel
Copy link

vercel bot commented Mar 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 12, 2023 3:58pm

@smeubank smeubank added enhancement New feature or request Impact: Small labels Mar 22, 2023
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome feature. I added two small notes.

src/docs/sdk/features.mdx Outdated Show resolved Hide resolved
To further simplfiy ignoring certain events from being sent to sentry, it is also sugggested to provide `ignoreTransactions` and `ignoreErrors` (or exception, choose terminology which is best for the platform). This option should provide a simple way to allow users to discard events (ignore) from before they are sent to sentry. Prevents sending data which is is undesired and may consume quota or resources on the Sentry server.

```python
ignore_transactions = ['GET /api/health','/api/v1/*']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify that this list refers to transaction names.

@marandaneto
Copy link
Contributor

@smeubank might be worth pointing out to https://develop.sentry.dev/sdk/client-reports/ as well since events are dropped on the client.
We don't have a generic item for that, maybe let's add new ones? should be straightforward.

Co-authored-by: Philipp Hofmann <[email protected]>
@smeubank
Copy link
Member Author

@smeubank might be worth pointing out to https://develop.sentry.dev/sdk/client-reports/ as well since events are dropped on the client. We don't have a generic item for that, maybe let's add new ones? should be straightforward.

will merge this as is. @jjbayer is there anything we need to consider on relay to send a new item type client reports for these 2 new discard reasons?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Impact: Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants