Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e74e1f6

Browse files
authored
Adding BatchSpanProcessor thread name (open-telemetry#2186)
* Adding thread name * Updating CHANGELOG
1 parent ed3d657 commit e74e1f6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3535
([#2154](https://github.com/open-telemetry/opentelemetry-python/pull/2154))
3636
- Make baggage implementation w3c spec complaint
3737
([#2167](https://github.com/open-telemetry/opentelemetry-python/pull/2167))
38+
- Add name to `BatchSpanProcessor` worker thread
39+
([#2186](https://github.com/open-telemetry/opentelemetry-python/pull/2186))
3840

3941
## [1.5.0-0.24b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.5.0-0.24b0) - 2021-08-26
4042

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ def __init__(
175175
self.queue = collections.deque(
176176
[], max_queue_size
177177
) # type: typing.Deque[Span]
178-
self.worker_thread = threading.Thread(target=self.worker, daemon=True)
178+
self.worker_thread = threading.Thread(
179+
name="OtelBatchSpanProcessor", target=self.worker, daemon=True
180+
)
179181
self.condition = threading.Condition(threading.Lock())
180182
self._flush_request = None # type: typing.Optional[_FlushRequest]
181183
self.schedule_delay_millis = schedule_delay_millis

0 commit comments

Comments
 (0)