You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Learn more about how to configure your SDK to filter events reported to Sentry."
4
+
sidebar_order: 60
5
5
---
6
6
7
7
When you add Sentry to your app, you get a lot of valuable information about errors and performance. And lots of information is good -- as long as it's the right information, at a reasonable volume.
@@ -18,12 +18,10 @@ Configure your SDK to filter error events by using the <PlatformIdentifier name=
18
18
19
19
All Sentry SDKs support the <PlatformIdentifiername="before-send" /> callback method. Because it's called immediately before the event is sent to the server, this is your last chance to decide not to send data or to edit it. <PlatformIdentifiername="before-send" /> receives the event object as a parameter, which you can use to either modify the event’s data or drop it completely by returning `null`, based on custom logic and the data available on the event.
The <PlatformIdentifiername="before-send" /> callback is passed both the `event` and a second argument, `hint`, that holds one or more hints.
@@ -34,10 +32,6 @@ Typically a `hint` holds the original exception so that additional data can be e
34
32
35
33
When the SDK creates an event or breadcrumb for transmission, that transmission is typically created from some sort of source object. For instance, an error event is typically created from a log record or exception instance. For better customization, SDKs send these objects to certain callbacks (<PlatformIdentifiername="before-send" />, <PlatformIdentifiername="before-breadcrumb" /> or the event processor system in the SDK).
### Using <PlatformIdentifiername="ignore-errors" />
79
-
80
-
You can use the <PlatformIdentifiername="ignore-errors" /> option to filter out errors that match a certain pattern. This option receives a list of strings and regular expressions to match against the error message. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead.
To prevent certain transactions from being reported to Sentry, use the <PlatformIdentifiername="traces-sampler" /> or <PlatformIdentifiername="before-send-transaction" /> configuration option, which allows you to provide a function to evaluate the current transaction and drop it if it's not one you want.
@@ -119,30 +87,6 @@ If the transaction currently being processed has a parent transaction (from an u
119
87
120
88
Learn more about <PlatformLinkto="/configuration/sampling/">configuring the sample rate</PlatformLink>.
### Using <PlatformIdentifiername="ignore-transactions" />
133
-
134
-
You can use the <PlatformIdentifiername="ignore-transactions" /> option to filter out transactions that match a certain pattern. This option receives a list of strings and regular expressions to match against the transaction name. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead.
0 commit comments