pub struct RuntimeMetrics {Show 46 fields
pub(super) http_requests: CounterFamily<HttpRoute>,
pub(super) http_room_responses: CounterFamily<HttpRoomResponseStatus>,
pub(super) http_disconnect_responses: CounterFamily<HttpDisconnectResponseStatus>,
pub(super) http_inflight_requests: UpDownCounterFamily<HttpRoute>,
pub(super) http_request_duration: HistogramFamily<HttpRoute, ControlPlaneDurationBucket>,
pub(super) ws_connections: CounterFamily<WsConnectionStage>,
pub(super) ws_handshake_rejections: CounterFamily<WebSocketCloseCode>,
pub(super) ws_handshake_rejections_other: Counter,
pub(super) ws_startup_failures: CounterFamily<WsStartupFailureKind>,
pub(super) ws_user_loops_started: Counter,
pub(super) ws_user_loop_exits: CounterFamily<WsSessionLoopExitReason>,
pub(super) ws_bus_batches: CounterFamily<WsBusDirection>,
pub(super) ws_bus_envelopes: CounterFamily<WsBusDirection>,
pub(super) ws_bus_parse_failures: Counter,
pub(super) ws_bus_failures: CounterFamily<WsBusFailureKind>,
pub(super) ws_bus_client_frames: CounterFamily<WsBusClientFrameKind>,
pub(super) ws_outbound_queued_messages: UpDownCounter,
pub(super) ws_outbound_queue_overflows: Counter,
pub(super) ws_handshake_duration: Histogram<ControlPlaneDurationBucket>,
pub(super) ws_auth_duration: Histogram<ControlPlaneDurationBucket>,
pub(super) ws_user_initialize_duration: Histogram<ControlPlaneDurationBucket>,
pub(super) active_transport_users: UpDownCounter,
pub(super) transport_health_users: UpDownCounterFamily<TransportHealthState>,
pub(super) recording_actions: CounterFamily<RecordingActionOutcome>,
pub(super) recording_captured_packets: Counter,
pub(super) recording_captured_streams: Counter,
pub(super) rtp_metrics: RtpMetrics,
pub(super) rtc_metrics: RtcMetrics,
pub(super) rtp_relay_overload_drops: CounterFamily<RtpRelayDropKind>,
pub(super) transport_health_transitions: CounterFamily<TransportHealthTransition>,
pub(super) transport_ice_state_changes: CounterFamily<TransportIceState>,
pub(super) transport_dtls_connected: Counter,
pub(super) transport_user_lifetime_buckets: CounterFamily<TransportUserLifetimeBucket>,
pub(super) transport_user_lifetime_count: Counter,
pub(super) transport_user_lifetime_sum_micros: Counter,
pub(super) media_quality_samples: CounterFamily<MediaQualitySample>,
pub(super) media_quality_rtt: HistogramFamily<MediaQualitySample, MediaQualityRttBucket>,
pub(super) media_quality_loss_ppm_observed: CounterFamily<MediaQualityLossDirection>,
pub(super) media_quality_loss_observations: CounterFamily<MediaQualityLossDirection>,
pub(super) media_quality_bwe_bps_observed: Counter,
pub(super) media_quality_bwe_observations: Counter,
pub(super) media_quality_jitter_rtp_timestamp_units_observed: Counter,
pub(super) media_quality_jitter_observations: Counter,
pub(super) transport_cleanup_failures: Counter,
pub(super) source_selection_updates: CounterFamily<SourceSelectionKind>,
pub(super) budget_solver_outcomes: CounterFamily<BudgetSolverOutcome>,
}Fields§
§http_requests: CounterFamily<HttpRoute>§http_room_responses: CounterFamily<HttpRoomResponseStatus>§http_disconnect_responses: CounterFamily<HttpDisconnectResponseStatus>§http_inflight_requests: UpDownCounterFamily<HttpRoute>§http_request_duration: HistogramFamily<HttpRoute, ControlPlaneDurationBucket>§ws_connections: CounterFamily<WsConnectionStage>§ws_handshake_rejections: CounterFamily<WebSocketCloseCode>§ws_handshake_rejections_other: Counter§ws_startup_failures: CounterFamily<WsStartupFailureKind>§ws_user_loops_started: Counter§ws_user_loop_exits: CounterFamily<WsSessionLoopExitReason>§ws_bus_batches: CounterFamily<WsBusDirection>§ws_bus_envelopes: CounterFamily<WsBusDirection>§ws_bus_parse_failures: Counter§ws_bus_failures: CounterFamily<WsBusFailureKind>§ws_bus_client_frames: CounterFamily<WsBusClientFrameKind>§ws_outbound_queued_messages: UpDownCounter§ws_outbound_queue_overflows: Counter§ws_handshake_duration: Histogram<ControlPlaneDurationBucket>§ws_auth_duration: Histogram<ControlPlaneDurationBucket>§ws_user_initialize_duration: Histogram<ControlPlaneDurationBucket>§active_transport_users: UpDownCounter§transport_health_users: UpDownCounterFamily<TransportHealthState>§recording_actions: CounterFamily<RecordingActionOutcome>§recording_captured_packets: Counter§recording_captured_streams: Counter§rtp_metrics: RtpMetrics§rtc_metrics: RtcMetrics§rtp_relay_overload_drops: CounterFamily<RtpRelayDropKind>§transport_health_transitions: CounterFamily<TransportHealthTransition>§transport_ice_state_changes: CounterFamily<TransportIceState>§transport_dtls_connected: Counter§transport_user_lifetime_buckets: CounterFamily<TransportUserLifetimeBucket>§transport_user_lifetime_count: Counter§transport_user_lifetime_sum_micros: Counter§media_quality_samples: CounterFamily<MediaQualitySample>§media_quality_rtt: HistogramFamily<MediaQualitySample, MediaQualityRttBucket>§media_quality_loss_ppm_observed: CounterFamily<MediaQualityLossDirection>§media_quality_loss_observations: CounterFamily<MediaQualityLossDirection>§media_quality_bwe_bps_observed: Counter§media_quality_bwe_observations: Counter§media_quality_jitter_rtp_timestamp_units_observed: Counter§media_quality_jitter_observations: Counter§transport_cleanup_failures: Counter§source_selection_updates: CounterFamily<SourceSelectionKind>§budget_solver_outcomes: CounterFamily<BudgetSolverOutcome>Implementations§
Source§impl RuntimeMetrics
impl RuntimeMetrics
Sourcepub fn track_http_request(&self, route: HttpRoute) -> impl Drop + '_
pub fn track_http_request(&self, route: HttpRoute) -> impl Drop + '_
counts one HTTP request then records duration and releases inflight state on drop
pub fn record_http_room_success(&self)
pub fn record_http_room_forbidden(&self)
pub fn record_http_room_bad_request(&self)
pub fn record_http_room_conflict(&self)
pub fn record_http_disconnect_success(&self)
pub fn record_http_disconnect_bad_request(&self)
pub fn record_http_disconnect_unprocessable_entity(&self)
pub fn record_ws_connection_accepted(&self)
pub fn record_ws_handshake_credentials_received(&self)
pub fn record_ws_handshake_rejection( &self, close_code: Option<WebSocketCloseCode>, )
pub fn record_ws_user_joined(&self)
pub fn record_ws_startup_send_failure(&self)
pub fn record_ws_user_initialize_failure(&self)
pub fn record_ws_user_loop_started(&self)
pub fn record_ws_user_loop_exit(&self, reason: WsSessionLoopExitReason)
pub fn record_ws_bus_batch_received(&self, envelope_count: usize)
pub fn record_ws_bus_invalid_input_failure(&self)
pub fn record_ws_bus_unsupported_feature_failure(&self)
pub fn record_ws_bus_client_request(&self)
pub fn record_ws_bus_client_message(&self)
pub fn record_ws_bus_batch_sent(&self, envelope_count: usize)
pub fn record_ws_bus_batches_sent( &self, batch_count: usize, envelope_count: usize, )
pub fn record_ws_bus_send_failure(&self)
pub fn add_ws_outbound_queued_messages(&self, delta: i64)
pub fn record_ws_outbound_queue_overflow(&self)
Sourcepub fn track_ws_handshake(&self) -> impl Drop + '_
pub fn track_ws_handshake(&self) -> impl Drop + '_
records handshake duration when the guard is dropped
Sourcepub fn track_ws_authentication(&self) -> impl Drop + '_
pub fn track_ws_authentication(&self) -> impl Drop + '_
records authentication duration when the guard is dropped
Sourcepub fn track_ws_user_initialization(&self) -> impl Drop + '_
pub fn track_ws_user_initialization(&self) -> impl Drop + '_
records user initialization duration when the guard is dropped
fn track<'a>(&'a self, finish: impl Fn(&Self, Duration) + 'a) -> impl Drop + 'a
pub fn add_active_transport_users(&self, delta: i64)
Sourcepub fn record_transport_health_transition(
&self,
previous: Option<TransportHealthState>,
next: Option<TransportHealthState>,
)
pub fn record_transport_health_transition( &self, previous: Option<TransportHealthState>, next: Option<TransportHealthState>, )
records one transport-health edge and keeps current-state gauges balanced
callers must pass the previously recorded health value
None -> Some joins the gauge
Some -> None leaves it
pub fn record_recording_start_accepted(&self)
pub fn record_recording_start_rejected(&self)
pub fn record_recording_stop_accepted(&self)
pub fn record_recording_stop_rejected(&self)
pub fn record_recording_captured_packet(&self)
pub fn record_recording_captured_stream(&self)
Sourcepub fn register_rtp_worker(&self) -> Arc<RtpMetricsRecorder>
pub fn register_rtp_worker(&self) -> Arc<RtpMetricsRecorder>
Registers one worker-local recorder for hot RTP packet metrics.
The caller should keep the returned handle beside the packet loop and reuse it for every RTP packet observation owned by that worker.
Sourcepub fn register_rtp_worker_for_media_worker(
&self,
media_worker_id: usize,
) -> Arc<RtpMetricsRecorder>
pub fn register_rtp_worker_for_media_worker( &self, media_worker_id: usize, ) -> Arc<RtpMetricsRecorder>
Registers one worker-local recorder for a known media worker.
The media-worker id is exported only as a bounded worker label. Runtime code must not pass room or user identity here.
Sourcepub fn register_rtc_worker(&self) -> Arc<RtcMetricsRecorder>
pub fn register_rtc_worker(&self) -> Arc<RtcMetricsRecorder>
Registers one worker-local recorder for RTC packet-loop metrics.
The caller should keep the returned handle beside the packet loop and reuse it for UDP datagram and route-control observations owned by that worker.