pub struct CaptureConfig {
pub enabled: bool,
pub controlplane_url: String,
pub token_env: String,
pub max_body_bytes: usize,
pub ring_capacity: usize,
pub ring_bytes: usize,
pub ring_ttl: Duration,
pub queue_capacity: usize,
pub redaction: RedactionConfig,
}Expand description
Typed configuration for the request-capture feature. Built by the enterprise wiring from the
[enterprise.capture] TOML section. Every field has a fail-safe default and the feature is OFF by
default, so a config without the section behaves exactly like the plain enterprise proxy.
Fields§
§enabled: boolOff by default → the capture module is never even instantiated (zero datapath cost).
controlplane_url: StringBase URL of the control-plane ingest (e.g. http://controlplane:8080). The shipper appends
/ingest/captures. Required when enabled (the wiring rejects an empty URL).
token_env: StringName of the environment variable holding the bearer token for the ingest POST. The token itself is NEVER read from the TOML file (same discipline as the other enterprise secrets).
max_body_bytes: usizeCap on how many body bytes are captured; a larger body is truncated and flagged. Bounds both datapath memory and the size shipped to the control-plane.
ring_capacity: usizeMax number of in-flight captures held in the ring (bound by entry count).
ring_bytes: usizeMax total bytes held across all ring entries (bound by size — evicts oldest past this).
ring_ttl: DurationHow long a capture lives in the ring before it is evicted unshipped. A request/decision pair is microseconds apart, so a few seconds is ample; allowed requests age out and are dropped.
queue_capacity: usizeBound on the shipper’s outbound queue. When full, new captures are dropped (logged/metered), never blocking the request path.
redaction: RedactionConfigNode-side redaction of sensitive headers / body fields. Empty = raw capture (the default).