pub enum OclaEvent {
RequestCompleted {
model: String,
input_tokens: u64,
output_tokens: u64,
duration_ms: u64,
session_id: Option<String>,
},
FeedbackRecorded {
session_id: String,
outcome: FeedbackOutcome,
tool: Option<String>,
},
ThresholdShift {
language: String,
old_value: f64,
new_value: f64,
metric: ThresholdMetric,
},
CompressionApplied {
path: Option<String>,
before_tokens: u64,
after_tokens: u64,
strategy: String,
},
SavingsRecorded {
input_saved: u64,
output_saved: u64,
source: SavingsSource,
attribution_id: Option<String>,
evidence_class: Option<String>,
measurement_method: Option<String>,
},
IntentClassified {
tier: String,
confidence: f64,
reasoning: String,
},
OutcomeRecorded {
session_id: String,
accepted: bool,
implicit: bool,
},
ResponseOptimized {
cache_hit: bool,
is_duplicate: bool,
tokens_saved: u64,
},
ModelRouted {
requested_model: String,
routed_model: String,
tier: String,
model_changed: bool,
},
AgentChainEvent {
agent_id: String,
action: String,
parent_agent: Option<String>,
},
}Expand description
The 10 OCLA event types defined in the P2 spec.
Variants§
RequestCompleted
A proxy request completed (usage_meter.rs).
Fields
FeedbackRecorded
User feedback recorded (feedback.rs).
ThresholdShift
Compression threshold shifted (threshold_learning.rs).
CompressionApplied
Compression applied to a request (compress.rs).
SavingsRecorded
Savings recorded to the ledger (savings_ledger/store.rs).
Fields
§
source: SavingsSourceIntentClassified
Intent classified for a request (P8 — model_router.rs).
OutcomeRecorded
Outcome tracked for a response (P3 — future outcome_tracker.rs).
ResponseOptimized
Response optimization applied (P9 — response_optimizer.rs).
ModelRouted
Model routing decision made (P8 — model_router.rs).
AgentChainEvent
Agent chain event (P11 — future agent_gateway.rs).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OclaEvent
impl<'de> Deserialize<'de> for OclaEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for OclaEvent
Auto Trait Implementations§
impl Freeze for OclaEvent
impl RefUnwindSafe for OclaEvent
impl Send for OclaEvent
impl Sync for OclaEvent
impl Unpin for OclaEvent
impl UnsafeUnpin for OclaEvent
impl UnwindSafe for OclaEvent
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
Converts
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>
Converts
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