Instrumentations for Apache HttpComponents do not meter errors and leak memory (original) (raw)

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 the status 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.