#[non_exhaustive]pub struct TraceConfig {
pub capture_body: bool,
pub max_body_bytes: usize,
pub header_redaction: HeaderRedactionMode,
pub header_denylist: Vec<String>,
pub header_allowlist: Vec<String>,
}Expand description
Trace-channel behaviour configuration (RFC 023, extended by RFC 040).
Configurable today only at this Rust level — the trace channel has
no config-file or CLI surface yet (RFC 040’s own Motivation notes
this; RFC 023’s [trace] TOML section was never wired to this
struct). TraceEmitter::new() always uses TraceConfig::default().
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.capture_body: boolCapture the JSON request body in each event. Default: false.
max_body_bytes: usizeMaximum serialised body size in bytes. Bodies larger than this
are omitted and body_truncated = true is set. Default: 8 192.
header_redaction: HeaderRedactionModeDenylist or allowlist by default. Default: Denylist.
header_denylist: Vec<String>Header names redacted when header_redaction is Denylist.
Compared case-insensitively. Default: DEFAULT_HEADER_DENYLIST.
header_allowlist: Vec<String>Header names captured when header_redaction is Allowlist;
every other header is redacted. Compared case-insensitively.
Default: empty, i.e. allowlist mode redacts everything until
configured — the safe direction for a fail-closed mode.
Trait Implementations§
Source§impl Clone for TraceConfig
impl Clone for TraceConfig
Source§fn clone(&self) -> TraceConfig
fn clone(&self) -> TraceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more