function contextToTraceparent
Since 0.2.0
contextToTraceparent(context: TelemetryContext): string | null

Formats a context as a W3C traceparent value.

Parameters

The trace context to format

Return Type

string | null

A header value, or null when the context has no span identity

Usage

import { contextToTraceparent } from "common/src/index.ts";