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

TimeOut in Histogram and Summaries #4387

Closed
atulverma-1997 opened this Issue Jul 16, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@atulverma-1997
Copy link

atulverma-1997 commented Jul 16, 2018

Proposal:
Sometimes a user start timer, but don't want to stop it. In such cases, the duration is not logged in any bucket. So, there should be a timeout settings in Histogram/Summary, so that user can configure after how much time, the timer should be automatically stopped, and logged in the appropriate bucket.

Use Case:
In my case, I send an HTTP request to an API, which could give a TimeOutException. In this case, I start the timer before sending the request. Here, I catch a TimeOutException in which I log the exception using Counter metric, but don't stop the Histogram.Timer. That is why, the timer starts, but it dont stop and is not logged in any of the bucket. There can be timeout setting in Histogram in which I can configure that after this much time, the duration should be logged in infinity bucket

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 16, 2018

You should file this against the client library you are using, as this repository is for the Prometheus server itself.
I would say in this case that it's your responsibility to stop the timer.

@atulverma-1997

This comment has been minimized.

Copy link
Author

atulverma-1997 commented Jul 16, 2018

Thank you @brian-brazil ,

Filing against the appropriate client library.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.