open-telemetry / open-telemetry/opentelemetry-python
Improve error logging for OTLP gRPC exporter
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?
I used the gRPC exporter, and it failed to export to my backend (this was my fault). I got the following error, even when debug logging was enabled:
ERROR:opentelemetry.exporter.otlp.proto.grpc.exporter:Failed to export metrics to <endpoint>, error code: StatusCode.INVALID_ARGUMENT
It looks like the error message is not being logged here:
Describe the solution you'd like
I would like to log the error's details.
Describe alternatives you've considered
No response
Additional Context
This may also apply to the trace or log grpc exporter. I haven't checked
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 by reading exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py around lines 341-347, where failed metric exports are logged. Compare the trace and log gRPC exporters as suggested, then verify that failed exports log the error details rather than only the status code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100