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.
since 1.12.0 in favor of ObservationExecChainHandler.
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

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated.
     
  • Field Summary

    Fields inherited from class org.apache.hc.core5.http.impl.io.HttpRequestExecutor

    DEFAULT_WAIT_FOR_CONTINUE
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Use this method to create an instance of MicrometerHttpRequestExecutor.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • builder

      public static MicrometerHttpRequestExecutor.Builder builder(MeterRegistry registry)
      Deprecated.
      Use this method to create an instance of MicrometerHttpRequestExecutor.
      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 class org.apache.hc.core5.http.impl.io.HttpRequestExecutor
      Throws:
      IOException
      org.apache.hc.core5.http.HttpException