open-telemetry / open-telemetry/opentelemetry-python
Exception handling for exporter connection errors / exceptions in general
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
Is your feature request related to a problem?
sometimes my endpoint can be offline, so the problem is that error and exceptions are not handled and are jumping to console and i cannot choose how to handle them (for example, the OTLPSpanExporter is running as a thread and i cannot wrap it in a regular try except. same applys to logs and metrics exporters
Describe the solution you'd like
i would like a callback that handles connection errors or any other type of exceptions that may occur in the open telemetry package. maybe even a way to run the exporter not as a thread, so i can manage the exceptions myself with a generic try except
Describe alternatives you've considered
No response
Additional Context
No response
Would you like to implement a fix?
No
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 with the OTLPSpanExporter entry point and compare how the logs and metrics exporters run in threads and surface exceptions. Determine the intended callback or non-threaded behavior, then define the API and tests needed to demonstrate that connection and other exporter errors can be handled by callers.
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
- Needs clarification
- Newbie friendliness
- 20/100