This section describes the installation of the server and client trace support.
To install the server component, run the following command:
install component 'file://component_telemetry';
To confirm the component is present in your server, run the following query:
mysql> select * from mysql.component;
+--------------+--------------------+------------------------------------+
| component_id | component_group_id | component_urn |
+--------------+--------------------+------------------------------------+
| 1 | 1 | file://component_validate_password |
| 2 | 2 | file://component_telemetry |
+--------------+--------------------+------------------------------------+
If component_telemetry
is present in the
component_urn
column, the component is
installed.
The component installation also adds telemetry-specific system variables.
mysql> show variables like "%telemetry%";
+---------------------------------------------------------+---------------------------------+
| Variable_name | Value |
+---------------------------------------------------------+---------------------------------+
| telemetry.otel_bsp_max_export_batch_size | 512 |
| telemetry.otel_bsp_max_queue_size | 2048 |
| telemetry.otel_bsp_schedule_delay | 5000 |
| telemetry.otel_exporter_otlp_traces_certificates | |
| telemetry.otel_exporter_otlp_traces_client_certificates | |
| telemetry.otel_exporter_otlp_traces_client_key | |
| telemetry.otel_exporter_otlp_traces_compression | none |
| telemetry.otel_exporter_otlp_traces_endpoint | http://localhost:4318/v1/traces |
| telemetry.otel_exporter_otlp_traces_headers | |
| telemetry.otel_exporter_otlp_traces_protocol | http/protobuf |
| telemetry.otel_exporter_otlp_traces_timeout | 10000 |
| telemetry.otel_log_level | info |
| telemetry.otel_resource_attributes | |
| telemetry.trace_enabled | ON |
+---------------------------------------------------------+---------------------------------+
See Server Configuration.
The Telemetry plugin for the MySQL client can be enabled with
a command line switch,
--telemetry_client
or from a
configuration option, telemetry-client=ON
|OFF
, defined in the [mysql]
section of the configuration file.
Known Issue: The client plugin was not
correctly linked to a required library,
libprotobuf.so.3.19.4
. To use the
client plugin, you must add this library's location to the
LD_LIBRARY_PATH
environment variable, for
example export
LD_LIBRARY_PATH=/usr/lib64/mysql/private
.
If you attempt to start the mysql
client
with the --telemetry_client
option or defined in the configuration file, without setting
this path, the following error is displayed and the client
does not start: ERROR: Cannot load the client
telemetry plugin <telemetry_client>.