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

Function NewGoCollector

prometheus/collectors/go_collector_go116.go:47–49  ·  view source on GitHub ↗

NewGoCollector returns a collector that exports metrics about the current Go process. This includes memory stats. To collect those, runtime.ReadMemStats is called. This requires to “stop the world”, which usually only happens for garbage collection (GC). Take the following implications into account

()

Source from the content-addressed store, hash-verified

45// NOTE: The problem is solved in Go 1.15, see
46// https://github.com/golang/go/issues/19812 for the related Go issue.
47func NewGoCollector() prometheus.Collector {
48 return prometheus.NewGoCollector()
49}

Calls 1

NewGoCollectorFunction · 0.92