Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update read me with block about lambdas as metric names

  • Loading branch information...
commit 125526a0f0c76573db792611929e6f8491913904 1 parent cb82485
@himynameisjonas himynameisjonas authored
Showing with 8 additions and 0 deletions.
  1. +8 −0
@@ -136,6 +136,14 @@ AWS::S3::Base.singleton_class.extend StatsD::Instrument
AWS::S3::Base.singleton_class.statsd_measure :request, 'S3.request'
+### Lambda As Metric Name
+Send a lambda instead of a string as the metric name to dynamically set the name of the metric. Useful when measuring sub classes.
+``` ruby
+GoogleBase.statsd_count :insert, lamdba{|object| object.class.to_s.downcase + ".insert" }
## Reliance on DNS
Out of the box StatsD is set up to be unidirectional fire-and-forget over UDP. Configuring the StatsD host to be a non-ip will trigger a DNS lookup (ie synchronous round trip network call) for each metric sent. This can be particularly problematic in clouds that have a shared DNS infrastructure such as AWS.
Please sign in to comment.
Something went wrong with that request. Please try again.