librato/librato-java — pull request #19 by collinvandyck (2014-11-12 17:38:25+00:00)
Title: Allow metric attributes to be set on measurements

When adding measurements to a `LibratoBatch` it is now possible to add any (supported) metric attributes to the measurement, such as whether or not SSA should be enabled, etc.

- these are applied to the metric the first time they are created
- all measurement types now have builder classes
- builder classes allow arbitrary attribute assignment

If you wish to set a particular metric as aggregated, for example, you would add the metric to the batch in this manner:

```
batch.addMeasurement(GaugeMeasurement
.builder("gauge.name", 42L)
.setMetricAttribute("aggregate", true)
.build());
```

Metric attributes are described in the Librato API documentation: http://dev.librato.com/v1/metric-attributes