Riemann Adds 64-Bit Integer and Double Metric Support
Riemann is broadening the numeric range of event metrics. The just-released riemann-java-client 0.0.6, riemann-clojure-client 0.0.6, and riemann-ruby-client 0.0.8, along with the upcoming riemann 0.1.4 now in master, support two new metric types for events.
The change is in the protocol definition. Events still have a single logical metric, but the protocol can now represent a wider range of numbers. Clients should prefer metric_sint64 for all integer values from -2^63 to 2^63 - 1, and metric_d for double-precision floats. They should also write metric_f wherever possible and fall back to reading metric_f for compatibility with older Riemann versions.
The Ruby client demonstrates the approach, keeping in mind Ruby's Float is actually a double.
JavaScript JSON Precision Trade-Off
JavaScript has only one numeric type: double-precision IEEE754 floats (sort of). Riemann uses Cheshire and can emit JSON numbers exceeding the scale or resolution of a JS VM — for example, a value parsed in V8 as 12345678901234567000. Larger values may become +/- Infinity, and rationals are serialized as decimals.
Because most JS clients focus on visualization, the loss of precision is considered preferable to emitting JSON strings (converting 123 to "123") and forcing arbitrary-precision bignum handling with custom operators. The maintainers are looking for feedback on this decision.



