commit | bb24add4404db20a7b2f8121594b6f54eb18bd0c | [log] [tgz] |
---|---|---|
author | Paul J. Davis <paul.joseph.davis@gmail.com> | Sun Aug 17 13:03:24 2014 -0500 |
committer | Paul J. Davis <paul.joseph.davis@gmail.com> | Tue Aug 19 12:54:12 2014 -0500 |
tree | 25f12bf6b317f6bdbb29165a3ea006994ee7373f | |
parent | 18749bd7b33d17f70aa8d50839c104036e9e32b3 [diff] |
Use the Apache Mirror of Folsom
couch_stats is a simple statistics collection app for Erlang applications. Its core API is a thin wrapper around a stat storage library (currently Folsom,) but abstracting over that library provides several benefits:
All references to stat storage are in one place, so it's easy to swap the module out.
Some common patterns, such as tying a process's lifetime to a counter value, are straightforward to support.
Configuration can be managed in a single place - for example, it's much easier to ensure that all histogram metrics use a 10-second sliding window if those metrics are instantiated/configured centrally.
[atom()]
.counter
, gauge
, or histogram
.If you don‘t add your metric to a description file, your metric will be accessible via couch_stats:sample/1
, but it won’t be read by the stats collector and therefore won't be available to HTTP _stats
requests, etc.
Tell couch_stats to use your description file via application configuration.
Instrument your code with the helper functions in couch_stats.erl
.