Pack the currently active span context into standard HTTP OpenTelemetry headers
Source:R/api.R
pack_http_context.Rd
The returned headers can be sent over HTTP, or set as environment variables for subprocesses.
Value
A named character vector, with lowercase names. It might be an empty vector, e.g. if tracing is disabled.
Examples
hdr <- otel::pack_http_context()
ctx <- otel::extract_http_context()
ctx$is_valid()
#> [1] FALSE