Class NoOpMetricCollector<T,​I extends io.prometheus.client.Collector>

  • All Implemented Interfaces:
    MetricCollector<T,​I>

    public class NoOpMetricCollector<T,​I extends io.prometheus.client.Collector>
    extends Object
    implements MetricCollector<T,​I>
    • Constructor Detail

      • NoOpMetricCollector

        public NoOpMetricCollector()
    • 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 interface MetricCollector<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 interface MetricCollector<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 interface MetricCollector<T,​I extends io.prometheus.client.Collector>
        Returns:
        the full name of the collector