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

InstrumentHandler should expose a gauge "requests in flight" #101

Closed
neelance opened this issue Mar 19, 2015 · 4 comments
Closed

InstrumentHandler should expose a gauge "requests in flight" #101

neelance opened this issue Mar 19, 2015 · 4 comments
Assignees
Milestone

Comments

@neelance
Copy link

It would be great if InstrumentHandler could not only track completed requests by http_requests_total, but also have a metric of how many requests were received, e.g. http_requests_received. Then one could calculate http_requests_received - http_requests_total to get the number of concurrent requests that have not been processed yet.

@brian-brazil
Copy link
Contributor

That'd be better done as a gauge. Direct arithmetic on counters can break in a number of fun ways such as resets and race conditions, and is to be avoided.

@neelance
Copy link
Author

Okay, whatever you think is best. :-)

@beorn7 beorn7 changed the title InstrumentHandler should also count received requests InstrumentHandler should expose a gauge "requests in flight" Jul 27, 2016
@beorn7
Copy link
Member

beorn7 commented Jul 27, 2016

Changed the title accordingly.

@beorn7
Copy link
Member

beorn7 commented Aug 19, 2016

Since InstrumentHandler is deprecated, this will be implemented as a middleware in the new promhttp package.

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

No branches or pull requests

4 participants