@siglo/monitor Adapter & Live DevTools
@siglo/monitor provides real-time workflow telemetry, dynamic DAG topology visualization, execution latency waterfalls, state diff inspection, SSE/WebSocket transports, and Prometheus metrics for Siglo applications.
1. Installation
2. Architecture & Components
3. Quick Start: Standalone Dev Server
4. Attaching to an Existing / Running Server
Scenario A: Remote Server with Authentication (Cross-Process or CLI)
Attach workflows to a monitor server already running in another terminal or remote cluster:POST /api/events batches without impeding workflow execution. If the monitor server is unreachable, the client buffer protects host memory via maxQueueSize (default: 1000).
Scenario B: In-Process Singleton (App Bootstrap)
When the monitor server is started once during application bootstrap:Scenario C: High-Throughput Buffered Worker Client
For serverless functions or worker pools pushing telemetry to a centralized monitor instance:5. Security & Production Hardening
When deploying@siglo/monitor across internal networks:
6. Web Framework Middlewares
Embed the live monitoring UI and endpoints directly into your existing HTTP application:Express
Fastify
Hono
7. Distributed Redis Pub/Sub
For distributed worker clusters across multiple containers, separate publisher and subscriber wiring to avoid republishing received events:8. Prometheus & Grafana
@siglo/monitor automatically exposes metrics at GET /metrics:
siglo_active_flows: Current active workflow gaugesiglo_flow_executions_total{status="..."}: Total workflow countersiglo_flow_duration_seconds: Workflow execution duration summarysiglo_step_retries_total: Step retry attempts countersiglo_steps_total{status="..."}: Step outcome counter
examples/zero-code-apm-dashboards/grafana/provisioning/dashboards/siglo-live-monitoring.json
9. Data Redaction
Automatic redaction masks credentials in event streams:password, token, secret, apikey, authorization, cookie, creditcard, ssn, privkey, privatekey
Custom redaction hooks can be supplied:
