Metrics endpoint broken when "metric_configuration/metric/metric_status" is null
Serializator opened this issue · comments
Julian commented
When the "metric_configuration/metric/metric_status" path in the "core_config_data" table is NULL or simply isn't present, the "/metrics" endpoint will throw an exception.
Fatal error: Uncaught TypeError: explode() expects parameter 2 to be string, null given in /magento2-prometheus-exporter/src/Data/Config.php:29
When the module is installed, you have to save the config under "Stores > Configuration > Prometheus" before the "/metrics" endpoint works.
David Lambauer commented
Thank you for reaching out. Bug seems valid. I'll check the PR asap.
Matthias Walter commented
Matthias Walter commented
fixed with PR #10