Interface MetricCollector<T,I extends io.prometheus.client.Collector>
- Type Parameters:
T
- - any subclass ofSimpleCollector
- All Known Implementing Classes:
BaseMetricCollector
,BuildAbortedCounter
,BuildDiscardGauge
,BuildDurationGauge
,BuildDurationSummary
,BuildFailedCounter
,BuildLikelyStuckGauge
,BuildLogFileSizeGauge
,BuildResultGauge
,BuildResultOrdinalGauge
,BuildsMetricCollector
,BuildStartGauge
,BuildSuccessfulCounter
,BuildTotalCounter
,BuildUnstableCounter
,BuildWaitingDurationGauge
,CoverageBranchCoveredGauge
,CoverageBranchMissedGauge
,CoverageBranchPercentGauge
,CoverageBranchTotalGauge
,CoverageClassCoveredGauge
,CoverageClassMissedGauge
,CoverageClassPercentGauge
,CoverageClassTotalGauge
,CoverageFileCoveredGauge
,CoverageFileMissedGauge
,CoverageFilePercentGauge
,CoverageFileTotalGauge
,CoverageInstructionCoveredGauge
,CoverageInstructionMissedGauge
,CoverageInstructionPercentGauge
,CoverageInstructionTotalGauge
,CoverageLineCoveredGauge
,CoverageLineMissedGauge
,CoverageLinePercentGauge
,CoverageLineTotalGauge
,CoverageMetricsCollector
,CurrentRunDurationGauge
,DiskUsageBytesGauge
,DiskUsageFileCountGauge
,ExecutorsAvailableGauge
,ExecutorsBusyGauge
,ExecutorsConnectingGauge
,ExecutorsDefinedGauge
,ExecutorsIdleGauge
,ExecutorsOnlineGauge
,ExecutorsQueueLengthGauge
,FailedTestsGauge
,FileStoreAvailableGauge
,FileStoreCapacityGauge
,HealthScoreGauge
,JenkinsQuietDownGauge
,JenkinsUpGauge
,JenkinsUptimeGauge
,JenkinsVersionInfo
,JobUsageBytesGauge
,LogUpdatedGauge
,NbBuildsGauge
,NodesOnlineGauge
,NoOpMetricCollector
,SkippedTestsGauge
,StageBuildResultOrdinalGauge
,StageSummary
,TestBasedMetricCollector
,TotalTestsGauge
public interface MetricCollector<T,I extends io.prometheus.client.Collector>
Implementations of this interface shall be able to construct and calculate any subclass of
SimpleCollector
-
Method Summary
Modifier and TypeMethodDescriptionvoid
calculateMetric
(T jenkinsObject, String[] labelValues) This method contains the logic to calculate a metric value based on the given Jenkins object (e.g.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 Details
-
calculateMetric
This method contains the logic to calculate a metric value based on the given Jenkins object (e.g. Job, Run,...) -
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
-