Skip to content

Commit

Permalink
211: ipld-eth-server http counters don't work (#212)
Browse files Browse the repository at this point in the history
* 211: ipld-eth-server http counters don't work

* On one line is fine
  • Loading branch information
telackey committed Dec 23, 2022
1 parent 721a728 commit 8c55b63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/rpc/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -33,7 +35,7 @@ func StartHTTPEndpoint(endpoint string, apis []rpc.API, modules []string, cors [
if err != nil {
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))

// start http server
_, addr, err := node.StartHTTPEndpoint(endpoint, rpc.DefaultHTTPTimeouts, handler)
Expand Down

0 comments on commit 8c55b63

Please sign in to comment.