Open jeffreyyong opened 5 years ago
Manage to make the Go programme compile, but when it's done like this:
m := martini.New()
m.Use(promhttp.InstrumentHandlerInFlight(metrics.RequestGauge, m))
The whole programme just gets stuck
I was recently looking at adding opencensus instrumentation to orchestrator which uses Martini too. It suggests doing it passing in a custom http.Handler too here
Though I'm looking at writing my own middleware for it instead.
InstrumentHandlerResponseSize func(obs prometheus.ObserverVec, next http.Handler) http.Handler
from thepromhttp
package takes in "http.Handler" and returns a "http.Handler" for instrumenting the response size. However, martini only hasmartini.Handler
which makes it impossible to pass into the promhttp instrumentation function, I'm wondering if it's possible to use martini with prometheuspromhttp
?