Skip to content

Commit

Permalink
Add Golang metrics into the metrics repository
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniotsi committed Mar 30, 2023
1 parent 1c30347 commit 03160b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (m *Metrics) Run(ctx context.Context, addr string) {
metricsRegistry := prometheus.NewRegistry()
metricsRegistry.MustRegister(collectors.NewGoCollector(), m)
http.Handle("/metrics", promhttp.HandlerFor(metricsRegistry, promhttp.HandlerOpts{}))

log.Info("starting metrics server")
if err := http.ListenAndServe(addr, nil); err != nil {
log.Fatalw("failed to start metrics server", zap.Error(err))
Expand Down

0 comments on commit 03160b5

Please sign in to comment.