Skip to content

Commit

Permalink
feat: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehao committed Sep 11, 2023
1 parent d06a6d9 commit 10977c8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions common/observability/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/gin-contrib/pprof"
"github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/scroll-tech/go-ethereum/log"
"github.com/urfave/cli/v2"
Expand All @@ -22,7 +21,7 @@ import (

// Server starts the metrics server on the given address, will be closed when the given
// context is canceled.
func Server(c *cli.Context, reg *prometheus.Registry, db *gorm.DB) {
func Server(c *cli.Context, db *gorm.DB) {
if !c.Bool(utils.MetricsEnabled.Name) {
return
}
Expand Down
2 changes: 1 addition & 1 deletion coordinator/cmd/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func action(ctx *cli.Context) error {
}

registry := prometheus.DefaultRegisterer
observability.Server(ctx, registry.(*prometheus.Registry), db)
observability.Server(ctx, db)

proofCollector := cron.NewCollector(subCtx, db, cfg, registry)
defer func() {
Expand Down
2 changes: 1 addition & 1 deletion prover-stats-api/cmd/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func action(ctx *cli.Context) error {
}()

registry := prometheus.DefaultRegisterer
observability.Server(ctx, registry.(*prometheus.Registry), db)
observability.Server(ctx, db)

// init Prover Stats API
port := ctx.String(httpPortFlag.Name)
Expand Down
1 change: 0 additions & 1 deletion prover-stats-api/test/prover_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func getResp(t *testing.T, url string) interface{} {

res := new(types.Response)
assert.NoError(t, json.Unmarshal(byt, res))
t.Log("----byt is ", string(byt))
assert.Equal(t, types.Success, res.ErrCode)
return res.Data
}
Expand Down
2 changes: 1 addition & 1 deletion rollup/cmd/event_watcher/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func action(ctx *cli.Context) error {
}()

registry := prometheus.DefaultRegisterer
observability.Server(ctx, registry.(*prometheus.Registry), db)
observability.Server(ctx, db)
l1client, err := ethclient.Dial(cfg.L1Config.Endpoint)
if err != nil {
log.Error("failed to connect l1 geth", "config file", cfgFile, "error", err)
Expand Down
2 changes: 1 addition & 1 deletion rollup/cmd/gas_oracle/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func action(ctx *cli.Context) error {
}()

registry := prometheus.DefaultRegisterer
observability.Server(ctx, registry.(*prometheus.Registry), db)
observability.Server(ctx, db)

l1client, err := ethclient.Dial(cfg.L1Config.Endpoint)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion rollup/cmd/rollup_relayer/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func action(ctx *cli.Context) error {
}()

registry := prometheus.DefaultRegisterer
observability.Server(ctx, registry.(*prometheus.Registry), db)
observability.Server(ctx, db)

// Init l2geth connection
l2client, err := ethclient.Dial(cfg.L2Config.Endpoint)
Expand Down

0 comments on commit 10977c8

Please sign in to comment.