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

"spring.cloud.gateway.requests" metric not incremented for subsequent cached responses #3347

Open
ipalbeniz opened this issue Apr 10, 2024 · 0 comments

Comments

@ipalbeniz
Copy link

Describe the bug
I'm encountering an issue with the spring.cloud.gateway.requests metric not being incremented for subsequent calls to a route using LocalResponseCache filter.

Expected behavior
I expect the metric to be incremented for each request, regardless of whether the response is served from the cache.

Sample

  1. Run the attached demo-gateway.zip application.
  2. Call the route (http://localhost:8080/ip) using curl 5 times: curl http://localhost:8080/ip
  3. Check the spring.cloud.gateway.requests metric using: curl http://localhost:8080/actuator/metrics/spring.cloud.gateway.requests | jq.
  4. You will likely see that the COUNT measurement remains at 1, even though the route was called 5 times.
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

1 participant