wrap standard net/http handler
menta2k opened this issue · 2 comments
First of all I am not sure maybe there is an work around for that but i cant find it.
Here is the use case:
I like to use opencensus.io for request tracking and prometheus for metrics export.
If you are using standard net/http you can do that like this
import "contrib.go.opencensus.io/exporter/prometheus"
// Then create the actual exporter
pe, err := prometheus.NewExporter(prometheus.Options{
Namespace: "demo",
})
pe is http.handler
Probably if you are using standalone fasthttp you can use fasthttpadaptor to wrap the net/http handler.
Are there an option to attach fasthttp.RequestHandler directly to the gearbox ?
Issue-Label Bot is automatically applying the label enhancement
to this issue, with a confidence of 0.65. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
I just found https://github.com/gogearbox/netadaptor