TracingContext interface

An interface structurally compatible with OpenTelemetry.

Methods

deleteValue(symbol)

Return a new context which inherits from this context but does not contain a value for the given key.

getValue(symbol)

Get a value from the context.

setValue(symbol, unknown)

Create a new context which inherits from this context and has the given key set to the given value.

Method Details

deleteValue(symbol)

Return a new context which inherits from this context but does not contain a value for the given key.

function deleteValue(key: symbol): TracingContext

Parameters

key

symbol

context key for which to clear a value

Returns

getValue(symbol)

Get a value from the context.

function getValue(key: symbol): unknown

Parameters

key

symbol

key which identifies a context value

Returns

unknown

setValue(symbol, unknown)

Create a new context which inherits from this context and has the given key set to the given value.

function setValue(key: symbol, value: unknown): TracingContext

Parameters

key

symbol

context key for which to set the value

value

unknown

value to set for the given key

Returns