Skip to content

Commit

Permalink
Add Golang metrics into the metrics repository
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Si <[email protected]>
  • Loading branch information
antoniotsi committed Apr 6, 2023
1 parent 037dc40 commit 331b873
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 331b873

Please sign in to comment.