Closed harlow closed 9 years ago
@harlow Our native counter type is actually only intended for a single use case, when you want to track the derivative (delta) of a monotonically increasing value. Here is some more info about that.
librato-rails actually reports everything as our native gauge type, with server-side aggregation enabled, using this strategy and a 60 second period.
So if you wanted to do something equivalent you would do something like:
Librato::Metrics.submit 'user.signup' => <number you want to increment by>
...and then ensure that server-side aggregation is turned on for the metric you are submitting to.
Note that librato-rack/rails do the work for you of aggregating things locally and then just reporting all cumulative measurements in a single request once per minute. If you are incrementing rapidly you may want to do something similar rather than sending a lot of requests.
This is how librato-rails incrementing counters actually work under the hood.
Let me know if you have further questions, hope this helps!
@nextmat thanks for the swift reply! Yes this makes sense :+1:
Hello, the quick-start in librato-rails (https://github.com/librato/librato-rails#quick-start)
Shows an example of incrementing a counter:
In README in this repo shows counters in this format:
How does this translate? Would this be the equiv?