Closed brusdev closed 2 months ago
(accidentally) tried it with 2.31.2 when retrieving "http://.../metrics" it fails (as expected?):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Prometheus meter registry is null. Has the Prometheus Metrics Plugin been configured?</title>
</head>
<body><h2>HTTP ERROR 404 Prometheus meter registry is null. Has the Prometheus Metrics Plugin been configured?</h2>
<table>
<tr><th>URI:</th><td>/metrics/</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Prometheus meter registry is null. Has the Prometheus Metrics Plugin been configured?</td></tr>
<tr><th>SERVLET:</th><td>artemis-prometheus-metrics-plugin-servlet</td></tr>
</table>
</body>
</html>
that leaves room for a small improvement. e.g. "Prometheus meter registry is null. This plugin needs at least ActiveMQ Artemis 2.32.0. [...]"
and with 2.32.0 it seems to have the same result ("Prometheus meter registry is null")
I'll be away for a week now...
@erwindon I fixed both the backward compatibility issue and the bug you found pushing a different solution.
I was finally able to test this again and found no problems this time. I did a total of 20 Artemis node restarts and did not see the stack traces that originally sometimes happened. metrics can be collected ok. btw: the version number of the plugin was not changed yet, but that may be standard procedure.
@erwindon thanks for your feedback, I'll create a release tag with the updated version after merging this PR.
Fix included in the release tag https://github.com/rh-messaging/artemis-prometheus-metrics-plugin/releases/tag/v2.2.0
I have no further comments on the code-changes. I'll try to use the resulting jar now.