Class MicrometerHttpRequestExecutor
java.lang.Object
org.apache.hc.core5.http.impl.io.HttpRequestExecutor
io.micrometer.core.instrument.binder.httpcomponents.hc5.MicrometerHttpRequestExecutor
@Deprecated
public class MicrometerHttpRequestExecutor
extends org.apache.hc.core5.http.impl.io.HttpRequestExecutor
Deprecated.
This instruments the execution of every request that goes through an
HttpClient
on which it is configured. It
must be registered as request executor when creating the HttpClient instance. For
example:
HttpClientBuilder.create() .setRequestExecutor(MicrometerHttpRequestExecutor .builder(meterRegistry) .build()) .build();
- Since:
- 1.11.0
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.hc.core5.http.impl.io.HttpRequestExecutor
DEFAULT_WAIT_FOR_CONTINUE
-
Method Summary
Modifier and TypeMethodDescriptionbuilder
(MeterRegistry registry) Deprecated.Use this method to create an instance ofMicrometerHttpRequestExecutor
.org.apache.hc.core5.http.ClassicHttpResponse
execute
(org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.io.HttpClientConnection conn, org.apache.hc.core5.http.protocol.HttpContext context) Deprecated.Methods inherited from class org.apache.hc.core5.http.impl.io.HttpRequestExecutor
builder, execute, keepAlive, postProcess, preProcess
-
Method Details
-
builder
Deprecated.Use this method to create an instance ofMicrometerHttpRequestExecutor
.- Parameters:
registry
- The registry to register the metrics to.- Returns:
- An instance of the builder, which allows further configuration of the request executor.
-
execute
public org.apache.hc.core5.http.ClassicHttpResponse execute(org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.io.HttpClientConnection conn, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException, org.apache.hc.core5.http.HttpException Deprecated.- Overrides:
execute
in classorg.apache.hc.core5.http.impl.io.HttpRequestExecutor
- Throws:
IOException
org.apache.hc.core5.http.HttpException
-
ObservationExecChainHandler
.