-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Instrumentations for Apache HttpComponents do not meter errors and leak memory #3800
Comments
I dig a bit deeper into this. As it stands right now, The httpcomponents binder is not able to meter connection related IO errors like connection-refused or connection-timeout, TLS handshake related errors, etc. This affects both the classic and the async client. I committed test cases to #3801 to highlight the issue. Bummer. Implemented in #3801 is a measurement of IO errors during an active http request, for example socket read timeouts. This brings the async implementation on par with classic. |
As it stands right now, the httpcomponents binder does not only miss connection related errors - the time necessary to establish a connection is not metered at all. #3801 has changed the instrumentation to use ExecChainHandler instead of Request/Response interceptor to address this issue. |
Backport to 4.x would require to Subclass |
This commit replaces the request and response Interceptors for the "classic" and "async" clients by `AsyncExecChainHandler` and `ExecChainHandler` implementations. See gh-3800
This commit reinstates the former HttpComponents instrumentation for 4.x and 5.x, in a deprecated fashion for 5.x since it will be replaced by the `ObservationExecChainHandler` in this dedicated issue. See gh-3800
Describe the bug
An HttpAsyncClient instrumented with MicrometerHttpClientInterceptor does not meter IO errors.
For example, requests resulting in a
ConnectTimeoutException
,SocketTimeoutException
are not metered.MicrometerHttpRequestExecutor
however does meter IO errors by setting thestatus
key to IO_ERROR.Environment
To Reproduce
How to reproduce the bug:
Make an instrumented client to run into some sort of IO Exception, ConnectTimeoutException, SocketTimeoutException, etc.
Expected behavior
Additional context
The Apache Http Components instrumentation does not support the tag exception, which is quite commonly used by other http client instrumentations.
The text was updated successfully, but these errors were encountered: