ContextApiType

PackageAxial.Telemetry.JavaScript
The subset of the OpenTelemetry JS `context` api namespace this package calls.

Specification

Kind
Type
Members
2
Examples
0
activeSignature
this.active ()
``with``Signature
this.``with``

Summary

NameSignatureSynopsis
activethis.active ()Returns the currently active context.
``with``this.``with``Runs the function with the given context active.

active

this.active ()
Member
Returns the currently active context.

Returns

OtelContext

``with``

this.``with``
Member
Runs the function with the given context active. Cross-await propagation requires the application's context manager (Node `AsyncLocalStorageContextManager`, browser `ZoneContextManager`).

Parameters

NameTypeDescription
contextOtelContext
operationunit -> 'result

Returns

'result