From 18a8356a1c19afb58a1a1efba54aa66a7ae1a8a8 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Wed, 15 Feb 2023 18:36:01 +0800 Subject: [PATCH] dashboard: default close telemetry (#5974) (#5982) close tikv/pd#5973, ref tikv/pd#5974 dashboard: default close telemetry Signed-off-by: ti-chi-bot Signed-off-by: nolouch Co-authored-by: ShuNing Co-authored-by: nolouch --- conf/config.toml | 2 +- server/config/config.go | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/conf/config.toml b/conf/config.toml index 252d5a2938e..3660eb82d41 100644 --- a/conf/config.toml +++ b/conf/config.toml @@ -199,4 +199,4 @@ # internal-proxy = false ## When enabled, usage data will be sent to PingCAP for improving user experience. -# enable-telemetry = true +# enable-telemetry = false diff --git a/server/config/config.go b/server/config/config.go index 384c7108816..7e031f94ab9 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -267,7 +267,7 @@ const ( ) var ( - defaultEnableTelemetry = true + defaultEnableTelemetry = false defaultRuntimeServices = []string{} defaultLocationLabels = []string{} // DefaultStoreLimit is the default store limit of add peer and remove peer. @@ -408,10 +408,6 @@ func (c *Config) Parse(arguments []string) error { msg := fmt.Sprintf("disable-raft-learner in %s is deprecated", c.configFile) c.WarningMsgs = append(c.WarningMsgs, msg) } - if meta.IsDefined("dashboard", "disable-telemetry") { - msg := fmt.Sprintf("disable-telemetry in %s is deprecated, use enable-telemetry instead", c.configFile) - c.WarningMsgs = append(c.WarningMsgs, msg) - } } // Parse again to replace with command line options. @@ -1329,8 +1325,6 @@ type DashboardConfig struct { InternalProxy bool `toml:"internal-proxy" json:"internal-proxy"` EnableTelemetry bool `toml:"enable-telemetry" json:"enable-telemetry"` EnableExperimental bool `toml:"enable-experimental" json:"enable-experimental"` - // WARN: DisableTelemetry is deprecated. - DisableTelemetry bool `toml:"disable-telemetry" json:"disable-telemetry,omitempty"` } // ToTiDBTLSConfig generates tls config for connecting to TiDB, used by tidb-dashboard. @@ -1354,7 +1348,6 @@ func (c *DashboardConfig) adjust(meta *configMetaData) { if !meta.IsDefined("enable-telemetry") { c.EnableTelemetry = defaultEnableTelemetry } - c.EnableTelemetry = c.EnableTelemetry && !c.DisableTelemetry } // ReplicationModeConfig is the configuration for the replication policy.