I'm trying to capture metrics like mysql_perf_schema_events_statements_seconds_total, so I tried running mysqld_exporter with multiple flags/collectors, mainly:
--collect.perf_schema.eventsstatements
--collect.perf_schema.eventswaits
And I made sure the performance schema is enabled, the statement-level instrumentation is also enabled, and the required consumers as well. And I have also added this to .my.cnf:
performance_schema = ON
performance_schema_instrument = '%=ON'
performance-schema-instrument='statement/%=ON'
performance-schema-consumer-events-statements-current=ON
performance-schema-consumer-events-statements-history=ON
performance-schema-consumer-events-statements-history-long=ON
However, the metrics are still not showing, what could be the issue? MySQL version is 5.7.42 on Ubuntu 18 and the exporter version is 0.16.0