Package org.apache.solr.util.stats
Class InstrumentedHttpListenerFactory
- java.lang.Object
-
- org.apache.solr.util.stats.InstrumentedHttpListenerFactory
-
- All Implemented Interfaces:
HttpListenerFactory
,SolrMetricProducer
public class InstrumentedHttpListenerFactory extends Object implements SolrMetricProducer, HttpListenerFactory
A HttpListenerFactory tracks metrics interesting to solr Inspired and partially copied from dropwizard httpclient library
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
InstrumentedHttpListenerFactory.NameStrategy
-
Nested classes/interfaces inherited from interface org.apache.solr.client.solrj.impl.HttpListenerFactory
HttpListenerFactory.RequestResponseListener
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,InstrumentedHttpListenerFactory.NameStrategy>
KNOWN_METRIC_NAME_STRATEGIES
protected SolrMetricManager
metricManager
protected com.codahale.metrics.MetricRegistry
metricsRegistry
protected InstrumentedHttpListenerFactory.NameStrategy
nameStrategy
protected String
registryName
protected String
scope
-
Constructor Summary
Constructors Constructor Description InstrumentedHttpListenerFactory(InstrumentedHttpListenerFactory.NameStrategy nameStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpListenerFactory.RequestResponseListener
get()
void
initializeMetrics(SolrMetricManager manager, String registry, String tag, String scope)
Initializes metrics specific to this producer
-
-
-
Field Detail
-
KNOWN_METRIC_NAME_STRATEGIES
public static final Map<String,InstrumentedHttpListenerFactory.NameStrategy> KNOWN_METRIC_NAME_STRATEGIES
-
metricsRegistry
protected com.codahale.metrics.MetricRegistry metricsRegistry
-
metricManager
protected SolrMetricManager metricManager
-
registryName
protected String registryName
-
scope
protected String scope
-
nameStrategy
protected InstrumentedHttpListenerFactory.NameStrategy nameStrategy
-
-
Constructor Detail
-
InstrumentedHttpListenerFactory
public InstrumentedHttpListenerFactory(InstrumentedHttpListenerFactory.NameStrategy nameStrategy)
-
-
Method Detail
-
get
public HttpListenerFactory.RequestResponseListener get()
- Specified by:
get
in interfaceHttpListenerFactory
-
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 interfaceSolrMetricProducer
- Parameters:
manager
- an instance ofSolrMetricManager
registry
- registry name where metrics are registeredtag
- 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 and is set whenSolrMetricProducer.initializeMetrics(SolrMetricManager, String, String, String)
is called.scope
- scope of the metrics (eg. handler name) to separate metrics of
-
-