Expand description
Process-wide session accumulators.
Atomics rather than a lock, because every bump happens on a hot path and must cost nothing measurable. Every bump also happens at a call site, never inside a conditionally-entered handler: a counter sited above an early return is a landmine, and the natural future optimization — hoisting the guard to the caller — silently zeroes it for exactly the users who do not use that feature.
Structs§
- Session
Counters - One session’s accumulated counts.
Enums§
- Counter
- Which counter to bump. A closed enum so a call site cannot invent a key.
- Error
Counter - Which error counter to bump.
Functions§
- http_
status_ counter - Classify a provider HTTP status into the 4xx or 5xx counter, if either
applies. Captured from
status.as_u16() / 100before the error is built — everyLlmErrorvariant carries the raw provider body verbatim.