Skip to content

Commit

Permalink
WIP: Make prometheus handler great again
Browse files Browse the repository at this point in the history
  • Loading branch information
panchoh authored and iknite committed Feb 19, 2019
1 parent c45832f commit 420ebee
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion api/metricshttp/metricshttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import (

func NewMetricsHTTP(r *prometheus.Registry) *http.ServeMux {
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.HandlerFor(r, promhttp.HandlerOpts{}))
mux.Handle(
"/metrics",
promhttp.InstrumentMetricHandler(
r,
promhttp.HandlerFor(
r,
promhttp.HandlerOpts{},
),
),
)
return mux
}

0 comments on commit 420ebee

Please sign in to comment.