Learn R Programming

otel (version 0.2.0)

pack_http_context: Pack the currently active span context into standard HTTP OpenTelemetry headers

Description

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

Usage

pack_http_context()

Arguments

Value

A named character vector, with lowercase names. It might be an empty vector, e.g. if tracing is disabled.

See Also

extract_http_context()

Examples

Run this code
hdr <- otel::pack_http_context()
ctx <- otel::extract_http_context()
ctx$is_valid()

Run the code above in your browser using DataLab