tracer_provider_memory | R Documentation |
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.
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.
tp <- tracer_provider_memory$new(opts = NULL) tp$get_spans() tracer_provider_memory$options()
tp$get_spans()
erases the internal buffer of the tracer provider.
opts
: Named list of options. See below.
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 from
the opts
argument, or
the OTEL_R_EXPORTER_MEMORY_TRACES_BUFFER_SIZE
environment variable, or
the OTEL_R_EXPORTER_MEMORY_BUFFER_SIZE
environment variable, or
the default is 100
.
tracer_provider_memory$options()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.