Package com.lucidworks.cloud.api.solr
Class SolrQueryMetrics
java.lang.Object
com.lucidworks.cloud.api.solr.SolrQueryMetrics
- All Implemented Interfaces:
SolrMetricsCollector
Stores metric information accumulated during processing of a Solr query. Provides capability
to capture all the collected information to the various prometheus metrics.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.prometheus.client.Counterstatic final io.prometheus.client.Histogramstatic final io.prometheus.client.Histogramprotected static final org.slf4j.Loggerprotected Instant -
Constructor Summary
ConstructorsConstructorDescriptionSolrQueryMetrics(String collectionId, String requestHandler, String httpMethod) -
Method Summary
Modifier and TypeMethodDescriptionvoidSave the response result of current callvoidcollectWithTime(String metricError, long responseTimeMillis) Collect the metric with external timer value.voidsetTargetInstanceHost(String targetInstanceHost) voidsetTargetInstancePort(String targetInstancePort) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.lucidworks.cloud.api.solr.SolrMetricsCollector
collectError, collectOK
-
Field Details
-
CALL_TIME_SECS
public static final io.prometheus.client.Histogram CALL_TIME_SECS -
CALL_OUTCOME_TOTAL
public static final io.prometheus.client.Counter CALL_OUTCOME_TOTAL -
COLLECTION_CALL_TIME_SECS
public static final io.prometheus.client.Histogram COLLECTION_CALL_TIME_SECS -
log
protected static final org.slf4j.Logger log -
startTime
-
-
Constructor Details
-
SolrQueryMetrics
- Parameters:
collectionId- collection ID the solr query is for (null if not for a collection)requestHandler- request handler being queried (null if not querying a request handler)httpMethod- httpmethod being used to issue the query
-
-
Method Details
-
collectWithTime
Description copied from interface:SolrMetricsCollectorCollect the metric with external timer value.- Specified by:
collectWithTimein interfaceSolrMetricsCollector
-
setTargetInstancePort
-
setTargetInstanceHost
-
collect
Description copied from interface:SolrMetricsCollectorSave the response result of current call- Specified by:
collectin interfaceSolrMetricsCollector- Parameters:
metricError- - error which occurred during the response, Http status code or exception class name. In case of no error use "none".
-