Class NoOpMetricCollector<T,I extends io.prometheus.client.Collector>
- java.lang.Object
-
- org.jenkinsci.plugins.prometheus.collectors.NoOpMetricCollector<T,I>
-
- All Implemented Interfaces:
MetricCollector<T,I>
public class NoOpMetricCollector<T,I extends io.prometheus.client.Collector> extends Object implements MetricCollector<T,I>
-
-
Constructor Summary
Constructors Constructor Description NoOpMetricCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculateMetric(T jenkinsObject, String[] labelValues)
This method contains the logic to calculate a metric value based on the given Jenkins object (e.g.String
calculateName()
Calling this method will return the resulting name of the metric with base name and prefixList<io.prometheus.client.Collector.MetricFamilySamples>
collect()
Calling this method basically calls I.collect()
-
-
-
Method Detail
-
calculateMetric
public void calculateMetric(T jenkinsObject, String[] labelValues)
Description copied from interface:MetricCollector
This method contains the logic to calculate a metric value based on the given Jenkins object (e.g. Job, Run,...)- Specified by:
calculateMetric
in interfaceMetricCollector<T,I extends io.prometheus.client.Collector>
- Parameters:
jenkinsObject
- - Examples:Job
,Run
labelValues
- - The label values for the calculation
-
collect
public List<io.prometheus.client.Collector.MetricFamilySamples> collect()
Description copied from interface:MetricCollector
Calling this method basically calls I.collect()- Specified by:
collect
in interfaceMetricCollector<T,I extends io.prometheus.client.Collector>
-
calculateName
public String calculateName()
Description copied from interface:MetricCollector
Calling this method will return the resulting name of the metric with base name and prefix- Specified by:
calculateName
in interfaceMetricCollector<T,I extends io.prometheus.client.Collector>
- Returns:
- the full name of the collector
-
-