open-telemetry / open-telemetry/opentelemetry-python

Add an environment variable for overriding gRPC default authority

Open
#4,278 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.