Class: OpenTelemetry::SDK::Metrics::Instrument::ObservableGauge
- Inherits:
-
AsynchronousInstrument
- Object
- AsynchronousInstrument
- OpenTelemetry::SDK::Metrics::Instrument::ObservableGauge
- Defined in:
- lib/opentelemetry/sdk/metrics/instrument/observable_gauge.rb
Overview
ObservableGauge is the SDK implementation of AsynchronousInstrument. Asynchronous Gauge is an asynchronous Instrument which reports non-additive value(s) (e.g. the room temperature)
Instance Method Summary collapse
-
#instrument_kind ⇒ Symbol
Returns the instrument kind as a Symbol.
-
#observe(timeout: nil, attributes: {}) ⇒ Object
Observe the Gauge 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_gauge.rb', line 17 def instrument_kind :observable_gauge end |
#observe(timeout: nil, attributes: {}) ⇒ Object
Observe the Gauge with fixed timeout duration.
28 29 30 |
# File 'lib/opentelemetry/sdk/metrics/instrument/observable_gauge.rb', line 28 def observe(timeout: nil, attributes: {}) update(timeout, attributes) end |