Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/w3_trace_state/trace_state.ts>addTraceStateValue

Implementation of the W3 Trace Context recommendation for Trace State
Latest
function addTraceStateValue
import { addTraceStateValue } from "https://deno.land/x/w3_trace_state@v1.1.0/trace_state.ts";

Adds a value to the TraceState. The key and value must be valid trace key/value pairs and an error will be thrown if they are not.

This will fallback to updateTraceStateValue if the key already exists in the TraceState.

Parameters

state: TraceState

a valid TraceState

key: string

a valid trace key

value: string

a valid trace value

Returns

a new TraceState with the new key/value pair added