Skip to main content

RuntimeMetrics

Struct RuntimeMetrics 

pub struct RuntimeMetrics {
Show 49 fields pub(super) http_connection_rejections: Counter, 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_pre_auth_rejections: CounterFamily<WsPreAuthRejection>, 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) subscription_intent_evictions: Counter, pub(super) source_selection_updates: CounterFamily<SourceSelectionKind>, pub(super) budget_solver_outcomes: CounterFamily<BudgetSolverOutcome>,
}

Fields§

§http_connection_rejections: Counter§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_pre_auth_rejections: CounterFamily<WsPreAuthRejection>§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§subscription_intent_evictions: Counter§source_selection_updates: CounterFamily<SourceSelectionKind>§budget_solver_outcomes: CounterFamily<BudgetSolverOutcome>

Implementations§

§

impl RuntimeMetrics

pub fn record_subscription_intent_evictions(&self, targets: usize)

Counts absent publisher targets evicted from bounded receiver intent.

pub fn record_http_connection_rejection(&self)

Records a socket closed because the HTTP listener reached its connection cap.

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_unauthorized(&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_pre_auth_rejection(&self, reason: WsPreAuthRejection)

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)

pub fn track_ws_handshake(&self) -> impl Drop

records handshake duration when the guard is dropped

pub fn track_ws_authentication(&self) -> impl Drop

records authentication duration when the guard is dropped

pub fn track_ws_user_initialization(&self) -> impl Drop

records user initialization duration when the guard is dropped

pub fn add_active_transport_users(&self, delta: i64)

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)

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.

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.

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.

pub fn record_rtp_relay_overload_drop(&self, destination: RtpRelayDropKind)

pub fn record_transport_ice_state_change(&self, state: TransportIceState)

pub fn record_transport_dtls_connected(&self)

pub fn record_transport_user_lifetime(&self, duration: Duration)

pub fn record_media_quality_sample(&self, sample: MediaQualitySample)

pub fn record_media_quality_rtt( &self, sample: MediaQualitySample, duration: Duration, )

pub fn record_media_quality_loss_ppm( &self, direction: MediaQualityLossDirection, loss_ppm: u64, )

pub fn record_media_quality_bwe_bps(&self, bwe_bps: u64)

pub fn record_media_quality_jitter_rtp_timestamp_units(&self, jitter: u64)

pub fn record_transport_cleanup_failure(&self)

pub fn record_source_selection_update(&self, selector: SourceSelectionKind)

pub fn record_budget_solver_outcome(&self, outcome: BudgetSolverOutcome)

Trait Implementations§

§

impl Debug for RuntimeMetrics

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for RuntimeMetrics

§

fn default() -> RuntimeMetrics

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> CryptoSafe for T
where T: Send + Sync + Debug,

§

impl<T> CryptoSafe for T

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,