open-telemetry / open-telemetry/opentelemetry-python
Add an environment variable for overriding gRPC default authority
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?
When exporting to a unix domain socket, typically the default authority is set to localhost instead of the socket path since otherwise the authority is invalid and gets rejected by the gRPC server. See issues https://github.com/hyperium/h2/pull/487 and https://github.com/hyperium/tonic/issues/742.
Describe the solution you'd like
I'd like an environment variable such as OTEL_EXPORTER_OTLP_AUTHORITY or a more general variable to override channel options:
self.channel = grpc.insecure_channel(self.endpoint, options=[('grpc.default_authority', OTEL_EXPORTER_OTLP_AUTHORITY)])
Describe alternatives you've considered
None
Additional Context
No response
Would you like to implement a fix?
Yes
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
Locate the Python OTLP gRPC exporter and its grpc.insecure_channel setup, then inspect how exporter environment variables are read. Confirm the intended authority override for Unix domain socket exports; completion should allow the configured variable to set the gRPC default authority without breaking existing channel setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100