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 interfaceInstrumentedHttpListenerFactory.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_STRATEGIESprotected SolrMetricManagermetricManagerprotected com.codahale.metrics.MetricRegistrymetricsRegistryprotected InstrumentedHttpListenerFactory.NameStrategynameStrategyprotected StringregistryNameprotected Stringscope
-
Constructor Summary
Constructors Constructor Description InstrumentedHttpListenerFactory(InstrumentedHttpListenerFactory.NameStrategy nameStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpListenerFactory.RequestResponseListenerget()voidinitializeMetrics(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:
getin interfaceHttpListenerFactory
-
initializeMetrics
public void initializeMetrics(SolrMetricManager manager, String registry, String tag, String scope)
Description copied from interface:SolrMetricProducerInitializes metrics specific to this producer- Specified by:
initializeMetricsin interfaceSolrMetricProducer- Parameters:
manager- an instance ofSolrMetricManagerregistry- 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
-
-