Class: OpenTelemetry::Metrics::Instrument::UpDownCounter

Inherits:
Object
  • Object
show all
Defined in:
lib/opentelemetry/metrics/instrument/up_down_counter.rb

Overview

No-op implementation of UpDownCounter.

Instance Method Summary collapse

Instance Method Details

#add(amount, attributes: nil) ⇒ Object

Increment or decrement the UpDownCounter by a fixed amount.

Parameters:

  • amount (Numeric)

    The amount to be added, can be positive, negative or zero.

  • attributes (Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}) (defaults to: nil)

    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).



19
# File 'lib/opentelemetry/metrics/instrument/up_down_counter.rb', line 19

def add(amount, attributes: nil); end