Skip to content

Healthcheck OpenTelemetry API

Functions

toOtelMetricRecords

Source
toOtelMetricRecords(report: HealthReport) => OtelMetricRecord[]

Exported from: @nexload-sdk/healthcheck-otel

Public function exported by @nexload-sdk/healthcheck-otel.

toOtelResourceAttributes

Source
toOtelResourceAttributes(report: HealthReport) => Record<string, string | number | boolean>

Exported from: @nexload-sdk/healthcheck-otel

Public function exported by @nexload-sdk/healthcheck-otel.

Interfaces

OtelMetricRecord

Source
interface OtelMetricRecord {
  name: string
  value: HealthMetricValue
  attributes: Record<string, string | number | boolean>
  unit?: string
  type?: HealthMetric["type"]
  observedAt: string
}

Exported from: @nexload-sdk/healthcheck-otel

Public interface exported by @nexload-sdk/healthcheck-otel.

  • toOtelResourceAttributes(report) returns semantic resource attributes.
  • toOtelMetricRecords(report) returns OtelMetricRecord[].
  • OtelMetricRecord contains name, value, attributes, optional unit/type, and observedAt.

The functions do not mutate the report or call an exporter. Source: src/index.ts.