MCPcopy Index your code
hub / github.com/coder/coder / MetricsAggregator

Struct MetricsAggregator

coderd/prometheusmetrics/aggregator.go:45–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45type MetricsAggregator struct {
46 store map[metricKey]annotatedMetric
47
48 log slog.Logger
49 metricsCleanupInterval time.Duration
50 clock quartz.Clock
51
52 collectCh chan (chan []prometheus.Metric)
53 updateCh chan updateRequest
54
55 storeSizeGauge prometheus.Gauge
56 updateHistogram prometheus.Histogram
57 cleanupHistogram prometheus.Histogram
58 aggregateByLabels []string
59 // per-aggregator cache of descriptors
60 descCache map[string]descCacheEntry
61}
62
63type updateRequest struct {
64 username string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected