Telemetry

When the telemetry is enabled, 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.

Telemetry - 图1

Note

  • Starting from February 20, 2023, the telemetry feature is disabled by default in new versions of TiDB and TiDB Dashboard, including v6.6.0, and usage information is not collected and shared with PingCAP. Before upgrading to these versions, if the cluster uses the default telemetry configuration, the telemetry feature is disabled after the upgrade. See TiDB Release Timeline for the specific version.
  • Starting from v1.11.3, the telemetry feature is disabled by default in newly deployed TiUP, and usage information is not collected. If you upgrade from a TiUP version earlier than v1.11.3 to v1.11.3 or a later version, the telemetry feature keeps the same status as before the upgrade.

What is shared?

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.

Telemetry - 图2

Note

In ALL cases, user data stored in the TiDB cluster will NOT be shared. You can also refer to PingCAP Privacy Policy.

TiDB

When the telemetry collection feature is enabled in TiDB, the TiDB cluster collects usage details on a 6-hour 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.
  • The status of query requests in the system, such as the number of query requests and the duration.
  • Component usage, for example, whether the Async Commit feature is in use or not.
  • Pseudonymized IP address of the TiDB telemetry data sender.

To view the full content of the usage information shared to PingCAP, execute the following SQL statement:

  1. ADMIN SHOW TELEMETRY;

TiDB Dashboard

When the telemetry collection feature is enabled for TiDB Dashboard, usage details of 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.

TiUP

When the telemetry collection feature is enabled in TiUP, usage details of 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:

  1. TIUP_CLUSTER_DEBUG=enable tiup cluster list

TiSpark

Telemetry - 图3

Note

Starting from v3.0.3, the telemetry collection is disabled by default in TiSpark, and usage information is not collected and shared with PingCAP.

When the telemetry collection feature is enabled for TiSpark, the Spark module will share the usage details of TiSpark, including (but not limited to):

  • A randomly generated telemetry ID.
  • Some configuration information of TiSpark, such as the read engine and whether streaming read is enabled.
  • Cluster deployment information, such as the machine hardware information, OS information, and component version number of the node where TiSpark is located.

You can view TiSpark usage information that is collected in Spark logs. You can set the Spark log level to INFO or lower, for example:

  1. cat {spark.log} | grep Telemetry report | tail -n 1

Disable telemetry

Disable TiDB telemetry at deployment

When the telemetry is enabled in existing TiDB clusters, you can configure enable-telemetry = false on each TiDB instance to disable the TiDB telemetry collection on that instance, 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:

  1. 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:

  1. 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:

  1. 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:

  1. server_configs:
  2. tidb:
  3. enable-telemetry: false
  4. ``` Deployment on Kubernetes via TiDB Operator
  5. Configure `spec.tidb.config.enable-telemetry: false` in `tidb-cluster.yaml` or TidbCluster Custom Resource.
  6. See [Deploy TiDB Operator on Kubernetes](https://docs.pingcap.com/tidb-in-kubernetes/stable/deploy-tidb-operator) for details.
  7. ![](/projects/tidb-7.1-en/4855156eceb3c2feb6109a1f607bfbe0.svg)
  8. Note
  9. This configuration item requires TiDB Operator v1.1.3 or later to take effect.
  10. ### Disable TiDB telemetry for deployed TiDB clusters
  11. In existing TiDB clusters, you can also modify the system variable [tidb\_enable\_telemetry]($9f1f0202d339017c.md#tidb_enable_telemetry-new-in-v402) to dynamically disable the TiDB telemetry collection:

SET GLOBAL tidb_enable_telemetry = 0;

  1. ![](/projects/tidb-7.1-en/4855156eceb3c2feb6109a1f607bfbe0.svg)
  2. Note
  3. 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.
  4. ### Disable TiDB Dashboard telemetry
  5. Configure [dashboard.enable-telemetry = false]($d56c22ddffc3346f.md#enable-telemetry) to disable the TiDB Dashboard telemetry collection on all PD instances. You need to restart the running clusters for the configuration to take effect.
  6. Detailed steps to disable telemetry for different deployment tools are listed below.
  7. Binary deployment
  8. Create a configuration file `pd_config.toml` with the following content:

[dashboard] enable-telemetry = false

  1. Specify the `--config=pd_config.toml` command-line parameter when starting PD to take effect.
  2. See [PD Configuration Flags]($46182295648795bc.md#--config) and [PD Configuration File]($d56c22ddffc3346f.md#enable-telemetry) for details.
  3. Deployment using TiUP Playground
  4. Create a configuration file `pd_config.toml` with the following content:

[dashboard] enable-telemetry = false

  1. When starting TiUP Playground, specify the `--pd.config pd_config.toml` command-line parameter to take effect, for example:

tiup playground —pd.config pd_config.toml

  1. See [Quickly Deploy a Local TiDB Cluster]($5c2e71f08349d6cf.md) for details.
  2. Deployment using TiUP Cluster
  3. Modify the deployment topology file `topology.yaml` to add the following content:

server_configs: pd: dashboard.enable-telemetry: false ``` Deployment on Kubernetes via TiDB Operator

Configure spec.pd.config.dashboard.enable-telemetry: false in tidb-cluster.yaml or TidbCluster Custom Resource.

See Deploy TiDB Operator on Kubernetes for details.

Telemetry - 图4

Note

This configuration item requires TiDB Operator v1.1.3 or later to take effect.

Disable TiUP telemetry

To disable the TiUP telemetry collection, execute the following command:

  1. tiup telemetry disable

Check telemetry status

For TiDB telemetry, execute the following SQL statement to check the telemetry status:

  1. 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:

  1. tiup telemetry status

Compliance

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.