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

Function NewGoCollector

prometheus/collectors/go_collector_latest.go:164–167  ·  view source on GitHub ↗

NewGoCollector returns a collector that exports metrics about the current Go process using debug.GCStats (base metrics) and runtime/metrics (both in MemStats style and new ones).

(opts ...func(o *internal.GoCollectorOptions))

Source from the content-addressed store, hash-verified

162// NewGoCollector returns a collector that exports metrics about the current Go
163// process using debug.GCStats (base metrics) and runtime/metrics (both in MemStats style and new ones).
164func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) prometheus.Collector {
165 //nolint:staticcheck // Ignore SA1019 until v2.
166 return prometheus.NewGoCollector(opts...)
167}

Callers 6

mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
runMainFunction · 0.92

Calls 1

NewGoCollectorFunction · 0.92

Tested by

no test coverage detected