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

x/w3_trace_state/trace_state.ts>getTraceStateValue

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

Extract a value from the TraceState. The key must be a valid trace key and an error will be thrown if it is not

Parameters

state: TraceState

a valid TraceState

key: string

a valid trace key

Returns

string | undefined

the value associated with the key, or undefined if the key does not exist in the TraceState