powered by
Record a value of an OpenTelemetry histogram
histogram_record(name, value, attributes = NULL, context = NULL, meter = NULL)
The histogram object (otel_histogram), invisibly.
Name of the histogram.
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(), gauge_record(), up_down_counter_add()
counter_add()
gauge_record()
up_down_counter_add()
Other OpenTelemetry metrics API: counter_add(), gauge_record(), is_measuring_enabled(), up_down_counter_add()
is_measuring_enabled()
otel::histogram_record("response-time", 0.2)
Run the code above in your browser using DataLab