Skip to main content

nexus-observability-actor

Actor-system observability — internal actor-system state as OTEL observable gauges: live actor count, dead-letter total, and system running status. Collected on demand by the metric reader with zero polling overhead.

Install

terminal
composer require nexus-actors/observability-actor

What's in this package

ClassPurpose
ActorSystemMetricsRegisters nexus.actor_system.* gauges from ActorSystem state; call register() once at startup

Quick example

src/Bootstrap/MetricsSetup.php
use Monadial\Nexus\Observability\Actor\ActorSystemMetrics;

$metrics = new ActorSystemMetrics($obs, $system);
$metrics->register();
// Gauges are now collected on demand by the OTEL metric reader

Call register() once per system at startup. Calling it more than once registers duplicate instruments. The method is a no-op when $obs->isEnabled() returns false.

Emitted gauges

MetricDescription
nexus.actor_system.live_actorsNumber of live root actors in the system
nexus.actor_system.dead_lettersTotal dead-lettered messages captured
nexus.actor_system.running1 while the system is running, 0 otherwise

All gauges are dimensionless — there is no per-actor or per-message cardinality.

See also