You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jonas (Jira)" <ji...@apache.org> on 2022/03/03 19:55:00 UTC
[jira] [Created] (SPARK-38409) PrometheusServlet exports gauges with null values
Jonas created SPARK-38409:
-----------------------------
Summary: PrometheusServlet exports gauges with null values
Key: SPARK-38409
URL: https://issues.apache.org/jira/browse/SPARK-38409
Project: Spark
Issue Type: Bug
Components: Spark Core
Affects Versions: 3.2.1
Reporter: Jonas
[PrometheusServlet](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/metrics/sink/PrometheusServlet.scala#L63) exports gauges with value null as `gauge_name{} null`. This can for instance happen if one initializes a [DefaultSettableGauge](https://www.javadoc.io/static/io.dropwizard.metrics/metrics-core/4.2.0-beta.3/com/codahale/metrics/DefaultSettableGauge.html) without a default value. Null values are not scraped by Prometheus as null is not a valid floating point value. A null value prevents any metrics from being scraped and the endpoint will be considered to be down by Prometheus.
A solution could be to omit listing the gauge if its value is null.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org