Sha256: 28661230ac1a0059865188a5cb21a99d2e8138f17a409e29995368b17f582a60

Contents?: true

Size: 685 Bytes

Versions: 79

Compression:

Stored size: 685 Bytes

Contents

# encoding: utf-8
require "logstash/instrument/metric_type/counter"
require "logstash/instrument/metric_type/gauge"

module LogStash module Instrument
  module MetricType
    METRIC_TYPE_LIST = {
      :counter => LogStash::Instrument::MetricType::Counter,
      :gauge => LogStash::Instrument::MetricType::Gauge
    }.freeze

    # Use the string to generate a concrete class for this metrics
    #
    # @param [String] The name of the class
    # @param [Array] Namespaces list
    # @param [String] The metric key
    # @raise [NameError] If the class is not found
    def self.create(type, namespaces, key)
      METRIC_TYPE_LIST[type].new(namespaces, key)
    end
  end
end; end

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
logstash-core-7.5.0-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.5-java lib/logstash/instrument/metric_type.rb
logstash-core-7.4.2-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.4-java lib/logstash/instrument/metric_type.rb
logstash-core-7.4.1-java lib/logstash/instrument/metric_type.rb
logstash-core-7.4.0-java lib/logstash/instrument/metric_type.rb
logstash-core-7.3.2-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.3-java lib/logstash/instrument/metric_type.rb
logstash-core-7.3.1-java lib/logstash/instrument/metric_type.rb
logstash-core-7.3.0-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.2-java lib/logstash/instrument/metric_type.rb
logstash-core-7.2.1-java lib/logstash/instrument/metric_type.rb
logstash-core-7.2.0-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.1-java lib/logstash/instrument/metric_type.rb
logstash-core-7.1.1-java lib/logstash/instrument/metric_type.rb
logstash-core-7.1.0-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.0-java lib/logstash/instrument/metric_type.rb
logstash-core-6.7.2-java lib/logstash/instrument/metric_type.rb
logstash-core-7.0.1-java lib/logstash/instrument/metric_type.rb
logstash-core-7.0.0-java lib/logstash/instrument/metric_type.rb