mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 19:50:36 +00:00
erigon_info metric (#7769)
This commit is contained in:
parent
3542298664
commit
7bad6d3fd9
@ -8,6 +8,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/VictoriaMetrics/metrics"
|
||||||
"github.com/ledgerwatch/erigon-lib/common/dbg"
|
"github.com/ledgerwatch/erigon-lib/common/dbg"
|
||||||
"github.com/ledgerwatch/log/v3"
|
"github.com/ledgerwatch/log/v3"
|
||||||
"github.com/pelletier/go-toml"
|
"github.com/pelletier/go-toml"
|
||||||
@ -58,7 +59,10 @@ func runErigon(cliCtx *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// initializing the node and providing the current git commit there
|
// initializing the node and providing the current git commit there
|
||||||
|
|
||||||
logger.Info("Build info", "git_branch", params.GitBranch, "git_tag", params.GitTag, "git_commit", params.GitCommit)
|
logger.Info("Build info", "git_branch", params.GitBranch, "git_tag", params.GitTag, "git_commit", params.GitCommit)
|
||||||
|
erigonInfoGauge := metrics.GetOrCreateCounter(fmt.Sprintf(`erigon_info{version="%s",commit="%s"}`, params.Version, params.GitCommit))
|
||||||
|
erigonInfoGauge.Set(1)
|
||||||
|
|
||||||
nodeCfg := node.NewNodConfigUrfave(cliCtx, logger)
|
nodeCfg := node.NewNodConfigUrfave(cliCtx, logger)
|
||||||
ethCfg := node.NewEthConfigUrfave(cliCtx, nodeCfg, logger)
|
ethCfg := node.NewEthConfigUrfave(cliCtx, nodeCfg, logger)
|
||||||
|
Loading…
Reference in New Issue
Block a user