Skip to content

Commit e64244c

Browse files
final touches
1 parent 775d988 commit e64244c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

develop-docs/sdk/telemetry/spans/batch-processor.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ title: Batch Processor
1010
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.
1111
</Alert>
1212

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.
1414

1515
## Specification
1616

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.
1818

1919
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.
2020

@@ -41,16 +41,16 @@ Scenario: Span added before timeout exceeds
4141
And doesn't reset the timeout
4242
And doesn't send the spans A and B in the BatchProcessor to Sentry
4343
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
4646
When the timeout exceeds
4747
Then the SDK adds all the spans to one envelope
4848
And sends them to Sentry
4949
And resets the timeout
5050
And clears the BatchProcessor
5151
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
5454
When the SDK finishes another span and puts it into the BatchProcessor
5555
Then the BatchProcessor puts all spans into one envelope
5656
And sends the envelope to Sentry

0 commit comments

Comments
 (0)