You can use this function to test the OpenTelemetry output is
correctly generated for your package or application.
Usage
with_otel_record(expr, provider_args = list(), what = c("traces"))
Arguments
- expr
Expression to evaluate.
- provider_args
A list of arguments to pass to the in-memory
OpenTelemetry trace provider.
- what
Character vector, type(s) of OpenTelemetry output to collect.
Currently only "traces"
is supported.
Value
A list with the output for each output type. Currently only
contains traces
.
Details
It evaluates the supplied expression, collects OpenTelemetry output
from it and returns it.