Sha256: e9a8fdcf78afd9b76bcdb7a4de1e9de248eb236786183a0180b9448b7f8a0525

Contents?: true

Size: 589 Bytes

Versions: 4

Compression:

Stored size: 589 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(metric: prepare(metric), value: value)
        end

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

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

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nexaas-auditor-1.1.0 lib/nexaas/auditor/adapters/nunes.rb
nexaas-auditor-1.0.4 lib/nexaas/auditor/adapters/nunes.rb
nexaas-auditor-1.0.3 lib/nexaas/auditor/adapters/nunes.rb
nexaas-auditor-1.0.2 lib/nexaas/auditor/adapters/nunes.rb