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-6.8.23-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.22-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.21-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.20-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.19-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.18-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.17-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.16-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.15-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.14-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.13-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.12-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.11-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.10-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.9-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.8-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.7-java lib/logstash/instrument/metric_type.rb
logstash-core-7.5.2-java lib/logstash/instrument/metric_type.rb
logstash-core-7.5.1-java lib/logstash/instrument/metric_type.rb
logstash-core-6.8.6-java lib/logstash/instrument/metric_type.rb