Skip to content

Commit

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

dashboard: default close telemetry

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

Co-authored-by: ShuNing <[email protected]>
Co-authored-by: nolouch <[email protected]>
  • Loading branch information
ti-chi-bot and nolouch authored Feb 15, 2023
1 parent 8bc2e28 commit 18a8356
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,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
9 changes: 1 addition & 8 deletions server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 18a8356

Please sign in to comment.