Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
The commons.thread bundle exports its JMX attributes as Gauges via the ThreadPoolMetricGauges class. In particular, it also exports the 'Pid' attribute.
This attribute does not make sense as a Gauge value ( it's a static, non-numeric, value ) and when exported ends up null.
When used with the prometheus bundle from the whiteboard it breaks the Prometheus metrics servlet, causing no metrics to be returned. Note that this is the code provided by the Prometheus SimpleClient bundle, we can't influence how it behaves. I tried.
29.08.2023 17:42:16.461 *ERROR* [FelixLogListener] LogService.org.apache.felix.http.jetty Exception while processing request to /metrics (java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "obj" is null) java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "obj" is null at io.prometheus.client.dropwizard.DropwizardExports.fromGauge(DropwizardExports.java:55) [io.prometheus.simpleclient_dropwizard:0.0.23] at io.prometheus.client.dropwizard.DropwizardExports.collect(DropwizardExports.java:133) [io.prometheus.simpleclient_dropwizard:0.0.23] at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:180) [io.prometheus.simpleclient:0.0.23] at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:144) [io.prometheus.simpleclient:0.0.23] at io.prometheus.client.CollectorRegistry.filteredMetricFamilySamples(CollectorRegistry.java:131) [io.prometheus.simpleclient:0.0.23] at io.prometheus.client.exporter.MetricsServlet.doGet(MetricsServlet.java:43) [io.prometheus.simpleclient_servlet:0.0.23] at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) [org.apache.felix.http.servlet-api:1.2.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [org.apache.felix.http.servlet-api:1.2.0]
Attachments
Issue Links
- links to