aboutsummaryrefslogtreecommitdiffstats
path: root/metrics/metrics.go
diff options
context:
space:
mode:
Diffstat (limited to 'metrics/metrics.go')
-rw-r--r--metrics/metrics.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go
index afdfd89fa..c82661d80 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -30,6 +30,7 @@ import (
// MetricsEnabledFlag is the CLI flag name to use to enable metrics collections.
const MetricsEnabledFlag = "metrics"
+const DashboardEnabledFlag = "dashboard"
// Enabled is the flag specifying if metrics are enable or not.
var Enabled = false
@@ -39,7 +40,7 @@ var Enabled = false
// and peek into the command line args for the metrics flag.
func init() {
for _, arg := range os.Args {
- if strings.TrimLeft(arg, "-") == MetricsEnabledFlag {
+ if flag := strings.TrimLeft(arg, "-"); flag == MetricsEnabledFlag || flag == DashboardEnabledFlag {
log.Info("Enabling metrics collection")
Enabled = true
}