Class FailedTestsGauge

All Implemented Interfaces:
MetricCollector<Run<?,?>,io.prometheus.client.Gauge>

public class FailedTestsGauge extends TestBasedMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
  • Constructor Details

    • FailedTestsGauge

      protected FailedTestsGauge(String[] labelNames, String namespace, String subsystem, String namePrefix)
  • Method Details

    • getCollectorType

      protected CollectorType getCollectorType()
      Specified by:
      getCollectorType in class BaseMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
      Returns:
      - the name of the collector without subsystem, namespace, prefix
    • getHelpText

      protected String getHelpText()
      Specified by:
      getHelpText in class BaseMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
      Returns:
      - the help text which should be displayed
    • getCollectorBuilder

      protected io.prometheus.client.SimpleCollector.Builder<?,io.prometheus.client.Gauge> getCollectorBuilder()
      Specified by:
      getCollectorBuilder in class BaseMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
      Returns:
      - builder object of the type of collector
    • calculateMetric

      public void calculateMetric(Run<?,?> 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<Run<?,?>,io.prometheus.client.Gauge>
      Specified by:
      calculateMetric in class BaseMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
      Parameters:
      jenkinsObject - - Examples: Job, Run
      labelValues - - The label values for the calculation