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.