diff --git a/pkg/rpc/http.go b/pkg/rpc/http.go index 9e1b2b86..861f6951 100644 --- a/pkg/rpc/http.go +++ b/pkg/rpc/http.go @@ -23,6 +23,8 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" log "github.com/sirupsen/logrus" + + "github.com/cerc-io/ipld-eth-server/v4/pkg/prom" ) // StartHTTPEndpoint starts the HTTP RPC endpoint, configured with cors/vhosts/modules. @@ -34,6 +36,7 @@ func StartHTTPEndpoint(endpoint string, apis []rpc.API, modules []string, cors [ utils.Fatalf("Could not register HTTP API: %w", err) } handler := node.NewHTTPHandlerStack(srv, cors, vhosts, nil) + handler = prom.HTTPMiddleware(handler) // start http server _, addr, err := node.StartHTTPEndpoint(endpoint, rpc.DefaultHTTPTimeouts, handler)