Interface MetricCollector<T,​I extends io.prometheus.client.Collector>

    • Method Summary

      All Methods Instance Methods Abstract 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 prefix
      List<io.prometheus.client.Collector.MetricFamilySamples> collect()
      Calling this method basically calls I.collect()
    • Method Detail

      • calculateMetric

        void calculateMetric​(T jenkinsObject,
                             String[] labelValues)
        This method contains the logic to calculate a metric value based on the given Jenkins object (e.g. Job, Run,...)
        Parameters:
        jenkinsObject - - Examples: Job, Run
        labelValues - - The label values for the calculation
      • collect

        List<io.prometheus.client.Collector.MetricFamilySamples> collect()
        Calling this method basically calls I.collect()
      • calculateName

        String calculateName()
        Calling this method will return the resulting name of the metric with base name and prefix
        Returns:
        the full name of the collector