Sha256: e8c8b64fe72f4360fbaacd5f82aacfe28ff1be634d34515583915116cedec16d

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

require 'nunes'

module Nexaas
  module Auditor
    module Adapters

      class Nunes < ::Nunes::Adapter

        attr_reader :client

        def initialize(client)
          @client = client
        end

        def increment(metric, value=1)
          client.track_count(prepare(metric), value)
        end

        def timing(metric, value)
          client.track_value(prepare(metric), value)
        end

        def prepare(metric, replacement = Separator)
          metric = "rails.#{metric}"
          super
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nexaas-auditor-1.0.1 lib/nexaas/auditor/adapters/nunes.rb
nexaas-auditor-1.0.0 lib/nexaas/auditor/adapters/nunes.rb