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

x/w3_trace_state/mod.ts>updateTraceStateValue

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

Updates a value in 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 addTraceStateValue if the key does not exist 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 updated value