Sha256: e6ad159d4146917f5cf93f639d3321e4c5890285ea57bbfa4d39625cca719a17

Contents?: true

Size: 1.25 KB

Versions: 7

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

# rubocop:disable Lint/UnusedMethodArgument
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
      def increment(metric_name, options)
        raise NotImplementedError
      end

      # Send an counter increment metric
      # @param metric_name [String] The name of the counter metric
      # @param options [Hash] Any additional options, e.g. :tags
      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 options [Hash] Any additional options, e.g. :tags
      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
      def time(metric_name, options={})
        raise NotImplementedError
      end
    end
  end
end
# rubocop:enable Lint/UnusedMethodArgument

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
deimos-kafka-1.0.0.pre.beta21 lib/deimos/metrics/provider.rb
deimos-kafka-1.0.0.pre.beta20 lib/deimos/metrics/provider.rb
deimos-kafka-1.0.0.pre.beta19 lib/deimos/metrics/provider.rb
deimos-kafka-1.0.0.pre.beta18 lib/deimos/metrics/provider.rb
deimos-kafka-1.0.0.pre.beta17 lib/deimos/metrics/provider.rb
deimos-kafka-1.0.0.pre.beta16 lib/deimos/metrics/provider.rb
deimos-kafka-1.0.0.pre.beta15 lib/deimos/metrics/provider.rb