@ihsm/otel
v0.1.25
Published
OpenTelemetry integration for ihsm — traces and logs via native instrumentation seams
Readme
@ihsm/otel
OpenTelemetry bridge for ihsm — traces and structured logs via the native Instrumentation seam (registerCollector / createConsoleInstrumentation).
Peer-depends on ihsm (≥ 0.1.25). No tracing code in actor handlers; register a provider once, then every spawned actor reports automatically.
Install
npm install ihsm @ihsm/otelNode (server)
import { registerCollector, makeActor, Port } from 'ihsm';
import { startOtelNode } from '@ihsm/otel/node';
const stop = startOtelNode({ serviceName: 'my-service' });
registerCollector(stop.instrumentation);
const actor = makeActor(Top, ctx, { initialize: true });Browser
import { registerCollector } from 'ihsm';
import { startOtelBrowser } from '@ihsm/otel/browser';
const stop = startOtelBrowser({ serviceName: 'my-app' });
registerCollector(stop.instrumentation);Testing
import { createIhsmSignalCollector, settle, processSignals } from '@ihsm/otel/testing';See OTEL-SPEC.md and the spec under spec/ for the conformance model.
Release
Published on the same semver tag as ihsm and @ihsm/core via .github/workflows/release.yml.
Production install (npm install @ihsm/otel) pulls only @opentelemetry/* runtime deps plus peer ihsm. Test tooling, eslint, and the docs site (Docusaurus under website/) are dev-only and never published (files: ["lib"]).
Development
# Build ihsm first (otel tests consume a packed tarball, not file:../ihsm — avoids ihsm's Docusaurus/Playwright tree)
cd ../ihsm && npm run build
cd ../otel && npm run pack:ihsm && npm ci
npm test
npm run verify:prod # npm audit --omit=dev (production dependency tree only)Docs site (optional, separate lockfile): npm run doc:build
