Class SolrMetric
- java.lang.Object
-
- org.apache.solr.metrics.prometheus.SolrMetric
-
- Direct Known Subclasses:
SolrCoreMetric
,SolrJettyMetric
,SolrJvmMetric
,SolrNodeMetric
,SolrNoOpMetric
public abstract class SolrMetric extends Object
Base class is a wrapper to categorize and exportMetric
toDataPointSnapshot
and register to aSolrPrometheusFormatter
.MetricRegistry
does not support tags unlike prometheus. Metrics registered to the registry need to be parsed out from the metric name to be exported toDataPointSnapshot
-
-
Field Summary
Fields Modifier and Type Field Description com.codahale.metrics.Metric
dropwizardMetric
Map<String,String>
labels
String
metricName
-
Constructor Summary
Constructors Constructor Description SolrMetric()
SolrMetric(com.codahale.metrics.Metric dropwizardMetric, String metricName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description io.prometheus.metrics.model.snapshots.Labels
getLabels()
abstract SolrMetric
parseLabels()
abstract void
toPrometheus(SolrPrometheusFormatter formatter)
-
-
-
Constructor Detail
-
SolrMetric
public SolrMetric()
-
SolrMetric
public SolrMetric(com.codahale.metrics.Metric dropwizardMetric, String metricName)
-
-
Method Detail
-
parseLabels
public abstract SolrMetric parseLabels()
-
toPrometheus
public abstract void toPrometheus(SolrPrometheusFormatter formatter)
-
getLabels
public io.prometheus.metrics.model.snapshots.Labels getLabels()
-
-