toTraceHeader

Should be able to convert the trace header to the format that is used in the headers of an http request

Import

1import { TraceHeader } from "@aa-sdk/core";

Usage

1const traceHeader =
2 TraceHeader.fromTraceHeader(headers) || TraceHeader.default();
3const headers = traceHeader.toTraceHeader();

Returns

{traceparent: string, tracestate: string} The trace header in the format of a record, used in our http client