Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @opentelemetry/core

Index

Type aliases

ENVIRONMENT

ENVIRONMENT: { CONTAINER_NAME?: string; ECS_CONTAINER_METADATA_URI?: string; ECS_CONTAINER_METADATA_URI_V4?: string; HOSTNAME?: string; KUBERNETES_SERVICE_HOST?: string; NAMESPACE?: string; OTEL_EXPORTER_JAEGER_AGENT_HOST?: string; OTEL_EXPORTER_JAEGER_ENDPOINT?: string; OTEL_EXPORTER_JAEGER_PASSWORD?: string; OTEL_EXPORTER_JAEGER_USER?: string; OTEL_EXPORTER_OTLP_ENDPOINT?: string; OTEL_EXPORTER_OTLP_HEADERS?: string; OTEL_EXPORTER_OTLP_METRICS_ENDPOINT?: string; OTEL_EXPORTER_OTLP_METRICS_HEADERS?: string; OTEL_EXPORTER_OTLP_TRACES_ENDPOINT?: string; OTEL_EXPORTER_OTLP_TRACES_HEADERS?: string; OTEL_EXPORTER_ZIPKIN_ENDPOINT?: string; OTEL_LOG_LEVEL?: DiagLogLevel; OTEL_RESOURCE_ATTRIBUTES?: string; OTEL_SERVICE_NAME?: string; OTEL_TRACES_EXPORTER?: string; OTEL_TRACES_SAMPLER?: string; OTEL_TRACES_SAMPLER_ARG?: string } & ENVIRONMENT_NUMBERS & ENVIRONMENT_LISTS

ErrorHandler

ErrorHandler: (ex: Exception) => void

Type declaration

    • (ex: Exception): void
    • Defines an error handler function

      Parameters

      • ex: Exception

      Returns void

RAW_ENVIRONMENT

RAW_ENVIRONMENT: {}

Type declaration

  • [key: string]: string | number | undefined | string[]

RPCMetadata

RPCMetadata: HTTPMetadata

Allows for future rpc metadata to be used with this mechanism

Variables

Const DEFAULT_ENVIRONMENT

DEFAULT_ENVIRONMENT: Required<ENVIRONMENT> = ...

Default environment variables

Const SDK_INFO

SDK_INFO: {} = ...

Constants describing the SDK in use

Type declaration

Const TRACE_PARENT_HEADER

TRACE_PARENT_HEADER: "traceparent" = 'traceparent'

Const TRACE_STATE_HEADER

TRACE_STATE_HEADER: "tracestate" = 'tracestate'

Const VERSION

VERSION: "0.25.0" = '0.25.0'

Const otperformance

otperformance: Performance = ...

Functions

deleteRPCMetadata

  • deleteRPCMetadata(context: Context): Context

getEnv

getRPCMetadata

  • getRPCMetadata(context: Context): RPCMetadata | undefined

globalErrorHandler

  • globalErrorHandler(ex: Exception): void

hexToBase64

  • hexToBase64(hexStr: string): string

hrTime

  • hrTime(performanceNow?: number): api.HrTime

hrTimeDuration

  • hrTimeDuration(startTime: api.HrTime, endTime: api.HrTime): api.HrTime

hrTimeToMicroseconds

  • hrTimeToMicroseconds(time: api.HrTime): number

hrTimeToMilliseconds

  • hrTimeToMilliseconds(time: api.HrTime): number

hrTimeToNanoseconds

  • hrTimeToNanoseconds(time: api.HrTime): number

hrTimeToTimeStamp

  • hrTimeToTimeStamp(time: api.HrTime): string

isAttributeValue

  • isAttributeValue(val: unknown): val is SpanAttributeValue

isTimeInput

  • isTimeInput(value: unknown): value is number | HrTime | Date

isTimeInputHrTime

  • isTimeInputHrTime(value: unknown): value is HrTime

isTracingSuppressed

  • isTracingSuppressed(context: Context): boolean

isUrlIgnored

  • isUrlIgnored(url: string, ignoredUrls?: (string | RegExp)[]): boolean

isWrapped

loggingErrorHandler

parseEnvironment

parseTraceParent

  • parseTraceParent(traceParent: string): SpanContext | null
  • Parses information from the [traceparent] span tag and converts it into {@link SpanContext}

    Parameters

    • traceParent: string

      A meta property that comes from server. It should be dynamically generated server side to have the server's request trace Id, a parent span Id that was set on the server's request span, and the trace flags to indicate the server's sampling decision (01 = sampled, 00 = not sampled). for example: '{version}-{traceId}-{spanId}-{sampleDecision}' For more information see https://www.w3.org/TR/trace-context/

    Returns SpanContext | null

sanitizeAttributes

  • sanitizeAttributes(attributes: unknown): SpanAttributes

setGlobalErrorHandler

setRPCMetadata

  • setRPCMetadata(context: Context, meta: RPCMetadata): Context

suppressTracing

  • suppressTracing(context: Context): Context

timeInputToHrTime

  • timeInputToHrTime(time: api.TimeInput): api.HrTime

unrefTimer

  • unrefTimer(timer: NodeJS.Timer): void

unsuppressTracing

  • unsuppressTracing(context: Context): Context

urlMatches

  • urlMatches(url: string, urlToMatch: string | RegExp): boolean

Generated using TypeDoc