Description:
Hi,
from what I understand, OpenTelemetry is a MySQL Enterprise feature [1] and [2].
[1]: https://dev.mysql.com/doc/refman/8.4/en/mysql-enterprise-telemetry.html
[2]: https://dev.mysql.com/doc/refman/8.4/en/mysql-enterprise-telemetry.html
When looking at InnoDB code, I see static arrays related to OpenTelemetry not protected by "#ifdef HAVE_PSI_METRICS_INTERFACE". I found [3], [4], [5] and [6], there might be others (the one I found are inno_meter, inno_metrics, buffer_metrics and data_metrics).
[3]: https://github.com/jfg956/mysql-server/blob/mysql-9.2.0/storage/innobase/handler/ha_innodb...
[4]: https://github.com/jfg956/mysql-server/blob/mysql-9.2.0/storage/innobase/handler/ha_innodb...
[5]: https://github.com/jfg956/mysql-server/blob/mysql-9.2.0/storage/innobase/handler/ha_innodb...
[6]: https://github.com/jfg956/mysql-server/blob/mysql-9.2.0/storage/innobase/handler/ha_innodb...
The 4 arrays above end-up as symbols in mysqld binaries in 8.4.4 and 9.2.0, see how to repeat for details.
Because these are about an Enterprise-only feature, I would expect them not to pollute MySQL Community Edition binaries.
There are probably others, see a quick grep finding more in how to repeat.
Many thanks for looking into this,
Jean-François Gagné
How to repeat:
$ nm ~/opt/mysql/mysql_8.4.4/bin/mysqld | grep -e inno_meter -e inno_metrics -e buffer_metrics -e data_metrics
0000000003e721e0 d _ZL10inno_meter
0000000003e72280 d _ZL12data_metrics
0000000003e727a0 d _ZL12inno_metrics
0000000003e72440 d _ZL14buffer_metrics
$ nm ~/opt/mysql/mysql_9.2.0/bin/mysqld | grep -e inno_meter -e inno_metrics -e buffer_metrics -e data_metrics
0000000003f1a640 d _ZL10inno_meter
0000000003f1a6e0 d _ZL12data_metrics
0000000003f1ac00 d _ZL12inno_metrics
0000000003f1a8a0 d _ZL14buffer_metrics
$ grep -r -e PSI_metric_info_v1 -e PSI_meter_info_v1 . | grep -e "\[\]"
./plugin/x/src/variables/status_variables.cc:static PSI_metric_info_v1 xpl_metrics[] = {
./plugin/x/src/variables/status_variables.cc:static PSI_metric_info_v1 stmt_metrics[] = {
./plugin/x/src/variables/status_variables.cc:PSI_meter_info_v1 Plugin_status_variables::m_xpl_meter[] = {
./plugin/x/src/variables/status_variables.h: static PSI_meter_info_v1 m_xpl_meter[];
./storage/perfschema/telemetry_pfs_metrics.cc:static PSI_metric_info_v1 ps_metrics[] = {
./storage/perfschema/telemetry_pfs_metrics.cc:static PSI_meter_info_v1 ps_meters[] = {
./storage/innobase/handler/ha_innodb.cc:static PSI_metric_info_v1 inno_metrics[] = {
./storage/innobase/handler/ha_innodb.cc:static PSI_metric_info_v1 buffer_metrics[] = {
./storage/innobase/handler/ha_innodb.cc:static PSI_metric_info_v1 data_metrics[] = {
./storage/innobase/handler/ha_innodb.cc:static PSI_meter_info_v1 inno_meter[] = {
./storage/temptable/src/plugin.cc:static PSI_metric_info_v1 metrics[] = {
./storage/temptable/src/plugin.cc:static PSI_meter_info_v1 meter[] = {
[...]
./sql/mysqld.cc:static PSI_metric_info_v1 com_metrics[] = {
./sql/mysqld.cc:static PSI_metric_info_v1 core_metrics[] = {
./sql/mysqld.cc:static PSI_metric_info_v1 connection_metrics[] = {
./sql/mysqld.cc:static PSI_metric_info_v1 handler_metrics[] = {
./sql/mysqld.cc:static PSI_metric_info_v1 myisam_metrics[] = {
./sql/mysqld.cc:static PSI_metric_info_v1 ssl_metrics[] = {
./sql/mysqld.cc:static PSI_meter_info_v1 core_meters[] = {