Sha256: 87b6d5d7e500be2f83ca3f0fa67f09401456d368f1200dfe9e9ad2f7d08c0f68

Contents?: true

Size: 801 Bytes

Versions: 2

Compression:

Stored size: 801 Bytes

Contents

# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

module OpenTelemetry
  module Metrics
    module Instrument
      # No-op implementation of Counter.
      class Counter
        # Increment the Counter by a fixed amount.
        #
        # @param [numeric] increment The increment amount, which MUST be a non-negative numeric value.
        # @param [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attributes
        #   Values must be non-nil and (array of) string, boolean or numeric type.
        #   Array values must not contain nil elements and all elements must be of
        #   the same basic type (string, numeric, boolean).
        def add(increment, attributes: {}); end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opentelemetry-metrics-api-0.2.0 lib/opentelemetry/metrics/instrument/counter.rb
opentelemetry-metrics-api-0.1.1 lib/opentelemetry/metrics/instrument/counter.rb