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
See <PlatformLinkto="/configuration/options/#ignoreErrors">ignoreErrors</PlatformLink> for details.
24
+
23
25
### Using <PlatformIdentifiername="before-send" />
24
26
25
-
You can configure a <PlatformIdentifiername="before-send" /> callback method to filter error events. 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 and, based on custom logic and the data available on the event, you can either modify the event’s data or drop it completely by returning `null`.
27
+
You can configure a <PlatformIdentifiername="before-send" /> callback method to filter error events. 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 and, based on custom logic and the data available on the event, you can either modify the event’s data or drop it completely by returning `null`. This hook is called for both error and message events.
Note also that breadcrumbs can be filtered, as discussed in [our Breadcrumbs documentation](/product/error-monitoring/breadcrumbs/).
30
-
31
-
#### Event Hints
32
-
33
-
The <PlatformIdentifiername="before-send" /> callback is passed both the `event` and a second argument, `hint`, that holds one or more hints.
34
-
35
-
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.
See <PlatformLinkto="/configuration/options/#beforeSend">beforeSend</PlatformLink> for details, and [Using Hints](#using-hints) for details on the `hint` object.
73
32
74
33
### Using `allowUrls` and `denyUrls`
75
34
@@ -83,6 +42,9 @@ Sentry.init({
83
42
84
43
You can also use `denyUrls` if you want to block errors created on specific URLs from being sent to Sentry.
85
44
45
+
- See <PlatformLinkto="/configuration/options/#allowUrls">allowUrls</PlatformLink> details
46
+
- See <PlatformLinkto="/configuration/options/#denyUrls">denyUrls</PlatformLink> details
47
+
86
48
### Using `thirdPartyErrorFilterIntegration`
87
49
88
50
_Available in browser-based SDKs from version 8.10.0_
@@ -156,28 +118,67 @@ You can use the <PlatformIdentifier name="ignore-transactions" /> option to filt
### Using <PlatformIdentifiername="traces-sampler" />
160
-
161
-
**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.
121
+
See <PlatformLinkto="/configuration/options/#ignoreTransactions">ignoreTransactions</PlatformLink> for details.
162
122
163
-
In its simplest form, used just for filtering the transaction, it looks like this:
It also allows you to sample different transactions at different rates.
123
+
### Using <PlatformIdentifiername="traces-sampler" />
168
124
169
-
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.
125
+
You can also use the <PlatformLinkto="/configuration/options/#tracesSampler">tracesSampler</PlatformLink> option to prevent certain transactions from being reported to Sentry.
170
126
171
-
Learn more about <PlatformLinkto="/configuration/sampling/">configuring the sample rate</PlatformLink>.
127
+
See <PlatformLinkto="/configuration/sampling/#setting-a-sampling-function">Sampling</PlatformLink> on information about how to use it.
See <PlatformLinkto="/configuration/options/#beforeSendTransaction">beforeSendTransaction</PlatformLink> for details, and [Using Hints](#using-hints) for details on the `hint` object.
134
+
177
135
## Filtering Spans
178
136
179
137
Use the <PlatformIdentifiername="before-send-span" /> configuration option which allows you to provide a function to modify a span.
180
138
This function is called for the root span and all child spans. If you want to drop the root span, including its child spans, use [`beforeSendTransaction`](#using-beforesendtransaction) instead.
181
139
Please note that you cannot use `beforeSendSpan` to drop a span, you can only modify it and filter data on it.
2. Event processors added via `Sentry.addEventProcessor()`
159
+
160
+
Event and breadcrumb `hints` are objects containing various types of 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.
161
+
162
+
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.
163
+
164
+
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:
169
+
170
+
</PlatformContent>
171
+
172
+
### Hints for Events
173
+
174
+
`originalException`
175
+
176
+
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.
177
+
178
+
`syntheticException`
179
+
180
+
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.
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/releases.mdx
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,11 +64,6 @@ After configuring your SDK, you can install a repository integration or manually
64
64
65
65
Monitor the [health of releases](/product/releases/health/) by observing user adoption, usage of the application, percentage of [crashes](/product/releases/health/#crash), and [session data](/product/releases/health/#session). Release health will provide insight into the impact of crashes and bugs as it relates to user experience, and reveal trends with each new issue through the [Release Details](/product/releases/release-details/) graphs and filters.
66
66
67
-
<Alert>
68
-
69
-
Crash reporting and app hang detection are not available for watchOS.
70
-
71
-
</Alert>
72
67
73
68
In order to monitor release health, the SDK sends session data.
74
69
@@ -77,3 +72,5 @@ In order to monitor release health, the SDK sends session data.
77
72
A session represents the interaction between the user and the application. Sessions contain a timestamp, a status (if the session was OK or if it crashed), and are always linked to a release. Most Sentry SDKs can manage sessions automatically.
0 commit comments