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
Copy file name to clipboardExpand all lines: docs/platforms/java/common/configuration/filtering.mdx
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,15 @@ We also offer [Inbound Filters](/concepts/data-management/filtering/) to filter
12
12
13
13
## Filtering Error Events
14
14
15
-
Configure your SDK to filter error events by using the <PlatformIdentifiername="before-send" /> callback method and configuring, enabling, or disabling integrations.
15
+
Configure your SDK to filter error events by using the <PlatformIdentifiername="ignored-errors" /> option or the <PlatformIdentifiername="before-send" /> callback method and configuring, enabling, or disabling integrations.
16
+
17
+
### Using <PlatformIdentifiername="ignored-errors" />
18
+
19
+
You can use the `ignoredErrors` option to filter out errors that match a certain pattern.
20
+
This option receives a list of strings and regular expressions to match against the error message.
21
+
When using strings, full matches will be filtered out.
### Using <PlatformIdentifiername="before-send" />
18
26
@@ -71,12 +79,21 @@ When a string or a non-error object is raised, Sentry creates a synthetic except
71
79
72
80
## Filtering Transaction Events
73
81
74
-
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.
82
+
To prevent certain transactions from being reported to Sentry, use the <PlatformIdentifiername="ignored-transactions" /> option, the <PlatformIdentifiername="traces-sampler" /> option, or the <PlatformIdentifiername="before-send-transaction" /> callback.
83
+
84
+
### Using <PlatformIdentifiername="ignored-transactions" />
85
+
86
+
You can use the <PlatformIdentifiername="ignored-transactions" /> option to filter out transactions that match a certain pattern.
87
+
This option receives a list of strings and regular expressions to match against the transaction name.
88
+
When using strings, full matches will be filtered out.
### Using <PlatformIdentifiername="traces-sampler" />
77
93
78
94
**Note:** The <PlatformIdentifiername="traces-sampler" /> and <PlatformIdentifiername="traces-sample-rate" /> config options are mutually exclusive. If you define a <PlatformIdentifiername="traces-sampler" /> to filter out certain transactions, you must also handle the case of non-filtered transactions by returning the rate at which you'd like them sampled.
79
95
96
+
You can use the <PlatformIdentifiername="traces-sampler" /> option to customize the traces sampling behavior.
80
97
In its simplest form, used just for filtering the transaction, it looks like this:
@@ -89,4 +106,5 @@ Learn more about <PlatformLink to="/configuration/sampling/">configuring the sam
89
106
90
107
### Using <PlatformIdentifiername="before-send-transaction" />
91
108
109
+
The <PlatformIdentifiername="before-send-transaction" /> allows you to provide a function to evaluate the current transaction and drop it if it's not one you want to capture.
0 commit comments