Options
All
  • Public
  • Public/Protected
  • All
Menu

Singleton object which represents the entry point to the OpenTelemetry Tracing API

Hierarchy

  • TraceAPI

Index

Constructors

Private constructor

  • Empty private constructor prevents end users from constructing a new instance of the API

    Returns TraceAPI

Properties

Private _proxyTracerProvider

_proxyTracerProvider: ProxyTracerProvider = ...

deleteSpan

deleteSpan: (context: Context) => Context = ...

Type declaration

    • Remove current span stored in the context

      Parameters

      • context: Context

        context to delete span from

      Returns Context

getSpan

getSpan: (context: Context) => Span | undefined = ...

Type declaration

    • Return the span if one exists

      Parameters

      • context: Context

        context to get span from

      Returns Span | undefined

getSpanContext

getSpanContext: (context: Context) => SpanContext | undefined = ...

Type declaration

isSpanContextValid

isSpanContextValid: (spanContext: SpanContext) => boolean = ...

Type declaration

setSpan

setSpan: (context: Context, span: Span) => Context = ...

Type declaration

setSpanContext

setSpanContext: (context: Context, spanContext: SpanContext) => Context = ...

Type declaration

wrapSpanContext

wrapSpanContext: (spanContext: SpanContext) => Span = ...

Type declaration

Static Private Optional _instance

_instance: TraceAPI

Methods

disable

  • disable(): void
  • Remove the global tracer provider

    Returns void

getTracer

  • getTracer(name: string, version?: string): Tracer
  • Returns a tracer from the global tracer provider.

    Parameters

    • name: string
    • Optional version: string

    Returns Tracer

getTracerProvider

setGlobalTracerProvider

  • Set the current global tracer.

    Parameters

    Returns boolean

    true if the tracer provider was successfully registered, else false

Static getInstance