title | summary | aliases | |
---|---|---|---|
Telemetry |
Learn the telemetry feature, how to disable the feature and view its status. |
|
By default, TiDB, TiUP and TiDB Dashboard collect usage information and share the information with PingCAP to help understand how to improve the product. For example, this usage information helps prioritize new features.
The following sections describe the shared usage information in detail for each component. The usage details that get shared might change over time. These changes (if any) will be announced in release notes.
Note:
In ALL cases, user data stored in the TiDB cluster will NOT be shared. You can also refer to PingCAP Privacy Policy.
When the telemetry collection feature is enabled in TiDB, the TiDB cluster collects usage details on a daily basis. These usage details include but are not limited to:
- A randomly generated telemetry ID.
- Deployment characteristics, such as the size of hardware (CPU, memory, disk), TiDB components versions, OS name.
To view the full content of the usage information shared to PingCAP, execute the following SQL statement:
{{< copyable "sql" >}}
ADMIN SHOW TELEMETRY;
When the telemetry collection feature is enabled in TiDB Dashboard, usage information on the TiDB Dashboard web UI will be shared, including (but not limited to):
- A randomly generated telemetry ID.
- User operation information, such as the name of the TiDB Dashboard web page accessed by the user.
- Browser and OS information, such as browser name, OS name, and screen resolution.
To view the full content of the usage information shared to PingCAP, use the Network Activity Inspector of Chrome DevTools or the Network Monitor of Firefox Developer Tools.
When the telemetry collection feature is enabled in TiUP, user operations with TiUP will be shared, including (but not limited to):
- A randomly generated telemetry ID.
- Execution status of TiUP commands, such as whether the execution is successful and the execution duration.
- Deployment characteristics, such as the size of hardware, TiDB components versions, and deployment configuration names that have been modified.
To view the full content of the usage information shared to PingCAP, set the TIUP_CLUSTER_DEBUG=enable
environment variable when executing the TiUP command. For example:
{{< copyable "shell-regular" >}}
TIUP_CLUSTER_DEBUG=enable tiup cluster list
When deploying TiDB clusters, configure enable-telemetry = false
to disable the TiDB telemetry collection on all TiDB instances. You can also use this setting to disable telemetry in an existing TiDB cluster, which does not take effect until you restart the cluster.
Detailed steps to disable telemetry in different deployment tools are listed below.
Binary deployment
Create a configuration file tidb_config.toml
with the following content:
{{< copyable "" >}}
enable-telemetry = false
Specify the --config=tidb_config.toml
command-line parameter when starting TiDB for the configuration file above to take effect.
See TiDB Configuration Options and TiDB Configuration File for details.
Deployment using TiUP Playground
Create a configuration file tidb_config.toml
with the following content:
{{< copyable "" >}}
enable-telemetry = false
When starting TiUP Playground, specify the --db.config tidb_config.toml
command-line parameter for the configuration file above to take effect. For example:
{{< copyable "shell-regular" >}}
tiup playground --db.config tidb_config.toml
See Quickly Deploy a Local TiDB Cluster for details.
Deployment using TiUP Cluster
Modify the deployment topology file topology.yaml
to add the following content:
{{< copyable "" >}}
server_configs:
tidb:
enable-telemetry: false
Deployment using TiDB Ansible
Locate the following contents in the configuration file tidb-ansible/conf/tidb.yml
:
# enable-telemetry: true
And change this content as follow:
enable-telemetry: false
See Deploy TiDB Using TiDB Ansible for details.
Deployment in Kubernetes via TiDB Operator
Configure spec.tidb.config.enable-telemetry: false
in tidb-cluster.yaml
or TidbCluster Custom Resource.
See Deploy TiDB Operator in Kubernetes for details.
Note:
This configuration item requires TiDB Operator v1.1.3 or later to take effect.
In existing TiDB clusters, you can also modify the system variable tidb_enable_telemetry
to dynamically disable the TiDB telemetry collection:
{{< copyable "sql" >}}
SET GLOBAL tidb_enable_telemetry = 0;
Note:
When you disable telemetry, the configuration file has a higher priority over system variable. That is, after telemetry collection is disabled by the configuration file, the value of the system variable will be ignored.
Configure dashboard.enable-telemetry = false
to disable the TiDB Dashboard telemetry collection on all PD instances. You need to restart the running clusters for the configuration to take effect.
Detailed steps to disable telemetry for different deployment tools are listed below.
Binary deployment
Create a configuration file pd_config.toml
with the following content:
{{< copyable "" >}}
[dashboard]
enable-telemetry = false
Specify the --config=pd_config.toml
command-line parameter when starting PD to take effect.
See PD Configuration Flags and PD Configuration File for details.
Deployment using TiUP Playground
Create a configuration file pd_config.toml
with the following content:
{{< copyable "" >}}
[dashboard]
enable-telemetry = false
When starting TiUP Playground, specify the --pd.config pd_config.toml
command-line parameter to take effect, for example:
{{< copyable "shell-regular" >}}
tiup playground --pd.config pd_config.toml
See Quickly Deploy a Local TiDB Cluster for details.
Deployment using TiUP Cluster
Modify the deployment topology file topology.yaml
to add the following content:
{{< copyable "" >}}
server_configs:
pd:
dashboard.enable-telemetry: false
Deployment using TiDB Ansible
Locate the following content in the tidb-ansible/conf/pd.yml
configuration file:
dashboard:
...
# enable-telemetry: true
And change the content as follows:
dashboard:
...
enable-telemetry: false
See Deploy TiDB Using TiDB Ansible for details.
Deployment in Kubernetes via TiDB Operator
Configure spec.pd.config.dashboard.enable-telemetry: false
in tidb-cluster.yaml
or TidbCluster Custom Resource.
See Deploy TiDB Operator in Kubernetes for details.
Note:
This configuration item requires TiDB Operator v1.1.3 or later to take effect.
To disable the TiUP telemetry collection, execute the following command:
{{< copyable "shell-regular" >}}
tiup telemetry disable
For TiDB telemetry, execute the following SQL statement to check the telemetry status:
{{< copyable "sql" >}}
ADMIN SHOW TELEMETRY;
If the DATA_PREVIEW
column in the execution result is empty, TiDB telemetry is disabled. If not, TiDB telemetry is enabled. You can also check when the usage information was shared previously according to the LAST_STATUS
column and whether the sharing was successful or not.
For TiUP telemetry, execute the following command to check the telemetry status:
{{< copyable "shell-regular" >}}
tiup telemetry status
To meet compliance requirements in different countries or regions, the usage information is sent to servers located in different countries according to the IP address of the sender machine:
- For IP addresses from the Chinese mainland, usage information is sent to and stored on cloud servers in the Chinese mainland.
- For IP addresses from outside of the Chinese mainland, usage information is sent to and stored on cloud servers in the US.
See PingCAP Privacy Policy for details.