Description
Component(s)
receiver/mysql
What happened?
Description
The MySQL Receiver will only report replication metrics if connected to MySQL version 8.0.22 or greater. This is due to the change from SHOW SLAVE STATUS
to SHOW REPLICA STATUS
. When these replication metrics were added, they were only added for the latter case. And when bugs were noticed, the fix was to just have the client do nothing when the MySQL version is < 8.0.22. Instead the alternate query could be used and additional entries could be added to the switch case statement based on this table (I can't actually find 8.0 documentation anymore...not sure if it exists).
Steps to Reproduce
Connect MySQL Receiver to a MySQL Server version 8.0 (any version less than 8.0.22) setup with replication and collect metrics.
Expected Result
See replication metrics coming back.
Actual Result
No metrics come back (although other metrics come back just fine).
Collector version
v0.109.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
receivers:
mysql:
endpoint: localhost:3306
username: user
password: pass
database: otel
collection_interval: 1m
Log output
No response
Additional context
No response