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

Allow user to pass a lambda function to dynamic set the tags #319

Closed rafaelzimmermann closed 1 year ago

rafaelzimmermann commented 1 year ago

Adds the same functionality that allows dynamic metric names to tags. Now you can use lambda function that instead of a list of tags to set the metric tags. The lambda function must accept two arguments:

This is useful when defining metaprogramming methods.

Comparison:
UDP batched (branch: dynamic_tags, sha: d650250):   264181.0 i/s
UDP batched (branch: master, sha: e69ab35):   256938.6 i/s - same-ish: difference falls within error