Skip to content

Commit

Permalink
Change function call so it does not look like an struct
Browse files Browse the repository at this point in the history
  • Loading branch information
gdiazlo committed Mar 19, 2019
1 parent 6cbe080 commit 4ee600e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/metricshttp/metricshttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ func NewMetricsHTTP(r *prometheus.Registry) *http.ServeMux {
prometheus.DefaultGatherer,
r,
}
mux.Handle(
"/metrics",
promhttp.InstrumentMetricHandler(r, promhttp.HandlerFor(g, promhttp.HandlerOpts{})),
)

handler := promhttp.HandlerFor(g, promhttp.HandlerOpts{})
instrumentedHandler := promhttp.InstrumentMetricHandler(r, handler)
mux.Handle("/metrics", instrumentedHandler)
return mux
}

0 comments on commit 4ee600e

Please sign in to comment.