Stats Performance
Abyss Monitor can collect your Application's system metrics (CPU, memory, disk usage) and display them in your dashboard. This lets you correlate an error or latency spike with resource pressure.
Start the publisher
The @abyss-project/monitor SDK exposes a StatsPublisher that periodically measures and sends metrics for the running process:
import { AbyssMonitorCore } from '@abyss-project/monitor';
AbyssMonitorCore.StatsPublisher.start({
// Required: an Abyss Monitor logger instance
logger: logger,
// Optional: custom processId, defaults to process.pid
processId: process.pid.toString(),
});
Once start() is called, the publisher runs in the background and emits metrics on a regular interval to Abyss Monitor. There's nothing else to wire.
The StatsPublisher accepts other options (interval, metrics to publish, process label). Refer to the @abyss-project/monitor package for the full list.
Inspect the metrics
In Abyss Monitor, open your Application and the Stats tab. You'll find:
- CPU, memory and disk history over the chosen period,
- a per-process view if multiple instances publish in parallel (microservices, workers),
- the ability to overlay these curves with log and event volume to quickly spot correlations.
Multiple processes
If your Application runs as several instances, start one StatsPublisher per process and pass a distinct processId to each one. Abyss Monitor aggregates the metrics while keeping the option to filter per process.
Disable
In sensitive production setups, you may choose not to publish stats (e.g. for short-lived CLIs). Simply don't call start(). No metrics will be sent and the dashboard will stay empty for that Application.