powered by
This is sometimes useful, to add additional attributes or links to the currently active span.
get_active_span()
The active span, an otel_span object, if any, or an invalid span if there is no active span.
fun <- function() { otel::start_local_active_span("fun") spn <- otel::get_active_span() spn$set_attribute("key", "attribute-value") } fun()
Run the code above in your browser using DataLab