Class: OpenTelemetry::SDK::Metrics::Instrument::Histogram
- Inherits:
-
SynchronousInstrument
- Object
- SynchronousInstrument
- OpenTelemetry::SDK::Metrics::Instrument::Histogram
- Defined in:
- lib/opentelemetry/sdk/metrics/instrument/histogram.rb
Overview
Histogram is the SDK implementation of Metrics::Histogram.
Instance Method Summary collapse
-
#instrument_kind ⇒ Symbol
Returns the instrument kind as a Symbol.
-
#record(amount, attributes: {}) ⇒ Object
Updates the statistics with the specified amount.
Methods inherited from SynchronousInstrument
#initialize, #register_with_new_metric_store
Constructor Details
This class inherits a constructor from OpenTelemetry::SDK::Metrics::Instrument::SynchronousInstrument
Instance Method Details
#instrument_kind ⇒ Symbol
Returns the instrument kind as a Symbol
16 17 18 |
# File 'lib/opentelemetry/sdk/metrics/instrument/histogram.rb', line 16 def instrument_kind :histogram end |
#record(amount, attributes: {}) ⇒ Object
Updates the statistics with the specified amount.
27 28 29 30 31 32 33 |
# File 'lib/opentelemetry/sdk/metrics/instrument/histogram.rb', line 27 def record(amount, attributes: {}) update(amount, attributes) nil rescue StandardError => e OpenTelemetry.handle_error(exception: e) nil end |