opscode/stats_hero — pull request #5 by seth (2013-01-03 21:35:16+00:00)
Title: Make stats_hero module aggregation configurable

This PR merges prior work by Prajakta and builds on top of it to
remove hard-coding of module names for metric aggregation along with
some other cleanups.

Summary:

Complete conversion to configurable label aggregation

* Remove stats_hero:label/2. Instead of hard-coding module
names in this label function, users of this library can
specify a {Mod, Fun} such that Mod:Fun/1 converts the
labels used at instrumentation time into binaries. This is
a breaking change since an exported function is removed.

* Since different apps in a vm may want to use different
label functions, move the specification of
upstream_prefixes and label_fun back into the Config
proplist used to start a new stats_hero worker and avoid
putting this data into stats_hero app config. Code using
the modular_configurable_stats_hero branch will need to
adjust code to work with this change.

* Label can be any term for ctime/3 and alog/3. If Label is
not a binary, the LabelFun will be used to convert it to a
binary. Note that the read function read_alog/2 expects a
binary label still.

* Add missing label conversion for alog