Skip to main content

Crate o_sfu_telemetry

Crate o_sfu_telemetry 

Source
Expand description

telemetry setup, metric catalog and diagnostics schema

o-sfu-telemetry keeps runtime observability contracts in one crate the server initializes tracing from TelemetryConfig, records process-local metrics through typed helpers and renders diagnostics or Prometheus output from the metric catalog

use o_sfu_telemetry::{
    metrics::{HttpRoute, RoomGaugeValues, RuntimeMetrics},
    prometheus::render_prometheus,
};

let metrics = RuntimeMetrics::default();
let request = metrics.track_http_request(HttpRoute::Noop);
let body = render_prometheus(&metrics, RoomGaugeValues::default());
drop(request);
assert!(body.contains("osfu_http_noop_requests_total"));

process-global tracing setup lives behind init_tracing code that only needs counters, diagnostics or schema names can use those modules without installing a tracing subscriber

Modules§

config 🔒
diagnostics
graph
Grafana node graph formatting for diagnostics snapshots.
metrics
prometheus
Prometheus text rendering for runtime metrics.
schema
telemetry event and field names
setup 🔒

Structs§

TelemetryConfig
TelemetryHandle
TelemetryResource
TraceExportConfig

Enums§

TelemetryLogFormat

Constants§

DEFAULT_MEDIA_QUALITY_INTERVAL
DEFAULT_TELEMETRY_DEPLOYMENT_ENVIRONMENT
DEFAULT_TELEMETRY_SERVICE_NAME

Functions§

activated_span
http_request_span
init_tracing
Errors
ws_handshake_span
ws_upgrade_span