commit | 5dd3b5f0f8cc754084ce38a9935aa2fd2943e74e | [log] [tgz] |
---|---|---|
author | Alexander Shorin <kxepal@apache.org> | Tue Jan 20 14:19:26 2015 +0300 |
committer | Alexander Shorin <kxepal@apache.org> | Tue Jan 20 14:19:26 2015 +0300 |
tree | fc4430176c0c4005a6247fbeb5e45054bf11f8c6 | |
parent | 20912b3e06bba9f6976dc715068390cfab7c4147 [diff] | |
parent | 055740aacd0abaa953641b24ba4d6bc2cc437622 [diff] |
Merge remote-tracking branch 'iilyak/2552-unknown-metric-mrview-map_docs' This closes #5
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
.