|
| 1 | +# Change Log |
| 2 | +All notable changes to this project will be documented in this file. |
| 3 | +This project adheres to [Semantic Versioning](http://semver.org/). |
| 4 | + |
| 5 | +## [2.0.0] - 2016-03-20 |
| 6 | + |
| 7 | +- `New` signature changed. The default address used is now ":8125". To use |
| 8 | + another address use the `Address` option: |
| 9 | + |
| 10 | + Before: |
| 11 | + ``` |
| 12 | + statsd.New(":8125") |
| 13 | + statsd.New(":9000") |
| 14 | + ``` |
| 15 | + |
| 16 | + After |
| 17 | + ``` |
| 18 | + statsd.New() |
| 19 | + statsd.New(statsd.Address(":9000")) |
| 20 | + ``` |
| 21 | + |
| 22 | +- The `rate` parameter has been removed from the `Count` and `Timing` methods. |
| 23 | + Use the new `SampleRate` option instead. |
| 24 | + |
| 25 | +- `Count`, `Gauge` and `Timing` now accept a `interface{}` instead of an int as |
| 26 | + the value parameter. So you can now use any type of integer or float in these |
| 27 | + functions. |
| 28 | + |
| 29 | +- The `WithInfluxDBTags` and `WithDatadogTags` options were replaced by the |
| 30 | + `TagsFormat` and `Tags` options: |
| 31 | + |
| 32 | + Before: |
| 33 | + ``` |
| 34 | + statsd.New(statsd.WithInfluxDBTags("tag", "value")) |
| 35 | + statsd.New(statsd.WithDatadogTags("tag", "value")) |
| 36 | + ``` |
| 37 | + |
| 38 | + After |
| 39 | + ``` |
| 40 | + statsd.New(statsd.TagsFormat(statsd.InfluxDB), statsd.Tags("tag", "value")) |
| 41 | + statsd.New(statsd.TagsFormat(statsd.Datadog), statsd.Tags("tag", "value")) |
| 42 | + ``` |
| 43 | + |
| 44 | +- All options whose named began by `With` had the `With` stripped: |
| 45 | + |
| 46 | + Before: |
| 47 | + ``` |
| 48 | + statsd.New(statsd.WithMaxPacketSize(65000)) |
| 49 | + ``` |
| 50 | + |
| 51 | + After |
| 52 | + ``` |
| 53 | + statsd.New(statsd.MaxPacketSize(65000)) |
| 54 | + ``` |
| 55 | + |
| 56 | +- `ChangeGauge` has been removed as it is a bad practice: UDP packets can be |
| 57 | + lost so using relative changes can cause unreliable values in the long term. |
| 58 | + Use `Gauge` instead which sends an absolute value. |
| 59 | + |
| 60 | +- The `Histogram` method has been added. |
| 61 | + |
| 62 | +- The `Clone` method was added to the `Client`, it allows to create a new |
| 63 | + `Client` with different rate / prefix / tags parameters while still using the |
| 64 | + same connection. |
0 commit comments