211: ipld-eth-server http counters don't work #212

Merged
telackey merged 2 commits from telackey/httpmetrics into v4 2022-12-23 20:07:24 +00:00
Showing only changes of commit 38bab086e9 - Show all commits

View File

@ -35,8 +35,7 @@ func StartHTTPEndpoint(endpoint string, apis []rpc.API, modules []string, cors [
if err != nil { if err != nil {
utils.Fatalf("Could not register HTTP API: %w", err) utils.Fatalf("Could not register HTTP API: %w", err)
} }
handler := node.NewHTTPHandlerStack(srv, cors, vhosts, nil) handler := prom.HTTPMiddleware(node.NewHTTPHandlerStack(srv, cors, vhosts, nil))
handler = prom.HTTPMiddleware(handler)
// start http server // start http server
_, addr, err := node.StartHTTPEndpoint(endpoint, rpc.DefaultHTTPTimeouts, handler) _, addr, err := node.StartHTTPEndpoint(endpoint, rpc.DefaultHTTPTimeouts, handler)