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

Expose the addr bit of prometheus' start_http_server() in the config #59

Open
tadzik opened this issue Nov 1, 2021 · 2 comments
Open

Comments

@tadzik
Copy link
Contributor

tadzik commented Nov 1, 2021

listen_port being passed on to prometheus.start_http_server makes it a whole listen_address, rather than just a port, making configs look confusing when you actually need not-just-a-port in there.

Perhaps it'd be worth to rename it, keeping the existing one as a deprecated alias for a while?

metrics in the configuration only exposes port as a configurable, making it tricky to listen on non-standard addresses if needed.

@tulir
Copy link
Member

tulir commented Nov 1, 2021

prometheus_client.start_http_server's first argument seems to be specifically a port as an integer, not an address? The second argument is addr, making that configurable might be useful

As for renaming config fields, the config update system exists specifically to support legacy field names without any fallbacks in the actual code.

@tadzik
Copy link
Contributor Author

tadzik commented Nov 1, 2021

Hmm, indeed – seems like we've been misusing it for quite a while, and it's been working due to a happy accident more than anything else...

@tadzik tadzik changed the title metrics.listen_port is actually a listen-in-general Expose the addr bit of prometheus' start_http_server() in the config Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants