pub struct PrometheusDiscoverMetrics { /* private fields */ }Expand description
Prometheus implementation of DiscoverMetricsBackend.
§Metrics (solti_discover_*)
| Metric | Type | Labels | Description |
|---|---|---|---|
solti_discover_attempts_total | Counter | - | Total sync attempts |
solti_discover_outcomes_total | Counter | outcome | Outcomes (success / failure) |
solti_discover_duration_seconds | Histogram | outcome | Sync call duration |
solti_discover_failures_total | Counter | reason | Failures grouped by reason |
solti_discover_last_success_timestamp_seconds | Gauge | - | UNIX time of last successful sync |
solti_discover_holds_total | Counter | - | Server-advised retry holds received |
solti_discover_hold_duration_seconds | Histogram | - | Duration of advised holds |
Implementations§
Trait Implementations§
Source§impl Debug for PrometheusDiscoverMetrics
impl Debug for PrometheusDiscoverMetrics
Source§impl DiscoverMetricsBackend for PrometheusDiscoverMetrics
impl DiscoverMetricsBackend for PrometheusDiscoverMetrics
Source§fn record_attempt(&self)
fn record_attempt(&self)
Called once per sync attempt before the network call starts.
Source§fn record_success(&self, duration_ms: u64)
fn record_success(&self, duration_ms: u64)
Called when a sync attempt succeeds.
Source§fn record_failure(&self, duration_ms: u64, reason: &'static str)
fn record_failure(&self, duration_ms: u64, reason: &'static str)
Called when a sync attempt fails, with the canonical reason label.
Source§fn record_hold(&self, duration_s: u64)
fn record_hold(&self, duration_s: u64)
Called when the server advised a retry hold (
retry_after_s), with the clamped value in seconds.Auto Trait Implementations§
impl Freeze for PrometheusDiscoverMetrics
impl !RefUnwindSafe for PrometheusDiscoverMetrics
impl Send for PrometheusDiscoverMetrics
impl Sync for PrometheusDiscoverMetrics
impl Unpin for PrometheusDiscoverMetrics
impl UnsafeUnpin for PrometheusDiscoverMetrics
impl !UnwindSafe for PrometheusDiscoverMetrics
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