We should show explicit empty results in metrics series

Problem to solve

We should show explicit empty results in metrics series, so users can see when data is missing/no fetched/not scraped.

This could involve:

  • Handling empty datapoints differently.
  • Adding missing datapoints to they are shown explicitly.

Intended users

User experience goal

Users should be able to see missing data in their charts correctly:

empty data in Prom. empty data in Grafana
image image

Proposal

Empty results are removed here:

https://gitlab.com/gitlab-org/gitlab/blob/ad256ac4bd9d35953b19f531356129cba0976ac4/app/assets/javascripts/monitoring/stores/utils.js#L238

We should instead ensure that charts are displayed correctly even when data is missing.

Technical Implementation

I think possibly we filter out NaN values when fetching data from Prometheus, and this could be wrong.

Missing data can be important indicator that something is wrong, and it should be explicitly visible on the charts as a value where no data could be calculated or fetched.

Edited by Miguel Rincon