Skip to main content

query_span

Function query_span 

Source
pub fn query_span(query: &str) -> Span
Expand description

Span wrapping a single execute_query call. Stamps the current connection id, transaction xid (0 when autocommit), tenant, and authenticated user so every downstream event (filter eval, scan, CDC emit, error) inherits correlation context.

Keep the string cheap — we only store the length, not the query body, to avoid PII leakage into logs.