class OpenTelemetry::Metrics::Meter

def create_observable_gauge(name, callback:, unit: nil, description: nil)

Returns:
  • (nil) - after creation of observable_gauge, 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_gauge
def create_observable_gauge(name, callback:, unit: nil, description: nil)
  create_instrument(:observable_gauge, name, unit, description, callback) { OBSERVABLE_GAUGE }
end