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

getBinaryFormat

  • Returns the BinaryFormat interface for serializing/deserializing Spans.

    Returns BinaryFormat

getCurrentSpan

  • getCurrentSpan(): Span
  • Returns the current Span from the current context, if available.

    Returns Span

getHttpTextFormat

  • Returns the HttpTextFormat interface for injecting/extracting Spans.

    Returns HttpTextFormat

recordSpanData

  • recordSpanData(_span: Span): void
  • Send a pre-populated Span object to the exporter.

    Parameters

    • _span: Span

      The span to pass along.

    Returns void

startSpan

  • Starts a new Span.

    Parameters

    • _name: string

      The name of the span.

    • Optional _options: SpanOptions

      The SpanOptions used during Span creation.

    Returns Span

withSpan

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

    Type parameters

    • T: function

    Parameters

    • _span: Span

      The span that provides the context.

    • fn: T

      The function to be executed.

    Returns ReturnType<T>

Generated using TypeDoc