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
570 stars 94 forks source link

Improve documentation on the StatsD metric methods #189

Closed wvanbergen closed 4 years ago

wvanbergen commented 5 years ago

The method signature is pretty awful because of backwards compatibility, and we don't really want to expose the deprecated options to the end user. By using the @!method macro, we can override the signature from Yard's point of view.

I have decided not to document a couple of keyword arguments because I may want to drop support of these in the new version:

It turns out that many of the arguments are for the datadog-only event and service_check metrics are not actually used. To start, I have decided to simply hide all of them. In the new implementation, we should remove them from the method signature.

I've also added some examples, and properly documented the methods that optionally accept a block (measure and distribution)