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

Add /metrics endpoint server to the proxy #547

Closed
wants to merge 6 commits into from
Closed

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Mar 8, 2018

This PR adds a Hyper server that serves the proxy /metrics endpoint. It currently doesn't serve anything because no scrapable metrics are collected. The metrics server's address and port can be configured with the CONDUIT_PROXY_METRICS_LISTENER environment variable.

$ http get localhost:4191/metrics                   
HTTP/1.1 200 OK
Date: Thu, 08 Mar 2018 23:09:23 GMT
Transfer-Encoding: chunked


$ http get localhost:4191          
HTTP/1.1 404 Not Found
Content-Length: 0
Date: Thu, 08 Mar 2018 23:09:36 GMT


Closes #540

@hawkw hawkw added this to the 0.4.0 milestone Mar 8, 2018
@hawkw hawkw self-assigned this Mar 8, 2018
@hawkw hawkw added the review/ready Issue has a reviewable PR label Mar 8, 2018
@@ -166,6 +171,10 @@ where
inbound_listener.local_addr(),
config.private_forward
);
info!(
"serving scrapable metrics on {:?}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/scrapable/prometheus/ ?

@@ -0,0 +1,59 @@
use std::sync::Arc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd consider calling this file prometheus, since it is specifically going to be in prometheus format, and scrape might be less understandable immediately for Future Us.

@olix0r olix0r removed the review/ready Issue has a reviewable PR label Mar 14, 2018
@hawkw hawkw closed this Mar 20, 2018
@hawkw hawkw removed the review label Mar 20, 2018
@olix0r olix0r deleted the eliza/proxy-metrics branch April 30, 2018 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants