Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NoOpTracer

Package version

A no-op implementation of Tracer that can be used when tracing is disabled.

Hierarchy

Implements

Index

Methods

bind

  • bind<T>(target: T, _span?: Span): T
  • Bind a Span as the target's scope

    Type parameters

    • T

    Parameters

    • target: T

      An object to bind the scope.

    • Optional _span: Span

      A specific Span to use. Otherwise, use the current one.

    Returns T

getCurrentSpan

  • getCurrentSpan(): Span

startSpan

withSpan

  • withSpan<T>(_span: Span, fn: T): ReturnType<T>
  • Executes the given function within the context provided by a Span.

    Type parameters

    • T: (...args: unknown[]) => ReturnType<T>

    Parameters

    • _span: Span

      The span that provides the context.

    • fn: T

      The function to be executed.

    Returns ReturnType<T>

Generated using TypeDoc