Skip to content

The returned headers can be sent over HTTP, or set as environment variables for subprocesses.

Usage

pack_http_context()

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