Skip to main content

PushHealthSnapshot

Struct PushHealthSnapshot 

Source
pub struct PushHealthSnapshot {
Show 20 fields pub push_stream_healthy: bool, pub last_push_received_at_ms: i64, pub last_push_by_sub_type: Vec<PushSubTypeWatermark>, pub consecutive_parse_errors: u32, pub total_parse_errors: u64, pub total_pushes_received: u64, pub resubscribe_triggers: u64, pub circuit_breaker_trips: u64, pub circuit_breaker_tripped_at_ms: i64, pub is_circuit_tripped_now: bool, pub orphan_orders_detected: u64, pub last_orphan_scan_at_ms: i64, pub last_resubscribe_at_ms: i64, pub f2_circuit_tripped_total: u64, pub trade_requery_queue_dropped_total: u64, pub last_trade_requery_drop_at_ms: i64, pub last_resubscribe_partial_at_ms: i64, pub resubscribe_partial_total: u64, pub last_missed_keys_count: u32, pub degraded_reason: Option<String>,
}
Expand description

v1.4.83 §9 F5 结构化 snapshot, 给 /api/push-subscriber-info 直接序列化.

Fields§

§push_stream_healthy: bool§last_push_received_at_ms: i64§last_push_by_sub_type: Vec<PushSubTypeWatermark>§consecutive_parse_errors: u32§total_parse_errors: u64§total_pushes_received: u64§resubscribe_triggers: u64§circuit_breaker_trips: u64§circuit_breaker_tripped_at_ms: i64§is_circuit_tripped_now: bool§orphan_orders_detected: u64§last_orphan_scan_at_ms: i64§last_resubscribe_at_ms: i64§f2_circuit_tripped_total: u64

v1.4.90 P2-B: F2 (TradeReQuery) account-level circuit-break 总 trip 次数.

§trade_requery_queue_dropped_total: u64

v1.4.106 codex 0932 F1: TradeReQuery 队列丢弃总数 (queue full / closed). 持续 > 0 表明 dispatcher 跟不上 push 速度, 需要 ops 关注.

§last_trade_requery_drop_at_ms: i64

v1.4.106 codex 0932 F1: 最近一次 TradeReQuery drop 的 Unix ms. 0 = 从未丢弃过. 60s 内非 0 → is_healthy() 返 false.

§last_resubscribe_partial_at_ms: i64

v1.4.106 codex 0631 F4 [P2]: 最近一次 resubscribe 部分失败的 Unix ms. 0 = 从未部分失败. 60s 内非 0 → push_stream_healthy=false (degraded).

§resubscribe_partial_total: u64

v1.4.106 codex 0631 F4 [P2]: resubscribe 部分失败累计次数 (monotonic). 监控 alarm: rate-of-change 显著 → 后端 / 网络异常.

§last_missed_keys_count: u32

v1.4.106 codex 0631 F4 [P2]: 最近一次 resubscribe 缺失的 keys 数 (cache miss / unresolved). 0 = 全部 OK; >0 = 部分 ghost subscription.

§degraded_reason: Option<String>

v1.4.106 codex 0631 F4 [P2]: 导致 push_stream_healthy=false 的人类 可读理由 (None = 健康).

Implementations§

Source§

impl PushHealthSnapshot

Source

pub fn render_prometheus(&self) -> String

Render the snapshot as Prometheus text exposition.

Trait Implementations§

Source§

impl Clone for PushHealthSnapshot

Source§

fn clone(&self) -> PushHealthSnapshot

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PushHealthSnapshot

Source§

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

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

impl Serialize for PushHealthSnapshot

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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.

§

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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