Active client requests metric is not decreased in case of cancelled request
Describe the bug
Hello, I'm experiencing an issue with Spring Cloud Gateway where the http_client_requests_active_seconds_count metric does not decrease when an inbound HTTP request is cancelled by the client. This leads to an inaccurate count of active client requests, which increases indefinitely with each cancelled request.
Environment:
- Spring Boot Version: 3.3.6
- Spring Cloud Version: 2023.0.4
- Spring Cloud Gateway Version: 4.1.6
Sample Please see demo project with steps to reproduce.
Expected behaviour
The http_client_requests_active_seconds_count metric should decrement when a client cancels an inbound HTTP request, accurately reflecting the number of active outbound client requests.
Is this a known issue with Spring Cloud Gateway or Micrometer? Are there any recommended workarounds or configurations to ensure the metric decrements upon request cancellation?
Thank you for your assistance in resolving this issue.
+1