We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug A clear and concise description of what the bug is.
timer.close() is equivalent with timer.observeDuration(), so timer will observe twice. then we get wrong metric for request count.
timer.observeDuration()
we should removetimer.close().
timer.close()
@Override public HttpRestResult<String> httpGet(String path, Map<String, String> headers, Map<String, String> paramValues, String encode, long readTimeoutMs) throws Exception { Histogram.Timer timer = MetricsMonitor.getConfigRequestMonitor("GET", path, "NA"); HttpRestResult<String> result; try { result = httpAgent.httpGet(path, headers, paramValues, encode, readTimeoutMs); } catch (IOException e) { throw e; } finally { timer.observeDuration(); timer.close(); } return result; }
ref https://github.com/prometheus/client_java#histogram
Expected behavior A clear and concise description of what you expected to happen.
Acutally behavior A clear and concise description of what you actually to happen.
How to Reproduce Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
yanlinly
shiyiyue1102
Successfully merging a pull request may close this issue.
Describe the bug
A clear and concise description of what the bug is.
timer.close() is equivalent with
timer.observeDuration()
, so timer will observe twice. then we get wrong metric for request count.we should remove
timer.close()
.ref https://github.com/prometheus/client_java#histogram
Expected behavior
A clear and concise description of what you expected to happen.
Acutally behavior
A clear and concise description of what you actually to happen.
How to Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: