Class: OpenTelemetry::SDK::Metrics::Instrument::ObservableUpDownCounter
- Inherits:
-
AsynchronousInstrument
- Object
- AsynchronousInstrument
- OpenTelemetry::SDK::Metrics::Instrument::ObservableUpDownCounter
- Defined in:
- lib/opentelemetry/sdk/metrics/instrument/observable_up_down_counter.rb
Overview
ObservableUpDownCounter is the SDK implementation of AsynchronousInstrument. Asynchronous UpDownCounter is an asynchronous Instrument which reports additive value(s) (e.g. the process heap size)
Instance Method Summary collapse
-
#instrument_kind ⇒ Symbol
Returns the instrument kind as a Symbol.
-
#observe(timeout: nil, attributes: {}) ⇒ Object
Observe the UpDownCounter with fixed timeout duration.
Methods inherited from AsynchronousInstrument
#add_attributes, #init_callback, #initialize, #register_callback, #register_with_new_metric_store, #timeout, #unregister
Constructor Details
This class inherits a constructor from OpenTelemetry::SDK::Metrics::Instrument::AsynchronousInstrument
Instance Method Details
#instrument_kind ⇒ Symbol
Returns the instrument kind as a Symbol
17 18 19 |
# File 'lib/opentelemetry/sdk/metrics/instrument/observable_up_down_counter.rb', line 17 def instrument_kind :observable_up_down_counter end |
#observe(timeout: nil, attributes: {}) ⇒ Object
Observe the UpDownCounter with fixed timeout duration.
28 29 30 |
# File 'lib/opentelemetry/sdk/metrics/instrument/observable_up_down_counter.rb', line 28 def observe(timeout: nil, attributes: {}) update(timeout, attributes) end |