- Persisted lifecycle events
- Structured logs
- OpenTelemetry spans
- Effect metrics exported over OTLP
Enable OpenTelemetry Export
Local Prometheus + Grafana Stack
| Service | Endpoint |
|---|---|
| OTLP collector | http://localhost:4318 |
| Prometheus | http://localhost:9090 |
| Grafana | http://localhost:3000 |
| Tempo | http://localhost:3200 |
:8889; Prometheus scrapes it; Grafana ships with a pre-provisioned Smithers dashboard.
The built-in HTTP server also exposes GET /metrics in Prometheus text exposition format.
Direct Prometheus Endpoint
Built-in Metrics
| Category | Metrics |
|---|---|
| Runs | runsTotal, activeRuns, runsResumedTotal, runsFinishedTotal, runsFailedTotal, runsCancelledTotal |
| Nodes | nodesStarted, nodesFinished, nodesFailed, activeNodes, nodeRetriesTotal |
| Duration | nodeDuration, attemptDuration, runDuration |
| Tools | toolCallsTotal, toolDuration, toolCallErrorsTotal, toolOutputTruncatedTotal |
| Cache | cacheHits, cacheMisses |
| Database | dbQueryDuration, dbRetries |
| Scheduler | schedulerQueueDepth, schedulerConcurrencyUtilization, schedulerWaitDuration |
| Approvals | approvalsRequested, approvalsGranted, approvalsDenied, approvalPending, approvalWaitDuration |
| Tokens | tokensInputTotal, tokensOutputTotal, tokensCacheReadTotal, tokensCacheWriteTotal, tokensReasoningTotal |
| HTTP | httpRequests, httpRequestDuration |
| Hot reload | hotReloads, hotReloadFailures, hotReloadDuration |
| VCS | vcsDuration |
| Process | processUptimeSeconds, processMemoryRssBytes, processHeapUsedBytes |
| Errors | errorsTotal, eventsEmittedTotal |
Observability as a Dependency
- Call
createSmithersObservabilityLayer(...)once in the app layer - Depend on
SmithersObservabilityin services that need Smithers-scoped spans - Use standard Effect
Metricprimitives for custom application metrics
Events and Logs
OTLP does not replace the durable event log. Every run still persists events to:Server Instrumentation
HTTP server requests are instrumented:smithers.http.requestscountersmithers.http.request_duration_mshistogram- Request, workflow-load, and body-read spans flow through the OTLP layer
Next Steps
- Debugging — CLI and SQLite failure diagnosis.
- Events Reference — Full event type definitions.
- Server Integration — HTTP server and SSE endpoint.