pub struct QueueMetrics { /* private fields */ }Expand description
通知源的固定原子单元;仅抓取时构造 label 和样本。
Implementations§
Source§impl QueueMetrics
impl QueueMetrics
Sourcepub fn series_budget(&self) -> usize
pub fn series_budget(&self) -> usize
业务作用:为指标注册事务提供精确最坏系列数。
参数说明:无。
返回:全部 provider、事件、结果和固定桶展开后的总系列数。
Sourcepub fn record_delivery(
&self,
provider: usize,
event: EventKind,
outcome: DeliveryOutcome,
elapsed: Duration,
)
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
impl LegacyMetricsSource for QueueMetrics
Source§fn descriptors(&self) -> &'static [&'static MetricDescriptor]
fn descriptors(&self) -> &'static [&'static MetricDescriptor]
业务作用:声明此源拥有的静态通知指标合同。
参数说明:无。
返回:固定 descriptor 集合。
Source§fn snapshot(&self) -> Option<Vec<MetricSample>>
fn snapshot(&self) -> Option<Vec<MetricSample>>
业务作用:从原子单元生成可供 Prometheus 和 OTLP 共用的有界快照。
参数说明:无。
返回:全部冻结维度的当前累计样本。
Source§fn render_prometheus(&self, output: &mut String)
fn render_prometheus(&self, output: &mut String)
业务作用:由统一 MetricHub 的结构化出口渲染,不建立第二份文本状态。
参数说明:
output:是宿主的输出缓冲区。
返回:无;结构化快照由 MetricHub 统一渲染。
Auto Trait Implementations§
impl !Freeze for QueueMetrics
impl Forget for QueueMetrics
impl Move for QueueMetrics
impl RefUnwindSafe for QueueMetrics
impl Send for QueueMetrics
impl Sync for QueueMetrics
impl Unpin for QueueMetrics
impl UnsafeUnpin for QueueMetrics
impl UnwindSafe for QueueMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more