Expand description
Tracer trait for observing query-flow execution.
This module defines the Tracer trait and related types for observing
query execution. The default NoopTracer provides zero-cost when tracing
is not needed.
§Example
ⓘ
use query_flow::{QueryRuntime, Tracer, SpanId};
// Custom tracer implementation
struct MyTracer;
impl Tracer for MyTracer {
fn new_span_id(&self) -> SpanId {
SpanId(1)
}
fn on_query_start(&self, span_id: SpanId, query: TracerQueryKey) {
println!("Query started: {:?}", query);
}
}
let runtime = QueryRuntime::with_tracer(MyTracer);Structs§
- Noop
Tracer - Zero-cost tracer that discards all events.
- SpanId
- Unique identifier for a query execution span.
- Tracer
Asset Key - Represents an asset key in a type-erased manner for tracing.
- Tracer
Query Key - Represents a query key in a type-erased manner for tracing.
Enums§
- Execution
Result - Query execution result classification.
- Invalidation
Reason - Reason for cache invalidation.
- Tracer
Asset State - Asset loading state for tracing.
Traits§
- Tracer
- Tracer trait for observing query-flow execution.