Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TraceCLS

An implementation of continuation-local storage for the Trace Agent. In addition to the underlying API, there is a guarantee that when an instance of this class is disabled, all context-manipulation methods will either be no-ops or pass-throughs.

Hierarchy

  • TraceCLS

Implements

Index

Constructors

constructor

Properties

rootSpanStackOffset

rootSpanStackOffset: number

Stack traces are captured when a root span is started. Because the stack trace height varies on the context propagation mechanism, to keep published stack traces uniform we need to remove the top-most frames when using the c-l-s module. Keep track of this number here.

Static UNCORRELATED

UNCORRELATED: RootContext = UNCORRELATED_ROOT_SPAN

Static UNTRACED

UNTRACED: RootContext = UNTRACED_ROOT_SPAN

Methods

bindWithCurrentContext

  • bindWithCurrentContext<T>(fn: Func<T>): Func<T>

disable

  • disable(): void

enable

  • enable(): void

getContext

isEnabled

  • isEnabled(): boolean

patchEmitterToPropagateContext

  • patchEmitterToPropagateContext<T>(ee: EventEmitter): void

runWithContext

Generated using TypeDoc