Overview & Quick Start
OpenTelemetry Health Integration
@nexload-sdk/healthcheck-otel
v3.0.1 ReleasedOpenTelemetry-friendly transforms for @nexload-sdk/healthcheck reports.
Examples follow workspace source. Check pending Changesets against your installed version.
SDK dependencies: @nexload-sdk/healthcheck
@nexload-sdk/healthcheck-otel converts a @nexload-sdk/healthcheck report into OpenTelemetry resource attributes and plain metric records. It has no dependency on any @opentelemetry/* package, so you feed the output to the SDK or exporter you already run.
10-Second Code Snippet
Section titled “10-Second Code Snippet”import { createHealthManager, runtimeInfoCheck } from "@nexload-sdk/healthcheck";import { toOtelMetricRecords, toOtelResourceAttributes } from "@nexload-sdk/healthcheck-otel";
const health = createHealthManager({ service: { name: "api", version: "1.0.0" }, checks: [runtimeInfoCheck()],});
const report = await health.run("diagnostics");const resourceAttributes = toOtelResourceAttributes(report);const records = toOtelMetricRecords(report);What You Get
Section titled “What You Get”toOtelResourceAttributes(report):service.name,service.version,deployment.environment.name,service.instance.id,process.runtime.name,process.runtime.version,host.archandos.type. A missing value becomes"unknown".toOtelMetricRecords(report):health.status,health.run.duration_ms,health.check.status,health.check.duration_ms, plus every collector metric inreport.metrics.- Numeric status encoding:
okis1,degradedis0.5,unhealthyis0. - No SDK dependency: the functions return plain objects. The package does not create spans, meters or OTLP requests.
Installation & Requirements
Section titled “Installation & Requirements”pnpm add @nexload-sdk/healthcheck-otel @nexload-sdk/healthchecknpm install @nexload-sdk/healthcheck-otel @nexload-sdk/healthcheckyarn add @nexload-sdk/healthcheck-otel @nexload-sdk/healthcheckbun add @nexload-sdk/healthcheck-otel @nexload-sdk/healthcheckRequires Node.js >=20.9.0 or Bun >=1.0.0.
Next Steps
Section titled “Next Steps”- Explore Production Guides & OTel Recipes to record the output with your own OpenTelemetry SDK.
- Check the API Reference & Signatures for the two functions and the
OtelMetricRecordshape.