Shopify/statsd-instrument — pull request #34 by wvanbergen (2014-02-07 19:35:04+00:00)
Title: New hash syntax

Changes the sample rate and tags argument to be an option hash:

- Allows for easier extension with new metric options later on
- The old syntax is still supported.
- Metaprogramming methods now also support tags :)

``` ruby
# basic metrics
StatsD.increment('counter', tags: ['a', 'b'])
StatsD.measure('timer', sample_rate: 0.1) { ... }

# metaprogramming
Gateway.statsd_count :sync, 'ActiveMerchant.Gateway.sync', :tags => ['t'], :sample_rate => 1.0

# old syntax still works
StatsD.increment('counter', 1, StatsD.default_sample_rate, ['a', 'b'])
```

@Soleone @jstorimer