Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TracerBase

Package version

Interface for TracerBase

Hierarchy

Index

Properties

active

active: boolean

Get the active status from tracer instance

activeTraceParams

activeTraceParams: TraceParams

A configuration object for trace parameters

eventListeners

eventListeners: SpanEventListener[]

Get the eventListeners from tracer instance

logger

logger: Logger

A configuration for starting the tracer

propagation

propagation: Propagation

A propagation instance

sampler

sampler: Sampler

A sampler that will decide if the span will be sampled or not

Methods

onEndSpan

  • onEndSpan(span: Span): void
  • Happens when a span is ended

    Parameters

    Returns void

onStartSpan

  • onStartSpan(span: Span): void
  • Happens when a span is started

    Parameters

    Returns void

registerSpanEventListener

  • Register a OnEndSpanEventListener on the tracer instance

    Parameters

    Returns void

setCurrentRootSpan

  • setCurrentRootSpan(root: Span): void
  • Sets the current root span.

    Parameters

    Returns void

start

  • Start a tracer instance

    Parameters

    Returns this

    A tracer instance started

startChildSpan

  • Start a new Span instance to the currentRootSpan

    Parameters

    Returns Span

    The new Span instance started

startRootSpan

  • Start a new RootSpan to currentRootSpan

    Type parameters

    • T

    Parameters

    • options: TraceOptions

      Options for tracer instance

    • fn: function

      Callback function

        • Parameters

          Returns T

    Returns T

    The callback return

stop

  • stop(): this
  • Stop the tracer instance

    Returns this

unregisterSpanEventListener

  • Unregisters an end span event listener.

    Parameters

    Returns void

Generated using TypeDoc