Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @opentelemetry/core

Index

Type Aliases

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_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_CLIENT_KEY?: string; OTEL_EXPORTER_OTLP_COMPRESSION?: string; OTEL_EXPORTER_OTLP_ENDPOINT?: string; OTEL_EXPORTER_OTLP_HEADERS?: string; OTEL_EXPORTER_OTLP_INSECURE?: string; OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY?: string; OTEL_EXPORTER_OTLP_LOGS_COMPRESSION?: string; OTEL_EXPORTER_OTLP_LOGS_ENDPOINT?: string; OTEL_EXPORTER_OTLP_LOGS_HEADERS?: string; OTEL_EXPORTER_OTLP_LOGS_INSECURE?: string; OTEL_EXPORTER_OTLP_LOGS_PROTOCOL?: string; OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY?: string; OTEL_EXPORTER_OTLP_METRICS_COMPRESSION?: string; OTEL_EXPORTER_OTLP_METRICS_ENDPOINT?: string; OTEL_EXPORTER_OTLP_METRICS_HEADERS?: string; OTEL_EXPORTER_OTLP_METRICS_INSECURE?: string; OTEL_EXPORTER_OTLP_METRICS_PROTOCOL?: string; OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE?: string; OTEL_EXPORTER_OTLP_PROTOCOL?: string; OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE?: string; OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY?: string; OTEL_EXPORTER_OTLP_TRACES_COMPRESSION?: string; OTEL_EXPORTER_OTLP_TRACES_ENDPOINT?: string; OTEL_EXPORTER_OTLP_TRACES_HEADERS?: string; OTEL_EXPORTER_OTLP_TRACES_INSECURE?: string; OTEL_EXPORTER_OTLP_TRACES_PROTOCOL?: string; OTEL_EXPORTER_ZIPKIN_ENDPOINT?: string; OTEL_LOGS_EXPORTER?: 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_BOOLEANS & ENVIRONMENT_NUMBERS & ENVIRONMENT_LISTS
ErrorHandler: ((ex: Exception) => void)

Type declaration

    • Defines an error handler function

      Parameters

      Returns void

RAW_ENVIRONMENT: {}

Type declaration

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

Allows for future rpc metadata to be used with this mechanism

Variables

DEFAULT_ATTRIBUTE_COUNT_LIMIT: 128 = 128
DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT: number = Infinity
DEFAULT_ENVIRONMENT: Required<ENVIRONMENT> = ...

Default environment variables

DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT: 128 = 128
DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT: 128 = 128
SDK_INFO: { process.runtime.name: string; telemetry.sdk.language: string; telemetry.sdk.name: string; telemetry.sdk.version: string } = ...

Constants describing the SDK in use

Type declaration

  • process.runtime.name: string
  • telemetry.sdk.language: string
  • telemetry.sdk.name: string
  • telemetry.sdk.version: string
TRACE_PARENT_HEADER: "traceparent" = 'traceparent'
TRACE_STATE_HEADER: "tracestate" = 'tracestate'
VERSION: "1.28.0" = '1.28.0'
_globalThis: typeof globalThis = ...

only globals that common to node and browsers are allowed

baggageUtils: { getKeyPairs: ((baggage: Baggage) => string[]); parseKeyPairsIntoRecord: ((value?: string) => Record<string, string>); parsePairKeyValue: ((entry: string) => ParsedBaggageKeyValue | undefined); serializeKeyPairs: ((keyPairs: string[]) => string) } = ...

Type declaration

internal: { _export: (<T>(exporter: Exporter<T>, arg: T) => Promise<ExportResult>) } = ...

Type declaration

  • _export: (<T>(exporter: Exporter<T>, arg: T) => Promise<ExportResult>)
      • internal

        Shared functionality used by Exporters while exporting data, including suppression of Traces.

        Type Parameters

        • T

        Parameters

        Returns Promise<ExportResult>

otperformance: Performance = performance

Functions

  • callWithTimeout<T>(promise: Promise<T>, timeout: number): Promise<T>
  • Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise rejects, and resolves if the specified promise resolves.

    NOTE: this operation will continue even after it throws a TimeoutError.

    Type Parameters

    • T

    Parameters

    • promise: Promise<T>

      promise to use with timeout.

    • timeout: number

      the timeout in milliseconds until the returned promise is rejected.

    Returns Promise<T>

  • getTimeOrigin(): number
  • hexToBase64(hexStr: string): string
  • hexToBinary(hexStr: string): Uint8Array
  • hrTime(performanceNow?: number): api.HrTime
  • hrTimeDuration(startTime: HrTime, endTime: HrTime): api.HrTime
  • hrTimeToMicroseconds(time: HrTime): number
  • hrTimeToMilliseconds(time: HrTime): number
  • hrTimeToNanoseconds(time: HrTime): number
  • hrTimeToTimeStamp(time: HrTime): string
  • isAttributeKey(key: unknown): key is string
  • isTimeInput(value: unknown): value is number | HrTime | Date
  • isTimeInputHrTime(value: unknown): value is HrTime
  • isTracingSuppressed(context: Context): boolean
  • isUrlIgnored(url: string, ignoredUrls?: (string | RegExp)[]): boolean
  • merge(...args: any[]): any
  • millisToHrTime(epochMillis: number): api.HrTime
  • parseTraceParent(traceParent: string): SpanContext | null
  • timeInputToHrTime(time: TimeInput): api.HrTime
  • unrefTimer(timer: Timer): void
  • urlMatches(url: string, urlToMatch: string | RegExp): boolean

Generated using TypeDoc