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

The in-use client endpoint metric is incremented when request reset is called. #119

Open
dlfcn opened this issue Dec 19, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@dlfcn
Copy link

dlfcn commented Dec 19, 2024

Questions

Why is the in-use counter incremented when a request reset happens?

Version

4.5.4

Context

While testing an HTTP service I noticed the in-use client enpoint metric kept increasing and would not return to a zero value when traffic was stopped. Other metrics showed request timeouts were occuring. Looking at the EndpointMetric implementation I saw that the in-use counter is incremented instead of being dercemented. This results in the in-use counter getting incremented twice, one increment when a request is sent, and another inrement when a timeout occurs.

Do you have a reproducer?

https://github.com/dlfcn/in-use-client-endpoint-metric-test/blob/master/src/test/java/InUseClientEndpointMetricTest.java

Steps to reproduce

  1. Create Vertx instance with DropwizardMetricsServiceImpl.
  2. Create HTTP server that does not send a response.
  3. Create WebClient with a MetricsName and Vertx instance and send request to HTTP server.
  4. Expect the request sent by the WebClient to timeout.
  5. Get metrics snapshot from metrics service and assert in-use value is zero.

Extra

None.

@dlfcn dlfcn added the bug label Dec 19, 2024
@tsegismont tsegismont added this to the 4.5.12 milestone Jan 3, 2025
@tsegismont tsegismont self-assigned this Jan 3, 2025
@vietj vietj modified the milestones: 4.5.12, 4.5.13 Jan 23, 2025
@vietj vietj modified the milestones: 4.5.13, 4.5.14 Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants