obfuscurity / tasseo

Live dashboard for Graphite
Other
1.53k stars 127 forks source link

NaN #1

Closed obfuscurity closed 12 years ago

obfuscurity commented 12 years ago

Sometimes the page shows "Nan" when there is no data available for a given metric at a particular time-slice. Just display the previous value (with a reasonable bound on how far back this can reach).

bscofield commented 12 years ago

Should it be the previous value, or 0? Or even configurable as an option in the metrics object?

obfuscurity commented 12 years ago

@bscofield Actually it already does a little bit of both...

Here it sets our first value to zero if we have a null. https://github.com/obfuscurity/tasseo/blob/master/public/j/tasseo.js#L83

Here it first attempts to set our current value to our previous value if we have a null. If that one is null, we use zero instead. https://github.com/obfuscurity/tasseo/blob/master/public/j/tasseo.js#L89

The original issue description came from an internal bug report wherein it was suggested that we basically keep using "previous value" for as long as reasonably possible. Personally I prefer to use NaN since it represents our actual state, rather than fudging our numbers.

Perhaps it should be configurable, but I'd like to avoid superfluous knobs whenever possible.

bscofield commented 12 years ago

Sure thing -- I think we have an odd use case where we have Graphite log nulls where it should probably be logging 0s.

Totally agreed on the desire to avoid excess configuration :)

Thanks!