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
add ignoreErrors and ignoreTransactions for Dart (#10989)
* add ignoreErrors and ignoreTransactions for Dart
* improved misleading code samples for ignoreErrors and ignoreTransactions
* removed unnecessary backslash from codesamples
Copy file name to clipboardExpand all lines: docs/platforms/dart/configuration/filtering.mdx
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,12 @@ We also offer [Inbound Filters](/concepts/data-management/filtering/) to filter
14
14
15
15
Configure your SDK to filter error events by using the <PlatformIdentifiername="before-send" /> callback method and configuring, enabling, or disabling integrations.
16
16
17
+
### Using <PlatformIdentifiername="ignore-errors" />
18
+
19
+
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. If you need to filter by exact match, use regex patterns instead.
### Using <PlatformIdentifiername="before-send" />
18
24
19
25
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.
@@ -69,6 +75,12 @@ When a string or a non-error object is raised, Sentry creates a synthetic except
69
75
70
76
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.
71
77
78
+
### Using <PlatformIdentifiername="ignore-transactions" />
79
+
80
+
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. If you need to filter by exact match, use regex patterns instead.
### Using <PlatformIdentifiername="traces-sampler" />
73
85
74
86
**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.
0 commit comments