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
Operations
activethis.active ()Returns the currently active context.
``with``this.``with``Runs the function with the given context active.

Operations

kind:member

active

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

Returns

OtelContext
kind:member

``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