diff --git a/cmd/thor/flags.go b/cmd/thor/flags.go index 03596c074..b167f6ae8 100644 --- a/cmd/thor/flags.go +++ b/cmd/thor/flags.go @@ -123,9 +123,9 @@ var ( Name: "disable-pruner", Usage: "disable state pruner to keep all history", } - metricsFlag = cli.BoolFlag{ - Name: "metrics-enabled", - Usage: "enables metrics collection and", + metricsEnabledFlag = cli.BoolFlag{ + Name: "enable-metrics", + Usage: "enables metrics collection", } metricsAddrFlag = cli.StringFlag{ Name: "metrics-addr", diff --git a/cmd/thor/main.go b/cmd/thor/main.go index 1ccf80a3b..4dabd0654 100644 --- a/cmd/thor/main.go +++ b/cmd/thor/main.go @@ -89,7 +89,7 @@ func main() { pprofFlag, verifyLogsFlag, disablePrunerFlag, - metricsFlag, + metricsEnabledFlag, metricsAddrFlag, }, Action: defaultAction, @@ -117,7 +117,7 @@ func main() { txPoolLimitFlag, txPoolLimitPerAccountFlag, disablePrunerFlag, - metricsFlag, + metricsEnabledFlag, metricsAddrFlag, }, Action: soloAction, @@ -150,7 +150,7 @@ func defaultAction(ctx *cli.Context) error { // enable metrics as soon as possible metricsURL := "" - if ctx.Bool(metricsFlag.Name) { + if ctx.Bool(metricsEnabledFlag.Name) { metrics.InitializePrometheusMetrics() url, close, err := startMetricsServer(ctx.String(metricsAddrFlag.Name)) if err != nil { @@ -270,7 +270,7 @@ func soloAction(ctx *cli.Context) error { // enable metrics as soon as possible metricsURL := "" - if ctx.Bool(metricsFlag.Name) { + if ctx.Bool(metricsEnabledFlag.Name) { metrics.InitializePrometheusMetrics() url, close, err := startMetricsServer(ctx.String(metricsAddrFlag.Name)) if err != nil {