pub struct QueryEvent {Show 13 fields
pub id: Uuid,
pub session_id: Uuid,
pub timestamp: DateTime<Utc>,
pub query_text: String,
pub query_type: QueryType,
pub latency_ms: u64,
pub tool_calls: u32,
pub retrieval_count: u32,
pub result_count: u32,
pub quality_score: Option<f64>,
pub error: Option<QueryError>,
pub profile: Option<String>,
pub tools_used: Vec<String>,
}Expand description
Query event - recorded for each user query
Fields§
§id: UuidEvent ID
session_id: UuidSession ID
timestamp: DateTime<Utc>Timestamp
query_text: StringOriginal query text (will be hashed, not stored)
query_type: QueryTypeQuery type classification
latency_ms: u64Execution latency in milliseconds
tool_calls: u32Number of tool calls made
retrieval_count: u32Number of documents retrieved
result_count: u32Result count
quality_score: Option<f64>Quality score (0.0 - 1.0)
error: Option<QueryError>Error occurred
profile: Option<String>Reasoning profile used
tools_used: Vec<String>Tools used (list of tool names)
Implementations§
Source§impl QueryEvent
impl QueryEvent
Sourcepub fn with_latency(self, latency_ms: u64) -> Self
pub fn with_latency(self, latency_ms: u64) -> Self
Set latency
Sourcepub fn with_tools(self, tools: Vec<String>) -> Self
pub fn with_tools(self, tools: Vec<String>) -> Self
Set tools used
Trait Implementations§
Source§impl Clone for QueryEvent
impl Clone for QueryEvent
Source§fn clone(&self) -> QueryEvent
fn clone(&self) -> QueryEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryEvent
impl Debug for QueryEvent
Source§impl<'de> Deserialize<'de> for QueryEvent
impl<'de> Deserialize<'de> for QueryEvent
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
Auto Trait Implementations§
impl Freeze for QueryEvent
impl RefUnwindSafe for QueryEvent
impl Send for QueryEvent
impl Sync for QueryEvent
impl Unpin for QueryEvent
impl UnwindSafe for QueryEvent
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,
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