Skip to content

The return value can be used as the parent option when starting a span.

Usage

extract_http_context(headers)

Arguments

headers

A named list with one or two strings: traceparent is mandatory, and tracestate is optional.

Value

And otel_span_context object.

Examples

hdr <- otel::pack_http_context()
ctx <- otel::extract_http_context()
ctx$is_valid()
#> [1] FALSE