Expand description
Consolidated diagnostics snapshots for feeds and the runtime.
The library exposes several independent observability surfaces:
FeedMetrics, QueueTelemetry, DecodeStatus, health events,
BatchMetrics, and per-frame Provenance. Each serves a specific
purpose, but downstream systems that want a comprehensive view of
runtime state must stitch them together manually.
This module provides composite snapshot types that unify the most commonly needed diagnostics into single, coherent reads:
FeedDiagnostics— everything about one feed in one call.RuntimeDiagnostics— every feed, batch coordinator, and output channel status in one call.
§Recommended consumption pattern
┌──────────────────┐
│ Dashboard / OPS │
└──────┬───────────┘
│ poll every 1–5 s
▼
runtime.diagnostics()
│
├─▶ RuntimeDiagnostics
│ .uptime
│ .feed_count / .max_feeds
│ .output_lag (in_lag, pending_lost)
│ .batches: Vec<BatchDiagnostics>
│ .processor_id, .metrics
│ .feeds: Vec<FeedDiagnostics> (sorted by FeedId)
│ .alive / .paused / .uptime
│ .metrics (frames counters, restarts)
│ .queues (source/sink depth + capacity)
│ .decode (hw/sw codec status)
│ .view (stability score, context status)
│ .batch_processor_id (links to .batches)
│
│ (complement with event-driven streams:)
│
runtime.health_subscribe() ← state transitions, errors, degradation
runtime.output_subscribe() ← per-frame provenance, admission, detectionsThe snapshot approach is intentionally poll-oriented. Snapshots are
cheap (atomic loads plus small allocations for the Vec and decode
detail String), idempotent, and do not perturb the pipeline.
Event-driven details (individual health events, per-frame provenance)
remain on their respective broadcast channels.
Structs§
- Batch
Diagnostics - Diagnostics snapshot for a batch coordinator.
- Feed
Diagnostics - Consolidated per-feed diagnostics snapshot.
- Output
LagStatus - Snapshot of the output broadcast channel’s saturation state.
- Runtime
Diagnostics - Consolidated runtime-wide diagnostics snapshot.
- View
Diagnostics - Summary of the camera view-system’s current health.
Enums§
- View
Status - High-level camera view health.