powered by
Get a meter from the default meter provider
get_meter( name = NULL, version = NULL, schema_url = NULL, attributes = NULL, ..., provider = NULL )
An otel_meter object.
Name of the new tracer. If missing, then deduced automatically.
Optional. Specifies the version of the instrumentation scope if the scope has a version (e.g. R package version). Example value: "1.0.0".
"1.0.0"
Optional. Specifies the Schema URL that should be recorded in the emitted telemetry.
Optional. Specifies the instrumentation scope attributes to associate with emitted telemetry.
Additional arguments are passed to the get_meter() method of the provider.
get_meter()
Meter provider to use. If NULL, then it uses get_default_meter_provider() to get a tracer provider.
NULL
get_default_meter_provider()
Other low level metrics API: get_default_meter_provider(), meter_provider_noop, otel_counter, otel_gauge, otel_histogram, otel_meter, otel_meter_provider, otel_up_down_counter
meter_provider_noop
otel_counter
otel_gauge
otel_histogram
otel_meter
otel_meter_provider
otel_up_down_counter
myfun <- function() { mtr <- otel::get_meter() ctr <- mtr$create_counter("session-count") ctr$add(1) } myfun()
Run the code above in your browser using DataLab