Skip to content

Commit 1bc8e2a

Browse files
nolouchlhy1024rleungxti-chi-bot
authored
dashboard: default close telemetry (#5974)
close #5973 dashboard: default close telemetry Co-authored-by: lhy1024 <admin@liudos.us> Co-authored-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
1 parent 31355ad commit 1bc8e2a

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

conf/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
# internal-proxy = false
200200

201201
## When enabled, usage data will be sent to PingCAP for improving user experience.
202-
# enable-telemetry = true
202+
# enable-telemetry = false
203203

204204
[keyspaces]
205205
## pre-alloc is used to pre-allocate keyspaces during pd bootstrap.

server/config/config.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ const (
284284
)
285285

286286
var (
287-
defaultEnableTelemetry = true
287+
defaultEnableTelemetry = false
288288
defaultRuntimeServices = []string{}
289289
defaultLocationLabels = []string{}
290290
// DefaultStoreLimit is the default store limit of add peer and remove peer.
@@ -425,10 +425,6 @@ func (c *Config) Parse(arguments []string) error {
425425
msg := fmt.Sprintf("disable-raft-learner in %s is deprecated", c.configFile)
426426
c.WarningMsgs = append(c.WarningMsgs, msg)
427427
}
428-
if meta.IsDefined("dashboard", "disable-telemetry") {
429-
msg := fmt.Sprintf("disable-telemetry in %s is deprecated, use enable-telemetry instead", c.configFile)
430-
c.WarningMsgs = append(c.WarningMsgs, msg)
431-
}
432428
}
433429

434430
// Parse again to replace with command line options.
@@ -1424,8 +1420,6 @@ type DashboardConfig struct {
14241420
InternalProxy bool `toml:"internal-proxy" json:"internal-proxy"`
14251421
EnableTelemetry bool `toml:"enable-telemetry" json:"enable-telemetry"`
14261422
EnableExperimental bool `toml:"enable-experimental" json:"enable-experimental"`
1427-
// WARN: DisableTelemetry is deprecated.
1428-
DisableTelemetry bool `toml:"disable-telemetry" json:"disable-telemetry,omitempty"`
14291423
}
14301424

14311425
// ToTiDBTLSConfig generates tls config for connecting to TiDB, used by tidb-dashboard.
@@ -1449,7 +1443,6 @@ func (c *DashboardConfig) adjust(meta *configutil.ConfigMetaData) {
14491443
if !meta.IsDefined("enable-telemetry") {
14501444
c.EnableTelemetry = defaultEnableTelemetry
14511445
}
1452-
c.EnableTelemetry = c.EnableTelemetry && !c.DisableTelemetry
14531446
}
14541447

14551448
// ReplicationModeConfig is the configuration for the replication policy.

0 commit comments

Comments
 (0)