pub struct SlowQueryEntry {Show 13 fields
pub timestamp_nanos: u64,
pub duration: Duration,
pub query: String,
pub fingerprint: String,
pub fingerprint_hash: u64,
pub user: String,
pub database: String,
pub client_ip: String,
pub node: String,
pub rows: usize,
pub error: Option<String>,
pub session_id: Option<String>,
pub workflow_id: Option<String>,
}Expand description
Slow query log entry
Fields§
§timestamp_nanos: u64Timestamp (nanos since epoch)
duration: DurationQuery duration
query: StringQuery text (possibly truncated)
fingerprint: StringNormalized/fingerprinted query
fingerprint_hash: u64Fingerprint hash
user: StringUser who executed the query
database: StringDatabase name
client_ip: StringClient IP
node: StringNode that executed the query
rows: usizeRows returned/affected
error: Option<String>Error message (if query failed)
session_id: Option<String>Session ID
workflow_id: Option<String>Workflow ID (for agent tracing)
Implementations§
Source§impl SlowQueryEntry
impl SlowQueryEntry
Sourcepub fn from_execution(
execution: &QueryExecution,
fingerprint: &QueryFingerprint,
max_query_length: usize,
) -> Self
pub fn from_execution( execution: &QueryExecution, fingerprint: &QueryFingerprint, max_query_length: usize, ) -> Self
Create from execution record and fingerprint
Sourcepub fn format_log_line(&self) -> String
pub fn format_log_line(&self) -> String
Format as log line
Sourcepub fn parse_log_line(line: &str) -> Option<Self>
pub fn parse_log_line(line: &str) -> Option<Self>
Parse from log line
Trait Implementations§
Source§impl Clone for SlowQueryEntry
impl Clone for SlowQueryEntry
Source§fn clone(&self) -> SlowQueryEntry
fn clone(&self) -> SlowQueryEntry
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 moreAuto Trait Implementations§
impl Freeze for SlowQueryEntry
impl RefUnwindSafe for SlowQueryEntry
impl Send for SlowQueryEntry
impl Sync for SlowQueryEntry
impl Unpin for SlowQueryEntry
impl UnsafeUnpin for SlowQueryEntry
impl UnwindSafe for SlowQueryEntry
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