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

Added support for implicit proxy configurations #289

Closed
wants to merge 1 commit into from

Conversation

c16a
Copy link

@c16a c16a commented Apr 14, 2021

When a new http.Client is being created from HTTPClientConfig, implicit proxy configurations are not supported.

This pull request adds support to pick up proxy configurations from the environment when the consuming application does not specify any.

When a new http.Client is being created from HTTPClientConfig,
implicit proxy configurations are not supported.

This commit adds support to pick up proxy configurations
from the environment when the consuming application does not
specify any.

Signed-off-by: Chaitanya Munukutla <chaitanya.m61292@gmail.com>
@c16a
Copy link
Author

c16a commented Apr 14, 2021

Fixes #288

@roidelapluie
Copy link
Member

Thank you. We prefer to have proxies explicitly set in the configuration. Additionally, this is a huge breaking change as any people might have proxies to go to the internet and not expect prometheus to use them for scraping etc.

@c16a
Copy link
Author

c16a commented Apr 15, 2021

@roidelapluie then can you suggest how to exclude proxies for Prometheus remote reads and remote writes? Is it better to have application level exclusion policies instead of having it in common?

@roidelapluie
Copy link
Member

You should only set a proxy_url: in the prometheus configuration where you need it.

@c16a
Copy link
Author

c16a commented Apr 15, 2021

Our weird case is that even if we don't need it, it's picking it up from the environment variables. In fact, we have not set the proxy configuration in Prometheus YML at all, but it's picking up proxy for EC2 SD (intended) and remote writes (unintended). Any clue why this might happen?

@roidelapluie
Copy link
Member

I can not reproduce this locally. Which env variables are you using exactly?

@roidelapluie
Copy link
Member

closing as per prometheus/prometheus#8720 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants