Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 95bf4e0

Browse files
authored
Increase batch size in background thread transport (#86)
1 parent 0a92e60 commit 95bf4e0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

trace/opencensus/trace/exporters/transports/background_thread.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
from opencensus.trace.exporters.transports import base
2323

2424
_DEFAULT_GRACE_PERIOD = 5.0 # Seconds
25-
_WAIT_PERIOD = 3.0 # Seconds
26-
_DEFAULT_MAX_BATCH_SIZE = 2
25+
_DEFAULT_MAX_BATCH_SIZE = 10
26+
_WAIT_PERIOD = 1.0 # Seconds
2727
_WORKER_THREAD_NAME = 'opencensus.trace.Worker'
2828
_WORKER_TERMINATOR = object()
2929

@@ -107,6 +107,7 @@ def _thread_main(self):
107107
'traceId': trace_id,
108108
'spans': spans,
109109
}
110+
110111
self.exporter.emit(spans_json)
111112

112113
for _ in range(len(items)):

0 commit comments

Comments
 (0)