basho/sidejob — pull request #4 by uwiger (2013-12-05 13:11:42+00:00)
Title: Make sidejob work with Exometer

This PR is part of a set of PRs aimed at integrating the [Exometer](https://github.com/Feuerlabs/exometer) metrics package into Riak.

The main addition to sidejob is that the statistics maintained by sidejob are made accessible via the Exometer probe API. No overhead is introduced, apart from the slight extra cost of registering the sidejob resource as an Exometer entry at creation time. Reading the stats via Exometer requires an extra (ETS) metadata lookup, but the added benefit is that the stats are made available in a uniform way.

The metric type `sidejob` is registered as a template in Exometer, using a Cuttlefish schema entry.

Note: The option `{exometer_name, Name}` used to name the probe is provided by the caller, e.g. `riak_kv_app.erl`.