ContextApiType
PackageAxial.Telemetry.JavaScript
The subset of the OpenTelemetry JS `context` api namespace this package calls.
Specification
activeSignature
this.active ()
``with``Signature
this.``with``
Summary
| Name | Signature | Synopsis |
|---|
| Operations |
| active | this.active () | Returns the currently active context. |
| ``with`` | this.``with`` | Runs the function with the given context active. |
Operations
kind:member
Returns the currently active context.
kind:member
Runs the function with the given context active. Cross-await propagation requires the
application's context manager (Node `AsyncLocalStorageContextManager`, browser `ZoneContextManager`).
Parameters
| Name | Type | Description |
|---|
| context | OtelContext | |
| operation | unit -> 'result | |