pub struct DebugConfig {
pub enabled: bool,
pub sandbox: bool,
pub trigger_header: String,
pub trace_all: bool,
pub capture_bodies: bool,
pub max_body_bytes: usize,
pub max_traces: usize,
pub max_steps: usize,
pub sandbox_timeout_seconds: u64,
pub redact_headers: Vec<String>,
pub redact_query_params: Vec<String>,
pub redact_message_keys: Vec<String>,
}Expand description
Debug mode: per-request policy-execution tracing plus the plugin sandbox.
Off by default. Because system.yaml is read once at startup and never
hot-reloaded, toggling debug mode requires a restart — which is also the
safety property that keeps a compromised Admin API credential from switching
on request-context capture.
debug:
enabled: ${FEATHERBIT_DEBUG:-false}
capture_bodies: ${FEATHERBIT_DEBUG_BODIES:-false}Always keep the :- default in interpolated values: ${FEATHERBIT_DEBUG}
with the variable unset expands to empty text, which YAML parses as null and
serde then rejects for a bool.
Fields§
§enabled: boolMaster switch. When false nothing is traced and every /api/debug/*
route except GET /api/debug/config responds 404.
sandbox: boolAllows POST /api/debug/sandbox (only meaningful while enabled), so a
deployment can trace requests without exposing plugin execution.
trigger_header: StringRequest header whose presence opts a single request into tracing. Lowercased when the settings are resolved.
trace_all: boolTrace every request instead of waiting for trigger_header. A firehose:
it snapshots the context once per node for all traffic.
capture_bodies: boolCapture request/response bodies in snapshots. Off by default because it is the expensive part; bodies are also the one thing redaction cannot clean.
max_body_bytes: usizePer-body truncation limit, in bytes, when capture_bodies is on.
max_traces: usizeRing-buffer capacity. 0 disables storage.
max_steps: usizeMaximum steps recorded per trace, bounding a runaway policy’s trace.
sandbox_timeout_seconds: u64Deadline for one sandbox run, in seconds.
redact_headers: Vec<String>Header names to redact in addition to the built-in denylist.
redact_query_params: Vec<String>Query parameter names to redact in addition to the built-in denylist.
redact_message_keys: Vec<String>context.message keys to redact in addition to the built-in denylist.
Trait Implementations§
Source§impl Clone for DebugConfig
impl Clone for DebugConfig
Source§fn clone(&self) -> DebugConfig
fn clone(&self) -> DebugConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DebugConfig
impl Debug for DebugConfig
Source§impl Default for DebugConfig
impl Default for DebugConfig
Source§impl<'de> Deserialize<'de> for DebugConfigwhere
DebugConfig: Default,
impl<'de> Deserialize<'de> for DebugConfigwhere
DebugConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DebugConfig
impl RefUnwindSafe for DebugConfig
impl Send for DebugConfig
impl Sync for DebugConfig
impl Unpin for DebugConfig
impl UnsafeUnpin for DebugConfig
impl UnwindSafe for DebugConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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