Skip to content

Commit 5967374

Browse files
authored
Flush export queue when it reaches max_export_batch_size (#1521)
1 parent 8e34a26 commit 5967374

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- Add urllib to opentelemetry-bootstrap target list
2727
([#1584])(https://github.com/open-telemetry/opentelemetry-python/pull/1584)
2828

29-
3029
### Changed
3130
- Read-only Span attributes have been moved to ReadableSpan class
3231
([#1560](https://github.com/open-telemetry/opentelemetry-python/pull/1560))
32+
- `BatchExportSpanProcessor` flushes export queue when it reaches `max_export_batch_size`
33+
([#1521])(https://github.com/open-telemetry/opentelemetry-python/pull/1521)
3334

3435
### Removed
3536
- Remove Configuration

opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def on_end(self, span: ReadableSpan) -> None:
200200

201201
self.queue.appendleft(span)
202202

203-
if len(self.queue) >= self.max_queue_size // 2:
203+
if len(self.queue) >= self.max_export_batch_size:
204204
with self.condition:
205205
self.condition.notify()
206206

0 commit comments

Comments
 (0)