Skip to content

Overview & Quick Start

OpenTelemetry Health Integration

@nexload-sdk/healthcheck-otel

v2.1.0 Stable Released

OpenTelemetry-friendly transforms for @nexload-sdk/healthcheck reports.

Node.jsBun

@nexload-sdk/healthcheck-otel transforms @nexload-sdk/healthcheck reports into OpenTelemetry attributes, structured semantic conventions, and metrics payloads without mandatory dependencies on heavy @opentelemetry/api packages.


import { createHealthManager } from "@nexload-sdk/healthcheck";
import { otelExporter } from "@nexload-sdk/healthcheck-otel";
const health = createHealthManager({ service: { name: "api" } });
const exporter = otelExporter({ namespace: "app" });
const report = await health.run("readiness");
const attributes = exporter.exportAttributes(report);
// Ready to attach to an active OpenTelemetry trace span or log record

  • OTel Semantic Conventions: Standard attributes: health.status, health.service.name, and individual check attributes.
  • Span Metadata Formatter: Automatically attaches health reports to active distributed trace spans.
  • Zero Heavy SDK Dependencies: Pure data transformers that work with any existing OpenTelemetry collector or custom logger.

Terminal window
pnpm add @nexload-sdk/healthcheck-otel @nexload-sdk/healthcheck

Requires Node.js >=20.9.0 or Bun >=1.0.0.