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 exportMetrictoDataPointSnapshotand register to aSolrPrometheusFormatter.MetricRegistrydoes 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.MetricdropwizardMetricMap<String,String>labelsStringmetricName
-
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.LabelsgetLabels()abstract SolrMetricparseLabels()abstract voidtoPrometheus(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()
-
-