Skip to main content

SagaOperationalMetrics

Struct SagaOperationalMetrics 

Source
pub struct SagaOperationalMetrics {
Show 30 fields pub started_total: u64, pub completed_total: u64, pub compensated_total: u64, pub manual_intervention_total: u64, pub manually_closed_total: u64, pub quota_rejections_total: u64, pub action_rate_rejections_total: u64, pub unknown_result_total: u64, pub retry_attempt_total: u64, pub conflict_total: u64, pub running_current: u64, pub waiting_resolution_current: u64, pub compensating_current: u64, pub manual_intervention_current: u64, pub due_timer_current: u64, pub lifecycle_duration_count: u64, pub lifecycle_duration_micros_sum: u64, pub lifecycle_quantiles: Vec<SagaLifecycleQuantiles>, pub kafka_result_processing_total: u64, pub kafka_result_processing_micros_sum: u64, pub kafka_result_retry_total: u64, pub kafka_result_dlt_requested_total: u64, pub kafka_result_ack_total: u64, pub kafka_result_duplicate_total: u64, pub kafka_command_processing_total: u64, pub kafka_command_processing_micros_sum: u64, pub kafka_command_retry_total: u64, pub kafka_command_dlt_requested_total: u64, pub kafka_command_ack_total: u64, pub kafka_command_duplicate_total: u64,
}
Expand description

业务作用:聚合 Saga 已提交状态与当前进程 Kafka transport 指标。

Fields§

§started_total: u64

历史创建实例数。

§completed_total: u64

进入 COMPLETED 的历史迁移数。

§compensated_total: u64

进入 COMPENSATED 的历史迁移数。

§manual_intervention_total: u64

进入 MANUAL_INTERVENTION 的历史迁移数。

§manually_closed_total: u64

进入 MANUALLY_CLOSED 的历史迁移数(系统外处置后人工关闭自动化)。

§quota_rejections_total: u64

当前进程按租户配额拒绝的创建请求数(不携带租户标签,精确用量走受鉴权管理查询)。

§action_rate_rejections_total: u64

当前进程按租户速率拒绝的变更类管理动作数(不携带租户标签,当前窗口用量走 受鉴权管理查询)。

§unknown_result_total: u64

历史 Unknown attempt 数。

§retry_attempt_total: u64

历史业务 attempt 重试数。

§conflict_total: u64

历史互斥事实数。

§running_current: u64

当前正向运行实例数。

§waiting_resolution_current: u64

当前等待 Unknown 裁决实例数。

§compensating_current: u64

当前补偿中实例数。

§manual_intervention_current: u64

当前人工介入实例数。

§due_timer_current: u64

当前已到期且可领取 timer 数。

§lifecycle_duration_count: u64

终态生命周期样本数。

§lifecycle_duration_micros_sum: u64

终态生命周期累计微秒数。

§lifecycle_quantiles: Vec<SagaLifecycleQuantiles>

按冻结 workflow/definition version 分组的端到端终态时延分位数。

§kafka_result_processing_total: u64

当前进程处理 Saga result 次数。

§kafka_result_processing_micros_sum: u64

当前进程处理 Saga result 累计微秒数。

§kafka_result_retry_total: u64

当前进程请求 Kafka 保留 offset 重投的次数。

§kafka_result_dlt_requested_total: u64

当前进程请求 nafka 进入 durability-first DLT 的次数。

§kafka_result_ack_total: u64

当前进程在本地事务提交后完成手动 ACK 的次数。

§kafka_result_duplicate_total: u64

当前进程由 Inbox 幂等吸收后 ACK 的重复结果数。

§kafka_command_processing_total: u64

当前进程处理 Saga command 次数。

§kafka_command_processing_micros_sum: u64

当前进程处理 Saga command 累计微秒数。

§kafka_command_retry_total: u64

当前进程因 Participant 事务未提交而保留 command offset 的次数。

§kafka_command_dlt_requested_total: u64

当前进程请求 command 进入 durability-first DLT 的次数。

§kafka_command_ack_total: u64

当前进程在 Participant COMMIT 后完成手动 ACK 的 command 数。

§kafka_command_duplicate_total: u64

当前进程由 Participant Inbox 幂等吸收后 ACK 的重复 command 数。

Implementations§

Source§

impl SagaOperationalMetrics

Source

pub fn render_prometheus(&self) -> String

业务作用:把低基数快照渲染为 Prometheus text exposition 格式。

参数说明: 无。

返回:可直接作为 /metrics 响应体的 UTF-8 文本,不包含高基数标签。

Trait Implementations§

Source§

impl Clone for SagaOperationalMetrics

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SagaOperationalMetrics

Source§

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

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

impl Default for SagaOperationalMetrics

Source§

fn default() -> Self

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

impl Eq for SagaOperationalMetrics

Source§

impl From<SagaStoreMetrics> for SagaOperationalMetrics

Source§

fn from(store: SagaStoreMetrics) -> Self

业务作用:将后端已提交快照与当前进程 transport 计数组装为对外指标。

参数说明:

  • store: 当前 Saga 后端聚合的已提交事实。

返回:包含完整业务与 transport 指标的快照。

Source§

impl PartialEq for SagaOperationalMetrics

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SagaOperationalMetrics

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

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.

Source§

impl<T> Instrument for T

Source§

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

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

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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