Learn R Programming

otel (version 0.2.0)

histogram_record: Record a value of an OpenTelemetry histogram

Description

Record a value of an OpenTelemetry histogram

Usage

histogram_record(name, value, attributes = NULL, context = NULL, meter = NULL)

Value

The histogram object (otel_histogram), invisibly.

Arguments

name

Name of the histogram.

value

Value to record.

attributes

Additional attributes to add.

context

Span context. If missing the active context is used, if any.

meter

Meter object (otel_meter). Otherwise it is passed to get_meter() to get a meter.

See Also

Other OpenTelemetry metrics instruments: counter_add(), gauge_record(), up_down_counter_add()

Other OpenTelemetry metrics API: counter_add(), gauge_record(), is_measuring_enabled(), up_down_counter_add()

Examples

Run this code
otel::histogram_record("response-time", 0.2)

Run the code above in your browser using DataLab