powered by
Record a value of an OpenTelemetry gauge
gauge_record(name, value, attributes = NULL, context = NULL, meter = NULL)
The gauge object (otel_gauge), invisibly.
Name of the gauge
Value to record.
Additional attributes to add.
Span context. If missing the active context is used, if any.
Meter object (otel_meter). Otherwise it is passed to get_meter() to get a meter.
get_meter()
Other OpenTelemetry metrics instruments: counter_add(), histogram_record(), up_down_counter_add()
counter_add()
histogram_record()
up_down_counter_add()
Other OpenTelemetry metrics API: counter_add(), histogram_record(), is_measuring_enabled(), up_down_counter_add()
is_measuring_enabled()
otel::gauge_record("temperature", 27)
Run the code above in your browser using DataLab