Observability
Prometheus metrics, health checks, and operational monitoring for Yoke runtimes.
Yoke exposes Prometheus text format metrics and a simple health endpoint on the portal HTTP server.
Endpoints
| Endpoint | Response |
|---|---|
GET /health | ok — runtime booted and serving |
GET /metrics | Prometheus exposition format |
Both are served on the executor portal port (default 8080), alongside user-defined portal routes.
Control plane (port 8090) may expose separate health depending on deployment — check your control-plane configuration.
Metrics
| Metric | Type | Labels | Description |
|---|---|---|---|
yoke_stream_appends_total | counter | Stream append operations | |
yoke_fanout_enqueues_total | counter | Events enqueued via fan-out | |
yoke_actor_process_total | counter | process() invocations | |
yoke_actor_process_errors_total | counter | Failed process() calls | |
yoke_queue_dead_letters_total | counter | Dead-lettered events | |
yoke_queue_depth | gauge | instance_id | Per-instance queue depth |
yoke_runtime_workers | gauge | Workers with recent heartbeat |
Prometheus scrape config
scrape_configs:
- job_name: yoke
static_configs:
- targets: ["localhost:8080"]
metrics_path: /metricsAlerting suggestions
| Signal | Threshold idea | Meaning |
|---|---|---|
yoke_queue_depth | Sustained high per instance | Backlogged actor — scale concurrency or split instances |
yoke_actor_process_errors_total rate | Spike | Poison messages or code bugs |
yoke_queue_dead_letters_total | > 0 | Events gave up retrying |
yoke_runtime_workers | < expected | Worker crash or network partition |
/health down | Boot failure or process crash |
Logging
Runtime logs to stderr:
- Boot sequence steps and failures
- Deno worker load errors
process()uncaught exceptions (before requeue)- Portal
start()loop errors - Scheduler claim/dispatch (debug level)
Structured logging integration is deployment-specific — wrap the binary with your log collector.
Tracing
Correlation ids on events (ctx.correlation) enable cross-event tracing in external systems. Propagate correlation through ctx.append() chains and log it in process() handlers.
Stream seq provides global ordering for post-hoc debugging.
Multi-tenant monitoring
Per-tenant metrics require label filtering at scrape time or separate executor endpoints per tenant. Control plane scheduler metrics (pending tenants, active sandboxes) are deployment-specific.