pub struct OpEvent {Show 18 fields
pub schema_version: u32,
pub request_id: u64,
pub operation: OpKind,
pub stage: OpStage,
pub provider_id: Option<String>,
pub backend_class: Option<String>,
pub model_id: Option<String>,
pub scope: MetricsScope,
pub elapsed_ms: Option<u64>,
pub queue_ms: Option<u64>,
pub encoded_bytes: Option<u64>,
pub decoded_bytes: Option<u64>,
pub chunk_index: Option<u32>,
pub chunk_count: Option<u32>,
pub cache_state: Option<String>,
pub terminal: Option<TerminalCategory>,
pub retryable: Option<bool>,
pub error_category: Option<String>,
}Expand description
Versioned privacy-safe operation event (no payloads/secrets/paths).
Fields§
§schema_version: u32§request_id: u64§operation: OpKind§stage: OpStage§provider_id: Option<String>§backend_class: Option<String>§model_id: Option<String>§scope: MetricsScope§elapsed_ms: Option<u64>Monotonic elapsed ms since operation start (when known).
queue_ms: Option<u64>§encoded_bytes: Option<u64>§decoded_bytes: Option<u64>§chunk_index: Option<u32>§chunk_count: Option<u32>§cache_state: Option<String>§terminal: Option<TerminalCategory>§retryable: Option<bool>§error_category: Option<String>Implementations§
Source§impl OpEvent
impl OpEvent
pub fn stage( request_id: u64, operation: OpKind, stage: OpStage, scope: MetricsScope, ) -> Self
pub fn with_provider(self, id: impl Into<String>) -> Self
pub fn with_model(self, id: impl Into<String>) -> Self
pub fn with_elapsed_ms(self, ms: u64) -> Self
pub fn with_decoded_bytes(self, n: u64) -> Self
pub fn with_encoded_bytes(self, n: u64) -> Self
pub fn with_chunk(self, index: u32, count: u32) -> Self
pub fn with_terminal(self, cat: TerminalCategory, retryable: bool) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OpEvent
impl<'de> Deserialize<'de> for OpEvent
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 OpEvent
Auto Trait Implementations§
impl Freeze for OpEvent
impl RefUnwindSafe for OpEvent
impl Send for OpEvent
impl Sync for OpEvent
impl Unpin for OpEvent
impl UnsafeUnpin for OpEvent
impl UnwindSafe for OpEvent
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
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>,
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