Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/core-tracing

Package version

Index

Type aliases

Exception

An Exception for a Span.

HrTime

HrTime: [number, number]

Represents high resolution time.

LinkContext

LinkContext: { spanId: string; traceId: string }

Context for the linked span.

Type declaration

  • spanId: string
  • traceId: string

SpanAttributeValue

SpanAttributeValue: string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>

Attribute values may be any non-nullish primitive value except an object.

null or undefined attribute values are invalid and will result in undefined behavior.

TimeInput

TimeInput: HrTime | number | Date

Used to represent a Time.

Variables

Const GLOBAL_TRACER_SYMBOL

GLOBAL_TRACER_SYMBOL: any = Symbol.for("@azure/core-tracing.tracerCache3")

Const GLOBAL_TRACER_VERSION

GLOBAL_TRACER_VERSION: 4 = 4

Const VERSION

VERSION: "00" = "00"

Let cache

Const context

context: ContextAPI = otContext

Entrypoint for context API

Let defaultTracer

defaultTracer: Tracer

Functions

extractSpanContextFromTraceParentHeader

  • extractSpanContextFromTraceParentHeader(traceParentHeader: string): SpanContext | undefined
  • Generates a SpanContext given a traceparent header value.

    Parameters

    • traceParentHeader: string

    Returns SpanContext | undefined

    The SpanContext generated from the traceparent value.

getCache

getDefaultTracer

getGlobalObject

  • getGlobalObject(): any

getSpan

getSpanContext

getTraceParentHeader

  • getTraceParentHeader(spanContext: SpanContext): string | undefined
  • Generates a traceparent value given a span context.

    Parameters

    • spanContext: SpanContext

      Contains context for a specific span.

    Returns string | undefined

    The spanContext represented as a traceparent value.

getTracer

  • Retrieves the active tracer, or returns a no-op implementation if one is not set.

    Returns Tracer

isTracer

isWrappedSpan

  • isWrappedSpan(span?: Span | SpanContext | null): span is OpenCensusSpanWrapper

loadTracerCache

  • loadTracerCache(): void

setSpan

setSpanContext

  • Wrap span context in a NoopSpan and set as span in a new context

    Parameters

    • context: Context

      context to set active span on

    • spanContext: SpanContext

      span context to be wrapped

    Returns Context

setTracer

  • setTracer(tracer: Tracer): void
  • Sets the global tracer, enabling tracing for the Azure SDK.

    Parameters

    • tracer: Tracer

      An OpenTelemetry Tracer instance.

    Returns void

Generated using TypeDoc