Observability
Monitor tunnels, connections, and engine behavior.
Observability in rstream spans two layers: engine-level telemetry and hosted visibility in the Dashboard.
At the engine level, CE exposes Prometheus metrics and live Engine API state. Hosted rstream and private deployments can add persisted operational history and additional telemetry integrations.
In the hosted platform, the Dashboard can surface tunnel state, connection logs, and project usage without querying the operational metrics store directly.
Hosted usage data
Engine and TURN assign each logical connection or allocation to one canonical producer, then asynchronously emit additive usage deltas. The same canonical data feeds billing, Grafana's product views, and the Dashboard; traffic is not calculated once per screen.
The hosted usage contract is scoped by workspace, project, and, when present, deployment. It retains the dimensions needed for practical investigation:
- service, protocol, transport, plan, routing mode, and serving regions;
- client and target country, with subdivisions available in recent detailed data;
- transferred bytes, cumulative connection time, connections, allocations, errors, and authentication outcomes;
- connection-setup count, average, and histogram for p50/p95/p99 estimates;
- bounded agent family and version.
Five-minute rows retain exact detail for 45 days. Compact daily rows retain country-level trends and the same additive counters and setup histogram for 400 days. A Dashboard query automatically selects the daily contract for old historical windows, even when the selected window itself is short. This keeps a seven-day comparison from silently becoming empty merely because it is older than the detailed retention period.
Operational OpenMetrics data remains separate: it describes process health, dependencies, saturation, and failures. VictoriaMetrics or another Prometheus-compatible backend can store that data for Grafana, but it is not a tenant-facing usage database and the Next.js Dashboard does not connect to it.
Managed WebTTY adds two more observability layers: live session state from the engine and durable session metadata or recordings from hosted storage. The terminal content boundary depends on the WebTTY encryption mode. Metadata can be used for operations and audit without decrypting terminal payloads.
Engine Metrics
Prometheus metrics are optional. When enabled, the engine exposes an HTTP handler that serves metrics points under a configurable path, defaulting to /metrics.
For self-hosted CE, configure the Prometheus listener explicitly and keep it private or protected with a bearer token. See Self-Hosted Operations for runtime checks and scrape examples.
Event Stream
The engine event stream can be consumed over SSE or WebSocket. CE exposes live runtime events and point-in-time inventory. Persisted stream summaries belong to hosted rstream and private operational integrations when they are enabled.
For managed WebTTY, the event stream is the active-state surface:
| Event family | Purpose |
|---|---|
| Registered server online/offline | Show whether the enrolled server currently has an active engine tunnel. |
| Session started/ended | Keep active session lists current without polling. |
| Participant joined/left | Update live collaboration participant lists. |
| Control request created/resolved | Notify controllers, spectators, dashboards, and agent UIs. |
| Recording available/exported | Drive audit and retention workflows. |
Durable records are not live state. A registered server record can exist while the server is offline. A session can be active in the engine before its final recording is committed. The product UI combines Control plane metadata with engine runtime state.
Control plane storage
registered servers, policies, recording metadata, retention
|
| combined with
v
Engine live state
online tunnels, active sessions, participants, control requests
|
v
Dashboard, CLI, rstream ui, webhooks, automation