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

Attempt to bind to the listen address before starting server. #92

Merged
merged 1 commit into from
Sep 27, 2020

Conversation

tobz
Copy link
Member

@tobz tobz commented Sep 27, 2020

Previously, the Prometheus exporter would bind and serve all in one shot, within a future, which meant users had no way to see if the binding would succeed, and no way to recover the error themselves. This was called out in #83

This PR extracts the binding from the future that we run to drive the exporter, so we can attempt to bind beforehand -- regardless of whether PrometheusBuilder::installed or PrometheusBuilder::build is being called -- and let the user know if it succeeded.

We've also fixed some other minor nits and cleaned some stuff up.

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

1 participant