Skip to content

Commit

Permalink
dashboard: default close telemetry (#5974) (#5984)
Browse files Browse the repository at this point in the history
close #5973, ref #5974

dashboard: default close telemetry

Signed-off-by: nolouch <[email protected]>

Co-authored-by: nolouch <[email protected]>
Co-authored-by: ShuNing <[email protected]>
  • Loading branch information
ti-chi-bot and nolouch authored Feb 14, 2023
1 parent 0722c7d commit 67c0fa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion conf/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
# internal-proxy = false

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

[keyspaces]
## pre-alloc is used to pre-allocate keyspaces during pd bootstrap.
Expand Down
9 changes: 1 addition & 8 deletions server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ const (
)

var (
defaultEnableTelemetry = true
defaultEnableTelemetry = false
defaultRuntimeServices = []string{}
defaultLocationLabels = []string{}
// DefaultStoreLimit is the default store limit of add peer and remove peer.
Expand Down Expand Up @@ -425,10 +425,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.
Expand Down Expand Up @@ -1424,8 +1420,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.
Expand All @@ -1449,7 +1443,6 @@ func (c *DashboardConfig) adjust(meta *configutil.ConfigMetaData) {
if !meta.IsDefined("enable-telemetry") {
c.EnableTelemetry = defaultEnableTelemetry
}
c.EnableTelemetry = c.EnableTelemetry && !c.DisableTelemetry
}

// ReplicationModeConfig is the configuration for the replication policy.
Expand Down

0 comments on commit 67c0fa2

Please sign in to comment.