| Crates.io | videocall-diagnostics |
| lib.rs | videocall-diagnostics |
| version | 0.1.2 |
| created_at | 2025-07-07 14:05:40.325419+00 |
| updated_at | 2025-08-10 03:41:33.326559+00 |
| description | Lightweight diagnostics event bus for the videocall-rs project |
| homepage | https://github.com/security-union/videocall-rs |
| repository | https://github.com/security-union/videocall-rs |
| max_upload_size | |
| id | 1741320 |
| size | 19,934 |
A lightweight diagnostics event bus for the videocall-rs project. This crate provides a unified way to emit and collect diagnostic metrics across all subsystems in the videocall ecosystem.
This is a private crate that is part of the videocall-rs project and is subject to change without notice. The API is not considered stable and may undergo breaking changes between versions. This crate is not intended for external use outside of the videocall-rs ecosystem.
This crate is used throughout the videocall-rs project to provide observability and debugging capabilities:
use videocall_diagnostics::{DiagEvent, global_sender, subscribe, now_ms, metric};
// Emit a diagnostic event
let sender = global_sender();
let event = DiagEvent {
subsystem: "neteq",
stream_id: Some("peer_123".to_string()),
ts_ms: now_ms(),
metrics: vec![
metric!("buffer_size", 1024_u64),
metric!("latency_ms", 45.5_f64),
metric!("codec", "opus"),
],
};
sender.send(event).ok();
// Subscribe to all diagnostic events
let receiver = subscribe();
while let Ok(event) = receiver.recv() {
println!("Received diagnostic: {:?}", event);
}
The crate provides a simple global broadcast system where:
global_sender() to emit DiagEvent instancessubscribe() to receive all future eventsThis allows for flexible monitoring and debugging without tight coupling between components.
serde - Serialization support for diagnostic eventsflume - Multi-producer multi-consumer channelsjs-sys - WASM time utilities (WASM32 targets only)Part of the videocall-rs project by Security Union LLC