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
The <PlatformIdentifiername="before-send" /> callback is passed both the `event` and a second argument, `hint`, that holds one or more hints.
30
-
31
-
Typically a `hint` holds the original exception so that additional data can be extracted or grouping is affected. In this example, the fingerprint is forced to a common value if an exception of a certain type has been caught:
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).
Event and breadcrumb `hints` are objects containing various information used to put together an event or a breadcrumb. Typically `hints` hold the original exception so that additional data can be extracted or grouping can be affected.
49
-
50
-
For events, hints contain properties such as `event_id`, `originalException`, `syntheticException` (used internally to generate cleaner stack trace), and any other arbitrary `data` that you attach.
51
-
52
-
For breadcrumbs, the use of `hints` is implementation dependent. For XHR requests, the hint contains the xhr object itself; for user interactions the hint contains the DOM element and event name and so forth.
In this example, the fingerprint is forced to a common value if an exception of a certain type has been caught:
57
-
58
-
</PlatformContent>
59
-
60
-
#### Hints for Events
61
-
62
-
`originalException`
63
-
64
-
: The original exception that caused the Sentry SDK to create the event. This is useful for changing how the Sentry SDK groups events or to extract additional information.
65
-
66
-
`syntheticException`
67
-
68
-
: When a string or a non-error object is raised, Sentry creates a synthetic exception so you can get a basic stack trace. This exception is stored here for further data extraction.
### 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.
@@ -118,31 +39,3 @@ It also allows you to sample different transactions at different rates.
118
39
If the transaction currently being processed has a parent transaction (from an upstream service calling this service), the parent (upstream) sampling decision will always be included in the sampling context data, so that your <PlatformIdentifiername="traces-sampler" /> can choose whether and when to inherit that decision. In most cases, inheritance is the right choice, to avoid breaking distributed traces. A broken trace will not include all your services. See <PlatformLinkto="/configuration/sampling/#inheritance">Inheriting the parent sampling decision</PlatformLink> to learn more.
119
40
120
41
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