Sha256: 2e556417cb61d752a8e656ffcbefbca346e2fbdf393b5af7f9ee472c3871437a

Contents?: true

Size: 1.33 KB

Versions: 38

Compression:

Stored size: 1.33 KB

Contents

# frozen_string_literal: true

module Deimos
  module Metrics
    # Base class for all metrics providers.
    class Provider
      # Send an counter increment metric
      # @param metric_name [String] The name of the counter metric
      # @param options [Hash] Any additional options, e.g. :tags
      # @return [void]
      def increment(metric_name, options={})
        raise NotImplementedError
      end

      # Send an counter increment metric
      # @param metric_name [String] The name of the counter metric
      # @param count [Integer]
      # @param options [Hash] Any additional options, e.g. :tags
      # @return [void]
      def gauge(metric_name, count, options={})
        raise NotImplementedError
      end

      # Send an counter increment metric
      # @param metric_name [String] The name of the counter metric
      # @param count [Integer]
      # @param options [Hash] Any additional options, e.g. :tags
      # @return [void]
      def histogram(metric_name, count, options={})
        raise NotImplementedError
      end

      # Time a yielded block, and send a timer metric
      # @param metric_name [String] The name of the metric
      # @param options [Hash] Any additional options, e.g. :tags
      # @return [void]
      def time(metric_name, options={})
        raise NotImplementedError
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
deimos-ruby-1.24.2 lib/deimos/metrics/provider.rb
deimos-ruby-1.24.1 lib/deimos/metrics/provider.rb
deimos-ruby-1.24.0 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.3 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.2 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.1.pre.beta6 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.1.pre.beta5 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.1.pre.beta4 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.1.pre.beta3 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.1.pre.beta2 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.1.pre.beta1 lib/deimos/metrics/provider.rb
deimos-ruby-1.23.0 lib/deimos/metrics/provider.rb
deimos-ruby-1.22.5 lib/deimos/metrics/provider.rb
deimos-ruby-1.22.4 lib/deimos/metrics/provider.rb
deimos-ruby-1.22.3 lib/deimos/metrics/provider.rb
deimos-ruby-1.22.2 lib/deimos/metrics/provider.rb
deimos-ruby-1.22.1 lib/deimos/metrics/provider.rb
deimos-ruby-1.22 lib/deimos/metrics/provider.rb
deimos-ruby-1.20.1 lib/deimos/metrics/provider.rb
deimos-ruby-1.20.0 lib/deimos/metrics/provider.rb