Sha256: 1adbb52ca7c11620b15d91e38117beee4d36b79ea1a113877f1685de26a01975
Contents?: true
Size: 793 Bytes
Versions: 18
Compression:
Stored size: 793 Bytes
Contents
# Note: You should never need to require this file directly if you are using # ActiveSupport::Notifications. Instead, you should require the statsd 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
18 entries across 18 versions & 1 rubygems