79291934

Date: 2024-12-18 17:12:56
Score: 3
Natty:
Report link

Looks like the issue is some time-series had NaN in them. When Prometheus sum's a value with an NaN, it gives an NaN.

Answer is to add a >0 to the query, so:

sum by(topic) (kafka_consumer_fetch_manager_records_lag{application="abc123", topic="xyz"} >0 )

Found the answer in another post:

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Justin Lawler