Tesserae
e‑ink 디스플레이용 무료 오픈소스 대시보드 서버, 브라우저에서 대시보드 구성·프레임 렌더링·MQTT·REST 전송, 자체 호스팅·추적 없음
Standard diagnostics-channel convention (aviary:<lib>:<event>) for NestJS + a single generic Telescope watcher. Emit once, observe everywhere.
README 전체를 불러오는 중입니다.
README 전문 보기 ↗@dudousxd/nestjs-diagnosticsA tiny, standard convention for @dudousxd/nestjs-* libraries to emit observability events over Node's built-in diagnostics_channel — with zero overhead when nobody is listening, and never coupled to any one consumer. A library calls emit('authz', 'decision', payload) and is done; whoever wants to observe it subscribes. Telescope is one consumer — so is an OpenTelemetry span, an APM, a logger, or an assertion in a test.
| Package | Description |
|---|---|
@dudousxd/nestjs-diagnostics | The core convention — emit, the channel registry, and trace correlation. |
@dudousxd/nestjs-diagnostics-telescope | One generic Telescope watcher that records every aviary:<lib>:<event> event. |
pnpm add @dudousxd/nestjs-diagnostics
There's nothing to register — no module, no provider. The package is a set of functions over Node's diagnostics_channel.
Every event flows over a channel named aviary:<lib>:<event> and carries a standard envelope:
interface DiagnosticEvent<TPayload = unknown> {
ts: number; // Date.now() at publish time
lib: string; // the <lib>, e.g. "authz"
event: string; // the <event>, e.g. "decision"
traceId?: string; // auto-filled from nestjs-context when present
payload: TPayload; // your library-defined data
}
Call emit from your provider wherever something interesting happens:
import { Injectable } from '@nestjs/common';
import { emit } from '@dudousxd/nestjs-diagnostics';
@Injectable()
export class BillingService {
async markInvoicePaid(invoiceId: string, amount: number) {
// … your domain logic …
emit('billing', 'invoice-paid', { invoiceId, amount });
}
}
emit builds and publishes the envelope only when the channel has subscribers (channel.hasSubscribers), so a production process with no observer attached pays essentially nothing per call. It never throws — observability must not break the emitting code path.
diagnostics_channel has no wildcard subscription, so the package keeps a registry of every channel it has created. A generic consumer subscribes to all current channels and any registered later:
import { registeredChannels, onChannelRegistered } from '@dudousxd/nestjs-diagnostics';
for (const name of registeredChannels()) subscribe(name);
const off = onChannelRegistered(subscribe);
That's exactly how the single Telescope watcher records every event — and how you wire OpenTelemetry, an APM, or your own subscriber. See the Consumers guide.
Full docs — Quickstart, trace correlation, and every consumer integration — live in the Aviary field guide:
→ https://davidecarvalho.github.io/aviary/docs/diagnostics
MIT