feat(observability):add ready&health check api for k8s (#938)

Co-authored-by: georgehao <georgehao@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
This commit is contained in:
georgehao
2023-09-11 19:22:19 +08:00
committed by GitHub
parent 4d3ff66446
commit 0730e91292
45 changed files with 361 additions and 179 deletions

View File

@@ -13,7 +13,7 @@ import (
"github.com/urfave/cli/v2"
"scroll-tech/common/database"
"scroll-tech/common/metrics"
"scroll-tech/common/observability"
"scroll-tech/common/utils"
"scroll-tech/common/version"
@@ -64,7 +64,7 @@ func action(ctx *cli.Context) error {
}()
registry := prometheus.DefaultRegisterer
metrics.Server(ctx, registry.(*prometheus.Registry))
observability.Server(ctx, db)
// Init l2geth connection
l2client, err := ethclient.Dial(cfg.L2Config.Endpoint)