quipo / statsd

Golang StatsD client
MIT License
164 stars 51 forks source link

GaugeDelta event Stats() should not send an absolute value of 0. #23

Closed mmb closed 7 years ago

mmb commented 9 years ago

It appears to be copied from the Gauge event, which does not look like the correct logic for GaugeDelta.

quipo commented 8 years ago

hey Matthew, should I simply delete this line? https://github.com/quipo/statsd/blob/master/event/gaugedelta.go#L34

mmb commented 8 years ago

Yes I think that's the correct fix.

If the delta value is negative, it can be sent as is.

If the delta value is positive it needs to have the '+' added or it will set the value of the gauge instead of applying a delta.