Shopify / statsd-instrument

A StatsD client for Ruby apps. Provides metaprogramming methods to inject StatsD instrumentation into your code.
http://shopify.github.io/statsd-instrument
MIT License
574 stars 97 forks source link

Document assert_statsd_increment with value #248

Closed agarcher closed 5 years ago

agarcher commented 5 years ago

I spent a while trying to figure out how to assert a call to increment with a non-default step size (aka value). The implementation is not obvious because StatsD.increment uses a positional argument, while assert_statsd_increment uses a named argument. Documentation of this seems useful to me.

wvanbergen commented 5 years ago

This is a leftover from a bunch of refactoring We should really fix this for version 3.0, so we accept a positional argument.

agarcher commented 5 years ago

Yes, accepting a positional argument would be way better. Makes sense to me. So you want to just close this and wait for 3.0?

wvanbergen commented 5 years ago

How I dealt with the other deprecations:

However, for some deprecations in the test helpers I simply immediately removed stuff in a 2.x version, especially when we can give a good error message and the fix is simple. I am leaning towards this option here.

wvanbergen commented 5 years ago

https://github.com/Shopify/statsd-instrument/pull/249

wvanbergen commented 5 years ago

Closing this. 2.9.2 has been released, which allow you to use a positional argument instead.

agarcher commented 5 years ago

Thanks @wvanbergen!