Class InstrumentedHttpRequestExecutor

  • All Implemented Interfaces:
    AutoCloseable, SolrMetricProducer

    public class InstrumentedHttpRequestExecutor
    extends org.apache.http.protocol.HttpRequestExecutor
    implements SolrMetricProducer
    Sub-class of HttpRequestExecutor which tracks metrics interesting to solr Inspired and partially copied from dropwizard httpclient library
    • Method Detail

      • execute

        public org.apache.http.HttpResponse execute​(org.apache.http.HttpRequest request,
                                                    org.apache.http.HttpClientConnection conn,
                                                    org.apache.http.protocol.HttpContext context)
                                             throws IOException,
                                                    org.apache.http.HttpException
        Overrides:
        execute in class org.apache.http.protocol.HttpRequestExecutor
        Throws:
        IOException
        org.apache.http.HttpException
      • initializeMetrics

        public void initializeMetrics​(SolrMetricManager manager,
                                      String registry,
                                      String tag,
                                      String scope)
        Description copied from interface: SolrMetricProducer
        Initializes metrics specific to this producer
        Specified by:
        initializeMetrics in interface SolrMetricProducer
        Parameters:
        manager - an instance of SolrMetricManager
        registry - registry name where metrics are registered
        tag - a symbolic tag that represents this instance of the producer, or a group of related instances that have the same life-cycle. This tag is used when managing life-cycle of some metrics.
        scope - scope of the metrics (eg. handler name) to separate metrics of components with the same implementation but different scope.