This is sometimes useful, to add additional attributes or links to the currently active span.
Value
The active span, an otel_span object, if any, or an invalid span if there is no active span.
Examples
fun <- function() {
otel::start_local_active_span("fun")
spn <- otel::get_active_span()
spn$set_attribute("key", "attribute-value")
}
fun()