class OpenTelemetry::Metrics::Meter
def create_observable_counter(name, callback:, unit: nil, description: nil)
-
(nil)
- after creation of observable_counter, it will be stored in instrument_registry
Parameters:
-
description
(optional String
) -- an optional free-form text provided by user. -
unit
(optional String
) -- an optional string provided by user. -
callback
(Proc
) -- the callback function that used to collect metrics -
name
(String
) -- the name of the observable_counter
def create_observable_counter(name, callback:, unit: nil, description: nil) create_instrument(:observable_counter, name, unit, description, callback) { OBSERVABLE_COUNTER } end