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

Add Client#latency. #194

Closed wvanbergen closed 5 years ago

wvanbergen commented 5 years ago

It measures the latency (execution time) of the provided block in milliseconds, and emits this value as a metric. The metric type by default is an ms, but can be overridden. For DogStatsD we default to a distribution metric.

We also use the latency method under the hood when measure or `distribution is called with a block, for backwards compatibility.