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 how to configure your SDK to tell Sentry about your environments."
4
+
sidebar_order: 30
5
5
---
6
6
7
7
Environments tell you where an error occurred, whether that's in your production system, your staging server, or elsewhere.
8
8
9
9
Sentry automatically creates an environment when it receives an event with the `environment` parameter set.
10
10
11
-
Environments are case sensitive. The environment name can't contain newlines, spaces or forward slashes, can't be the string "None", or exceed 64 characters. You can't delete environments, but you can [hide](/product/sentry-basics/environments/#hidden-environments) them.
11
+
Environments are case-sensitive. The environment name can't contain newlines, spaces or forward slashes, can't be the string "None", or exceed 64 characters. You can't delete environments, but you can [hide](/product/sentry-basics/environments/#hidden-environments) them.
By default, the SDK reports `Editor` when running inside the Unreal Engine Editor. You can also set the default environment to `Release`, `Development`, or `Debug` in your build configuration or override the environment value manually.
14
30
15
31
Environments help you better filter issues, releases, and user feedback in the Issue Details page of sentry.io, which you learn more about in our [documentation that covers using environments](/product/sentry-basics/environments/).
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.
@@ -21,128 +21,3 @@ All Sentry SDKs support the <PlatformIdentifier name="before-send" /> callback m
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.
107
-
108
-
### Using <PlatformIdentifiername="traces-sampler" />
109
-
110
-
**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.
111
-
112
-
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.
117
-
118
-
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
-
120
-
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