Sha256: 889d7adedebe4cf463c6dbb36e7b63fb7b21eeaaca2565207e4cec7e9689bea6
Contents?: true
Size: 692 Bytes
Versions: 10
Compression:
Stored size: 692 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' module Flipper module Instrumentation class StatsdSubscriber < Subscriber class << self attr_accessor :client end def update_timer(metric) self.class.client&.timing metric, (@duration * 1_000).round end def update_counter(metric) self.class.client&.increment metric end end end end
Version data entries
10 entries across 10 versions & 1 rubygems