-
Notifications
You must be signed in to change notification settings - Fork 910
Closed
Labels
BugSomething isn't workingSomething isn't working
Description
Describe the bug
Currently, worker.addSpan is slow and blocks writing threads on huge load
Steps to reproduce
Increase span queue size, generate huge load so that span queue is close to its limit
What did you expect to see?
No or little time spent in BatchSpanProcessor.onEnd in profile
What did you see instead?
2% of total time spent in BatchSpanProcessor.onEnd, which is just adding spans to a queue
What version and what artifacts are you using?
Artifacts: opentelemetry-api, opentelemetry-sdk, BatchSpanProcessor
Version: v1.3.0
Environment
Compiler: Temurin 23.0.1
OS: Ubuntu 24.04
Proposed changes
- Calculate queue size externally
- Allow concurrent writes of batches to keep on pace
- Allow to configure worker, e.g. use actor instead of background thread
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working