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
Copy file name to clipboardExpand all lines: develop-docs/sdk/telemetry/spans/batch-processor.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ title: Batch Processor
10
10
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
11
</Alert>
12
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 Processors](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/batchprocessor/README.md). The BatchProcessor holds finished spans and logs in memory and batches them together in envelopes. It uses a combination of time and size-based batching. When writing this, the BatchProcessor only handles spans and logs, but the SDK MAY use it for other telemetry data in the future.
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
14
15
15
## Specification
16
16
17
-
Whenever the SDK finishes a span or captures a log, it MUST put these into the BatchProcessor. The SDK MUST NOT put unfinished spans into the BatchProcessor.
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
18
19
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
20
@@ -41,16 +41,16 @@ Scenario: Span added before timeout exceeds
41
41
And doesn't reset the timeout
42
42
And doesn't send the spans A and B in the BatchProcessor to Sentry
43
43
44
-
Scenario: Spans with size of MiB - 1 byte added, timeout exceeds
45
-
Given spans with size of MiB - 1 byte in the BatchProcessor
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
46
When the timeout exceeds
47
47
Then the SDK adds all the spans to one envelope
48
48
And sends them to Sentry
49
49
And resets the timeout
50
50
And clears the BatchProcessor
51
51
52
-
Scenario: Spans with size of MiB - 1 byte added within 4.9 seconds
53
-
Given spans with size of MiB - 1 byte in the BatchProcessor
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
54
When the SDK finishes another span and puts it into the BatchProcessor
55
55
Then the BatchProcessor puts all spans into one envelope
0 commit comments