Sha256: 6d7b419550d6e85f20c8057ddf0ace3efd4e849aff15ca32053bc8b97cb27b92

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

require "nunes/subscriber"

module Nunes
  module Subscribers
    class Nunes < ::Nunes::Subscriber
      # Private
      Pattern = /\.nunes\Z/

      # Private: The namespace for events to subscribe to.
      def self.pattern
        Pattern
      end

      def instrument_method_time(start, ending, transaction_id, payload)
        runtime = ((ending - start) * 1_000).round
        metric = payload[:metric]

        if metric
          timing "#{metric}", runtime
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nunes-0.1.0 lib/nunes/subscribers/nunes.rb