MCPcopy
hub / github.com/grafana/dskit / JobCollector

Struct JobCollector

instrument/instrument.go:88–91  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

86// not-too-frequent, non-overlapping interval. We can afford to measure duration directly
87// with gauges, and compute quantile with quantile_over_time.
88type JobCollector struct {
89 start, end, duration *prometheus.GaugeVec
90 started, completed *prometheus.CounterVec
91}
92
93// NewJobCollector instantiates JobCollector which creates its metrics.
94func NewJobCollector(namespace string) *JobCollector {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected