Collects spans in memory. This is useful for testing your instrumented R package or application.
with_otel_record() uses this tracer provider.
Use with_otel_record() in your tests to record telemetry and check
that it is correct.
Value
tracer_provider_memory$new() returns an otel::otel_tracer_provider
object. tp$get_spans() returns a named list of recorded spans, with
the span names as names.
tracer_provider_memory$options() returns a named list, the current
values for all options.
Options
Memory exporter options
buffer_size: buffer size, this is the maximum number of spans or metrics measurements that the provider can record. Must be positive. Value is set fromthe
optsargument, orthe
OTEL_R_EXPORTER_MEMORY_TRACES_BUFFER_SIZEenvironment variable, orthe
OTEL_R_EXPORTER_MEMORY_BUFFER_SIZEenvironment variable, orthe default is
100.