open-telemetry / open-telemetry/opentelemetry-python
Use an event loop to coordinate async SDK work
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
Originally from https://github.com/open-telemetry/opentelemetry-python/issues/62#issuecomment-1515418483
For example handling periodic exporting in BatchSpanProcessor and PeriodicExportingMetricReader could be done in a single asyncio event loop (using a single thread) across all instances of all of these objects.
We could avoid creating a new background thread in each instance of those classes and it would simplify the synchronization logic. Would work nicely with async exporters and async callbacks which could all run in the same event loop https://github.com/open-telemetry/opentelemetry-python/issues/3273.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the BatchSpanProcessor and PeriodicExportingMetricReader implementations, then examine the related async exporter and callback discussion in issue #3273. Define how one asyncio event loop would coordinate all instances and what synchronization, shutdown, and async exporter behavior must be preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100