jstanden / cerb

Cerb is a fully customizable, web-based platform for enterprise communication and process automation. Create high volume shared inboxes. Integrate with any API-based service and automate nearly any repetitive digital workflow using the specialized KATA language and browser-based coding tools. Production: https://github.com/cerb/cerb-release/
https://cerb.ai/
Other
80 stars 38 forks source link

[Charts KATA/Legends] `metrics.timeseries` legend stats (sum,avg) don't handle `missing:null` #1713

Open jstanden opened 1 year ago

jstanden commented 1 year ago

Metrics make a distinction between null (missing data) and 0.

For gauges, they can also carry the last reading laterally until the next reading. For instance, a temperature metric could take sporadic samples. We assume the temp is currently the same as the last reading until we get new data. We wouldn't assume the temp drops to 0 between samples.

Conversely, a counter metric should assume no data is 0.

We don't force one way or the other. Metrics default to returning null for missing data, which is less ambiguous than just saying 0.

However, Chart KATA legends didn't handle the null samples at all. They just returned 0. missing:zero is an easy fix, but we need to handle that gracefully.