#[non_exhaustive]pub struct TraceOptions {
pub timings: bool,
pub changes: bool,
pub redact: Vec<Path>,
pub max_bytes: Option<usize>,
}Expand description
What a run’s trace records. A run is traced when
RunOptions::trace is given these.
use dataflow_rs::observe::TraceOptions;
let opts = TraceOptions::default()
.timings(true)
.redact(vec!["data.card".parse().unwrap()])
.max_bytes(1 << 20);
assert!(opts.changes && opts.timings);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timings: boolTime each call, into its step’s elapsed. false by default: no
clock is read for a trace without it.
changes: boolRecord each step’s changes. true by default. A trace records its
own changes whatever RunOptions::capture_changes says, which governs
only the audit trail, so turning that off cannot empty a debugger’s
replay. With false the steps carry statuses and timings, for
profiling, and cannot be replayed.
redact: Vec<Path>Prefixes whose values read null in initial and in every change,
applied as each is captured; the message keeps the real values. A
change at or below one is recorded as a write of null at it, a
removal’s included, so no key below it reaches the trace and a replay
reads null there from the first write on. A path that resolves
nothing in initial creates nothing there. Empty by default.
It masks values at those paths and nothing else: a step’s errors,
like a value derived from a redacted one and written elsewhere, are
carried as the message keeps them, so a record whose message quotes
a redacted value quotes it in the trace too.
max_bytes: Option<usize>A ceiling on what the trace holds, on v3’s scale: one machine word
per node, plus each string’s and each key’s length, counting
initial and every change. The step that would cross it, and every
later one, keeps everything but its changes, and
Trace::truncated is set. None, the default, is unbounded.