dropwizard/metrics — pull request #561 by udoprog (2014-04-08 15:27:26+00:00)
Title: Introduce MetricName type to encapsulate more information about metrics.

**The point of this pull request** is not to have it merged. I appreciate the fact that it is a big undertaking to incorporate something like this (third party libraries especially will be a blast).

I am hoping to start the discussion, and I see no better way of doing it that through code.

##### Commit message
This is a large refactoring meant to change the way metric names are
represented to better suit a wide variety of backends.

Quite a few metric backend systems are starting to use a general concept of
'tags' which is a step back from having too encode information in the (string)
names of the metrics*.

\* KairosDB (http://code.google.com/p/kairosdb/), OpenTSDB
(http://opentsdb.net/overview.html)

Tags are meant to allow for natural grouping of similar timeseries allowing for
the ability to easily correlate freely between the timeseries that incorporate
them.

For example, take the following two timeseries.

* example.com.**interface.traffic**.eth0.in
* example.com.**interface.traffic**.eth0.out

Using tags, these would be represented as;

* **interface.traffic** {host=example.com, interface=eth0, direction=in}
* **interface.traffic** {host=example.com, interface=eth0, direction=out}