Skip to content

Commit

Permalink
Add collectors for process go's garbage collector
Browse files Browse the repository at this point in the history
  • Loading branch information
panchoh authored and iknite committed Feb 19, 2019
1 parent 420ebee commit 05f3728
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ func NewServer(conf *Config) (*Server, error) {
metrics.Register(r)
server.prometheusRegistry = r
metricsMux := metricshttp.NewMetricsHTTP(r)

r.MustRegister(
prometheus.NewProcessCollector(
prometheus.ProcessCollectorOpts{},
),
)
r.MustRegister(
prometheus.NewGoCollector(),
)

server.metricsServer = newHTTPServer("localhost:9990", metricsMux)
}

Expand Down

0 comments on commit 05f3728

Please sign in to comment.