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

ResponseHandler in Forwarder called twice per request #618

Closed
mcweba opened this issue Dec 5, 2024 · 1 comment
Closed

ResponseHandler in Forwarder called twice per request #618

mcweba opened this issue Dec 5, 2024 · 1 comment

Comments

@mcweba
Copy link
Collaborator

mcweba commented Dec 5, 2024

In the Forwarder class, the handler holding the HttpClientResponseis called twice for every request.

This is visible when a log statement is added and with enabled micrometer metrics it is also visible in the gateleen_forwarded_seconds_count and gateleen_forwarded_seconds_sum entries

In this example, 1 request with a delay of 2 seconds was made. The sum is twice the 2 seconds and also the count is double of the effectively executed requests.

gateleen_forwarded_total{metricName="forwarder-test-rule",type="local",} 1.0
gateleen_forwarded_seconds_count{metricName="forwarder-test-rule",type="local",} 2.0
gateleen_forwarded_seconds_sum{metricName="forwarder-test-rule",type="local",} 4.021027708

Calling the response handler twice could also have other impacts which where not yet revealed.

@mcweba
Copy link
Collaborator Author

mcweba commented Jan 6, 2025

Released in v2.1.14

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