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
This document uses key words such as "MUST", "SHOULD", and "MAY" as defined in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to indicate requirement levels.
11
+
</Alert>
12
+
13
+
The BatchProcessor batches spans and logs into one envelope to reduce the number of HTTP requests. When an SDK implements span streaming or logs, it MUST use a BatchProcessor, which is similar to [OpenTelemetry's Batch Processor](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/batchprocessor/README.md). The BatchProcessor holds logs and finished spans in memory and batches them together into envelopes. It uses a combination of time and size-based batching. When writing this, the BatchProcessor only handles spans and logs, but an SDK MAY use it for other telemetry data in the future.
14
+
15
+
## Specification
16
+
17
+
Whenever the SDK finishes a span or captures a log, it MUST put it into the BatchProcessor. The SDK MUST NOT put unfinished spans into the BatchProcessor.
18
+
19
+
The BatchProcessor MUST start a timeout of 5 seconds when the SDK adds the first span or log. When the timeout exceeds, the BatchProcessor MUST send all spans or logs, no matter how many items it contains. The SDK MAY choose a different value for the timeout, but it MUST NOT exceed 30 seconds, as this can lead to problems with the span buffer on the backend, which uses a time interval of 60 seconds for determining segments for spans.
20
+
21
+
The BatchProcessor MUST send all items after the SDK when containing spans or logs exceeding 1MiB in size. The SDK MAY choose a different value for the max batch size keeping the [envelope max sizes](/sdk/data-model/envelopes/#size-limits) in mind. The SDK MUST calculate the size of a span or a log to manage the BatchProcessor's memory footprint. The SDK MUST serialize the span or log and calculate the size based on the serialized JSON bytes. As serialization is expensive, the BatchProcessor SHOULD keep track of the serialized spans and logs and pass these to the envelope to avoid serializing multiple times.
22
+
23
+
When the BatchProcessor sends all spans or logs, it MUST reset its timeout and remove all spans and logs. The SDK MUST apply filtering and sampling before adding spans or logs to the BatchProcessor. The SDK MUST apply rate limits to spans and logs after they leave the BatchProcessor to send as much data as possible by dropping data as late as possible.
24
+
25
+
The detailed specification is written in the [Gherkin syntax](https://cucumber.io/docs/gherkin/reference/). The specification uses spans as an example, but the same applies to logs or any other future telemetry data.
26
+
27
+
28
+
```Gherkin
29
+
Scenario: No spans in BatchProcessor 1 span added
30
+
Given no spans in the BatchProcessor
31
+
When the SDK finishes 1 span
32
+
Then the SDK puts this span to the BatchProcessor
33
+
And starts a timeout of 5 seconds
34
+
And doesn't send the span to Sentry
35
+
36
+
Scenario: Span added before timeout exceeds
37
+
Given span A in the BatchProcessor
38
+
Given 4.9 seconds pass
39
+
When the SDK finishes span B
40
+
Then the SDK adds span B to the BatchProcessor
41
+
And doesn't reset the timeout
42
+
And doesn't send the spans A and B in the BatchProcessor to Sentry
43
+
44
+
Scenario: Spans with size of 1 MiB - 1 byte added, timeout exceeds
45
+
Given spans with size of 1 MiB - 1 byte in the BatchProcessor
46
+
When the timeout exceeds
47
+
Then the SDK adds all the spans to one envelope
48
+
And sends them to Sentry
49
+
And resets the timeout
50
+
And clears the BatchProcessor
51
+
52
+
Scenario: Spans with size of 1 MiB - 1 byte added within 4.9 seconds
53
+
Given spans with size of 1 MiB - 1 byte in the BatchProcessor
54
+
When the SDK finishes another span and puts it into the BatchProcessor
55
+
Then the BatchProcessor puts all spans into one envelope
56
+
And sends the envelope to Sentry
57
+
And resets the timeout
58
+
And clears the BatchProcessor
59
+
60
+
Scenario: Unfinished spans
61
+
Given no span is in the BatchProcessor
62
+
When the SDK starts a span but doesn't finish it
63
+
Then the BatchProcessor is empty
64
+
65
+
Scenario: Span filtered out
66
+
Given no span is in the BatchProcessor
67
+
When the finishes a span
68
+
And the span is filtered out
69
+
Then the BatchProcessor is empty
70
+
71
+
Scenario: Span not sampled
72
+
Given no span is in the BatchProcessor
73
+
When the finishes a span
74
+
And the span is not sampled
75
+
Then the BatchProcessor is empty
76
+
77
+
Scenario: 1 span added application crashes
78
+
Given 1 span in the SpansAggregator
79
+
When the SDK detects a crash
80
+
Then the SDK does nothing with the items in the BatchProcessor
Copy file name to clipboardExpand all lines: develop-docs/self-hosted/troubleshooting/docker.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ sidebar_title: Docker
4
4
sidebar_order: 3
5
5
---
6
6
7
+
## `FAIL: Docker Compose is required to run self-hosted` error but Docker Compose is installed
8
+
9
+
Around version 25.1.0 to 25.4.0, users which did not have `docker compose` plugin installed, and relied only on `docker-compose` will face some issues. Notably for Amazon Linux 2023 distro that does not have `docker-compose-plugin` packaged, you may need to install the standalone `docker-compose` separately. See [docker/compose installation guide](https://github.com/docker/compose?tab=readme-ov-file#linux) for more details.
10
+
7
11
## Container Healthcheck
8
12
9
13
There may be some circumstances which you may want to increase or decrease healthcheck interval, timeout or retries for your custom needs. This can be achieved by editing `HEALTHCHECK_INTERVAL`, `HEALTHCHECK_TIMEOUT`, `HEALTHCHECK_RETRIES` variables' values in `.env`.
Copy file name to clipboardExpand all lines: docs/platforms/godot/configuration/options.mdx
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,18 @@ Learn more about [DSN utilization](/product/sentry-basics/dsn-explainer/#dsn-uti
22
22
23
23
<ConfigKeyname="debug">
24
24
25
-
Turns debug mode on or off. If `debug` is enabled, the SDK will print useful debugging information to standard output. These messages do not appear in the Godot console or log file but can be seen when launching Godot application from a terminal. It's generally not recommended to turn it on in production, though turning `debug` mode on will not cause any safety concerns.
25
+
Turns debug mode on or off. If `debug` is enabled, the SDK will print useful debugging information. You can see it in the Output panel of the Godot editor. It's generally not recommended to turn it on in production, though turning `debug` mode on will not cause any safety concerns.
26
26
27
27
In the Project Settings, this option appears as `Debug Printing` and defaults to `Auto`. When set to `Auto`, the `debug` is enabled in debug builds (such as the editor and debug exports), and disabled in release export.
28
28
29
+
You can control the verbosity using the `diagnostic_level` option.
30
+
31
+
</ConfigKey>
32
+
33
+
<ConfigKeyname="diagnostic_level">
34
+
35
+
Specifies the minimum level of messages to be printed if `debug` is turned on.
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.
0 commit comments