Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
@suaveplan/events-metrics - OTel metrics companion for @suaveplan/events: dispatch counters, latency histograms, queue-depth gauges, and active-subscriber counts via interceptor API.
Summary
OTel metrics companion for @suaveplan/events. Attaches via the public interceptor API to record dispatch totals, listener error counts, and latency histograms per event name.
Documentation tree
- attach-event-metrics — (no submodules)
- attach-event-metrics — (no submodules)
- metric-names — (no submodules)
- metric-names — (no submodules)
Quick Start
import { EventBus } from "@suaveplan/events";
import { attachEventMetrics } from "@suaveplan/events-metrics";
const bus = new EventBus();
const handle = attachEventMetrics(bus);
await bus.emitAsync("user.created", { id: "u-1" });
console.log(handle.snapshot().dispatchTotal["user.created"]); // 1
handle.detach();
Modules
src/core/attach-event-metrics/attach-event-metrics—attachEventMetrics,EventMetricsHandle,MetricsSnapshotsrc/metrics/metric-names/metric-names—METRIC_NAMES,ATTRIBUTE_KEYS