Class: OpenTelemetry::Metrics::Instrument::ObservableUpDownCounter

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

Overview

No-op implementation of ObservableUpDownCounter.

Instance Method Summary collapse

Instance Method Details

#observe(timeout: nil, attributes: {}) ⇒ Object

Observe the ObservableUpDownCounter with fixed timeout duration.

Parameters:

  • timeout (int) (defaults to: nil) —

    The timeout duration for callback to run, which MUST be a non-negative numeric value.

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

    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/observable_up_down_counter.rb', line 19

def observe(timeout: nil, attributes: {}); end

#register_callback(callback) ⇒ Object

Registers a callback function to report Measurements for this instrument.

Parameters:

  • callback (Proc) —

    the callback function



24
# File 'lib/opentelemetry/metrics/instrument/observable_up_down_counter.rb', line 24

def register_callback(callback); end

#unregister(callback) ⇒ Object

Unregisters a callback function previously registered via #register_callback.

Parameters:

  • callback (Proc) —

    the callback function



29
# File 'lib/opentelemetry/metrics/instrument/observable_up_down_counter.rb', line 29

def unregister(callback); end