Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTLP GRPC exporters don't respect domain NO_PROXY settings due to grpc bug #5976

Open
akats7 opened this issue Nov 14, 2024 · 6 comments
Open
Assignees
Labels
blocked:design Waiting on design work to be completed before implementation can start. bug Something isn't working pkg:exporter:otlp Related to the OTLP exporter package

Comments

@akats7
Copy link

akats7 commented Nov 14, 2024

Description

Brought up this issue in the collector repo, realized it should likely be applied here as well.

There's a bug in grpc-go (here and here) related to the way NewClient does hostname resolution where now the host is resolved before the ProxyFromEnvironment function is called, due to this domain based no_proxy settings are not applied as the comparison is done only against the ip. localhost is not affected.

The grpc team is working on a fix but it seems like until that's in place we might want to revert to DialContext instead of NewClient.

Environment

  • Go Version: 1.23.2
  • opentelemetry-go version: 1.32.0
  • grpc version: 1.67.1

Steps To Reproduce

Set HTTP/S_PROXY
Init OTLP GRPC client with target endpoint
Include endpoint sub-domain in NO_PROXY

Expected behavior

HTTP/S_PROXY setting should still be applied

@akats7 akats7 added the bug Something isn't working label Nov 14, 2024
@pellared pellared added the pkg:exporter:otlp Related to the OTLP exporter package label Nov 14, 2024
@MrAlias MrAlias added help wanted Extra attention is needed contribfest Issue good for KubeCon contribfest labels Nov 15, 2024
@wasim-nihal
Copy link

Hello @MrAlias! I would like to contribute the fix for this issue.

@MrAlias
Copy link
Contributor

MrAlias commented Nov 21, 2024

Short term workaround: grpc/grpc-go#7556 (comment)

We plan to hold off on this until the next release of grpc: https://github.com/grpc/grpc-go/milestone/67

If it is not resolved in that release we will re-evaluate applying a more permanent fix here.

@MrAlias MrAlias added blocked:design Waiting on design work to be completed before implementation can start. and removed help wanted Extra attention is needed contribfest Issue good for KubeCon contribfest labels Nov 21, 2024
@MrAlias MrAlias moved this from Needs triage to Low priority in Go: Triage Nov 21, 2024
@wasim-nihal
Copy link

sure @MrAlias

@MrAlias
Copy link
Contributor

MrAlias commented Dec 12, 2024

Note: the collector has already switched back to using the Dial function.

@akats7
Copy link
Author

akats7 commented Dec 12, 2024

Note: the collector has already switched back to using the Dial function.

Yep I made that change since the collector sanitizes the endpoint so we can't use the passthrough resolver

@MrAlias
Copy link
Contributor

MrAlias commented Dec 12, 2024

grpc 1.69.0 release notes mention this will be addressed in 1.70.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:design Waiting on design work to be completed before implementation can start. bug Something isn't working pkg:exporter:otlp Related to the OTLP exporter package
Projects
Status: Low priority
Development

No branches or pull requests

4 participants