Skip to main content

RtcMetricsRecorder

Struct RtcMetricsRecorder 

Source
pub struct RtcMetricsRecorder {
Show 28 fields datagram_routes: PaddedCounterFamily<RtcDatagramRoutePath>, datagram_drops: PaddedCounterFamily<RtcDatagramDropReason>, datagram_fallback_scans: PaddedCounter, datagram_scan_users: PaddedCounter, nacks: PaddedCounterFamily<RtcNackDirection>, rtx_packets_received_from_publisher: PaddedCounter, rtx_payload_bytes_received_from_publisher: PaddedCounter, rtcp_ingress_budget_drops: PaddedCounter, transport_io_failures: PaddedCounterFamily<RtcTransportIoFailure>, transport_io_log: Mutex<[FailureLogSlot; 8]>, input_failures: PaddedCounterFamily<RtcInputFailure>, input_log: Mutex<[FailureLogSlot; 6]>, drain_failures: PaddedCounterFamily<RtcDrainFailureStage>, worker_terminal_failures: PaddedCounter, worker_observation_timeouts: PaddedCounterFamily<RtcWorkerObservationKind>, output_budget_exhaustions: PaddedCounterFamily<RtcOutputBudgetLimit>, output_budget_session_closes: PaddedCounter, producer_ssrc_bindings: PaddedCounterFamily<RtcProducerSsrcBindingOutcome>, route_control: PaddedCounterFamily<RtcRouteControlOutcome>, keyframe_requests: PaddedCounterFamily<RtcKeyframeRequestOutcome>, relay_enqueues: PaddedCounterFamily<RtcRelayEnqueueResult>, relay_mailbox_depth_samples: PaddedCounter, relay_mailbox_depth_total: PaddedCounter, relay_drain_batches: PaddedCounter, relay_drained_packets: PaddedCounter, relay_drain_cap_hits: PaddedCounter, remote_control_drops: PaddedCounterFamily<RtcRemoteControlDropKind>, remote_packet_gate_convergence: PaddedCounterFamily<RtcRemotePacketGateConvergence>,
}
Expand description

Worker-local RTC packet-loop metric recorder.

Packet loops keep one recorder for their full worker lifetime. Datagram and route-control updates touch only this worker’s padded atomics while RuntimeMetrics aggregates all registered recorders during scrape capture.

Fields§

§datagram_routes: PaddedCounterFamily<RtcDatagramRoutePath>§datagram_drops: PaddedCounterFamily<RtcDatagramDropReason>§datagram_fallback_scans: PaddedCounter§datagram_scan_users: PaddedCounter§nacks: PaddedCounterFamily<RtcNackDirection>§rtx_packets_received_from_publisher: PaddedCounter§rtx_payload_bytes_received_from_publisher: PaddedCounter§rtcp_ingress_budget_drops: PaddedCounter§transport_io_failures: PaddedCounterFamily<RtcTransportIoFailure>§transport_io_log: Mutex<[FailureLogSlot; 8]>§input_failures: PaddedCounterFamily<RtcInputFailure>§input_log: Mutex<[FailureLogSlot; 6]>§drain_failures: PaddedCounterFamily<RtcDrainFailureStage>§worker_terminal_failures: PaddedCounter§worker_observation_timeouts: PaddedCounterFamily<RtcWorkerObservationKind>§output_budget_exhaustions: PaddedCounterFamily<RtcOutputBudgetLimit>§output_budget_session_closes: PaddedCounter§producer_ssrc_bindings: PaddedCounterFamily<RtcProducerSsrcBindingOutcome>§route_control: PaddedCounterFamily<RtcRouteControlOutcome>§keyframe_requests: PaddedCounterFamily<RtcKeyframeRequestOutcome>§relay_enqueues: PaddedCounterFamily<RtcRelayEnqueueResult>§relay_mailbox_depth_samples: PaddedCounter§relay_mailbox_depth_total: PaddedCounter§relay_drain_batches: PaddedCounter§relay_drained_packets: PaddedCounter§relay_drain_cap_hits: PaddedCounter§remote_control_drops: PaddedCounterFamily<RtcRemoteControlDropKind>§remote_packet_gate_convergence: PaddedCounterFamily<RtcRemotePacketGateConvergence>

Implementations§

Source§

impl RtcMetricsRecorder

Source

pub fn record_rtc_datagram_route(&self, path: RtcDatagramRoutePath)

Source

pub fn record_rtc_datagram_drop(&self, reason: RtcDatagramDropReason)

Source

pub fn record_rtc_datagram_fallback_scan(&self, examined_sessions: usize)

Source

pub fn record_rtc_nacks(&self, direction: RtcNackDirection, count: u64)

Source

pub fn record_rtc_rtx_received_from_publisher(&self, payload_bytes: usize)

Source

pub fn record_rtc_rtcp_ingress_budget_drop(&self)

Source

pub fn record_rtc_transport_io_failure( &self, failure: RtcTransportIoFailure, ) -> Option<u64>

Counts every failure and returns suppressed occurrences when this category may log.

Source

pub fn record_rtc_input_failure(&self, failure: RtcInputFailure) -> Option<u64>

Counts every failure and returns suppressed occurrences when this category may log.

Source

pub fn record_rtc_drain_failure(&self, stage: RtcDrainFailureStage)

Source

pub fn record_rtc_worker_terminal_failure(&self)

Source

pub fn record_rtc_worker_observation_timeout( &self, kind: RtcWorkerObservationKind, )

Source

pub fn record_rtc_output_budget_exhaustion(&self, limit: RtcOutputBudgetLimit)

Source

pub fn record_rtc_output_budget_session_close(&self)

Source

pub fn record_rtc_producer_ssrc_binding( &self, outcome: RtcProducerSsrcBindingOutcome, )

Records one producer binding change or rejection after RTP authentication.

Repeated packets matching an established binding do not change it and should not increment this counter.

Source

pub fn record_rtc_route_control(&self, outcome: RtcRouteControlOutcome)

Source

pub fn record_rtc_keyframe_request(&self, outcome: RtcKeyframeRequestOutcome)

Source

pub fn record_rtc_relay_enqueue(&self, result: RtcRelayEnqueueResult)

Source

pub fn record_rtc_relay_mailbox_depth(&self, depth: usize)

Source

pub fn record_rtc_relay_drain_batch( &self, drained_packets: usize, cap_hit: bool, )

Source

pub fn record_rtc_remote_control_drop(&self, kind: RtcRemoteControlDropKind)

Source

pub fn record_rtc_remote_packet_gate_convergence( &self, outcome: RtcRemotePacketGateConvergence, )

Trait Implementations§

Source§

impl Debug for RtcMetricsRecorder

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for RtcMetricsRecorder

Source§

fn default() -> RtcMetricsRecorder

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,