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