JobCollector collects metrics for jobs. Designed for batch jobs which run on a regular, not-too-frequent, non-overlapping interval. We can afford to measure duration directly with gauges, and compute quantile with quantile_over_time.
| 86 | // not-too-frequent, non-overlapping interval. We can afford to measure duration directly |
| 87 | // with gauges, and compute quantile with quantile_over_time. |
| 88 | type JobCollector struct { |
| 89 | start, end, duration *prometheus.GaugeVec |
| 90 | started, completed *prometheus.CounterVec |
| 91 | } |
| 92 | |
| 93 | // NewJobCollector instantiates JobCollector which creates its metrics. |
| 94 | func NewJobCollector(namespace string) *JobCollector { |
nothing calls this directly
no outgoing calls
no test coverage detected