Skip to main content

QueueMetrics

Struct QueueMetrics 

Source
pub struct QueueMetrics { /* private fields */ }
Expand description

通知源的固定原子单元;仅抓取时构造 label 和样本。

Implementations§

Source§

impl QueueMetrics

Source

pub fn series_budget(&self) -> usize

业务作用:为指标注册事务提供精确最坏系列数。

参数说明:无。

返回:全部 provider、事件、结果和固定桶展开后的总系列数。

Source

pub fn record_delivery( &self, provider: usize, event: EventKind, outcome: DeliveryOutcome, elapsed: Duration, )

业务作用:在一个 envelope 结束时写入唯一投递结果与总耗时。

参数说明:

  • provider:是冻结下标
  • event:为事件
  • outcome:为最终结果
  • elapsed:包含重试。

返回:无;未知下标不写入,业务结果不受影响。

Trait Implementations§

Source§

impl LegacyMetricsSource for QueueMetrics

Source§

fn descriptors(&self) -> &'static [&'static MetricDescriptor]

业务作用:声明此源拥有的静态通知指标合同。

参数说明:无。

返回:固定 descriptor 集合。

Source§

fn snapshot(&self) -> Option<Vec<MetricSample>>

业务作用:从原子单元生成可供 Prometheus 和 OTLP 共用的有界快照。

参数说明:无。

返回:全部冻结维度的当前累计样本。

Source§

fn render_prometheus(&self, output: &mut String)

业务作用:由统一 MetricHub 的结构化出口渲染,不建立第二份文本状态。

参数说明:

  • output:是宿主的输出缓冲区。

返回:无;结构化快照由 MetricHub 统一渲染。

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.

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, 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.