pub struct MetricsSnapshot {Show 15 fields
pub classified: u64,
pub rejected: u64,
pub unauthenticated: u64,
pub throttled: u64,
pub cache_hits: u64,
pub cache_misses: u64,
pub billed: u64,
pub billed_units: u64,
pub free: u64,
pub free_by_reason: [u64; 11],
pub duplicates: u64,
pub record_failures: u64,
pub deferred: u64,
pub unrecognized_responses: u64,
pub unrecognized_by_reason: [u64; 4],
}Expand description
Point-in-time metric values.
Fields§
§classified: u64Successfully classified requests.
rejected: u64Requests rejected for malformed or ambiguous MCP headers.
unauthenticated: u64Requests refused for a missing, malformed, or unknown API key. Tracked
apart from rejected so credential stuffing is distinguishable from
clients that simply send bad protocol headers.
throttled: u64Requests refused because the authentication-failure budget was spent.
cache_hits: u64Responses served from cache.
cache_misses: u64Cacheable requests not served from cache.
billed: u64Delivered calls accepted by the recorder.
billed_units: u64Sum of delivered units accepted by the recorder.
free: u64Exchanges classified as free.
free_by_reason: [u64; 11]Free exchanges split by reason, indexed by FreeReason::index.
The single free total cannot answer the question the enum exists for:
a spike in missing_task_attribution means durable-task charges are
being lost, and collapsed into one counter it is indistinguishable
from ordinary discovery traffic.
duplicates: u64Repeated once-only charges suppressed by the recorder.
record_failures: u64Local recorder failures.
deferred: u64Terminal accounting parked because it could not finish without awaiting. Only a durable task store produces these.
unrecognized_responses: u64Bodies that ended without a parseable terminal response.
unrecognized_by_reason: [u64; 4]Unaccounted responses split by cause, indexed by
UnaccountedReason::index.
Implementations§
Source§impl MetricsSnapshot
impl MetricsSnapshot
Sourcepub fn render_prometheus(self) -> String
pub fn render_prometheus(self) -> String
Render this snapshot in the Prometheus text exposition format.
Trait Implementations§
Source§impl Clone for MetricsSnapshot
impl Clone for MetricsSnapshot
Source§fn clone(&self) -> MetricsSnapshot
fn clone(&self) -> MetricsSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MetricsSnapshot
Source§impl Debug for MetricsSnapshot
impl Debug for MetricsSnapshot
Source§impl Default for MetricsSnapshot
impl Default for MetricsSnapshot
Source§fn default() -> MetricsSnapshot
fn default() -> MetricsSnapshot
impl Eq for MetricsSnapshot
Source§impl PartialEq for MetricsSnapshot
impl PartialEq for MetricsSnapshot
impl StructuralPartialEq for MetricsSnapshot
Auto Trait Implementations§
impl Freeze for MetricsSnapshot
impl RefUnwindSafe for MetricsSnapshot
impl Send for MetricsSnapshot
impl Sync for MetricsSnapshot
impl Unpin for MetricsSnapshot
impl UnsafeUnpin for MetricsSnapshot
impl UnwindSafe for MetricsSnapshot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more