Sha256: e24603842ab323510621f0e0734b13546b98ed4624c4f11a4929c3f2dd093acb

Contents?: true

Size: 622 Bytes

Versions: 29

Compression:

Stored size: 622 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 'metriks'

module Flipper
  module Instrumentation
    class MetriksSubscriber < Subscriber
      def update_timer(metric)
        Metriks.timer(metric).update(@duration)
      end

      def update_counter(metric)
        Metriks.meter(metric).mark
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
flipper-0.7.0.beta6 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.7.0.beta5 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.7.0.beta4 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.7.0.beta3 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.7.0.beta2 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.7.0.beta1 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.6.3 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.6.2 lib/flipper/instrumentation/metriks_subscriber.rb
flipper-0.6.1 lib/flipper/instrumentation/metriks_subscriber.rb