Skip to main content
Module

x/tracecontext/mod.ts>traceparent.make

Blazing fast w3c Trace Contexts for any JS runtime
Latest
function traceparent.make
import { traceparent } from "https://deno.land/x/tracecontext@v0.2.0/mod.ts";
const { make } = traceparent;

Makes a new Traceparent which one can then toString() to get the value.

By default the flags are both sampled and randomed.

Examples

Example 1

const id = make();
String(id); // 00-aa3ee2e08eb134a292fb799969f2de62-62994ea4677bc463-01
const child = id.child();
String(child); // 00-aa3ee2e08eb134a292fb799969f2de62-5402ac6f6874d505-01