Sha256: c3312cb40ebac8a016a069abe5de7b96a474caba8337396139107be5a993ffee
Contents?: true
Size: 794 Bytes
Versions: 1
Compression:
Stored size: 794 Bytes
Contents
# Note: You should never need to require this file directly if you are using # ActiveSupport::Notifications. Instead, you should require the metriks file # that lives in the same directory as this file. The benefit is that it # subscribes to the correct events and does everything for your. require 'flipper/instrumentation/subscriber' require 'statsd' module Flipper module Instrumentation class StatsdSubscriber < Subscriber class << self attr_accessor :client end def update_timer(metric) if self.class.client self.class.client.timing metric, (@duration * 1_000).round end end def update_counter(metric) if self.class.client self.class.client.increment metric end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flipper-0.6.1 | lib/flipper/instrumentation/statsd_subscriber.rb |