MCPcopy
hub / github.com/prometheus/client_golang / Collect

Method Collect

prometheus/collector.go:62–62  ·  view source on GitHub ↗

Collect is called by the Prometheus registry when collecting metrics. The implementation sends each collected metric via the provided channel and returns once the last metric has been sent. The descriptor of each sent metric is one of those returned by Describe (unless the Collector is unchecked, se

(chan<- Metric)

Source from the content-addressed store, hash-verified

60 // of total performance of rendering all registered metrics. Ideally,
61 // Collector implementations support concurrent readers.
62 Collect(chan<- Metric)
63}
64
65// DescribeByCollect is a helper to implement the Describe method of a custom

Callers 15

TestGoCollectorGCFunction · 0.65
BenchmarkGoCollectorFunction · 0.65
CollectMethod · 0.65
collectGoMetricsFunction · 0.65
CollectMethod · 0.65
CollectMethod · 0.65
TestGoCollectorMemStatsFunction · 0.65
CollectMethod · 0.65
CollectMethod · 0.65

Implementers 15

processCollectorprometheus/process_collector.go
ClusterManagerCollectorprometheus/example_clustermanager_test
goCollectorprometheus/go_collector_latest.go
baseGoCollectorprometheus/go_collector.go
wrappingCollectorprometheus/wrap.go
MetricVecprometheus/vec.go
metricMapprometheus/vec.go
collectorDescribedByCollectprometheus/collector_test.go
uncheckedCollectorprometheus/wrap_test.go
collidingCollectorprometheus/registry_test.go
customCollectorprometheus/registry_test.go
Registryprometheus/registry.go

Calls

no outgoing calls

Tested by 12

TestGoCollectorGCFunction · 0.52
BenchmarkGoCollectorFunction · 0.52
collectGoMetricsFunction · 0.52
TestGoCollectorMemStatsFunction · 0.52
CollectMethod · 0.52
TestProcessCollectorFunction · 0.52
CollectMethod · 0.52
CollectMethod · 0.52
TestCollectorFuncFunction · 0.52