pub struct TraceRedactionPolicy {
pub debug: TraceDebugPolicy,
pub sensitive_keys: BTreeSet<String>,
pub debug_payload_keys: BTreeSet<String>,
pub redaction_value: Value,
}Expand description
Redaction and debug-capture policy applied before trace records reach an exporter.
Fields§
§debug: TraceDebugPolicyDebug span/event handling.
sensitive_keys: BTreeSet<String>Case-insensitive keys that should always be redacted.
debug_payload_keys: BTreeSet<String>Case-insensitive raw payload keys redacted when debug policy is Redacted.
redaction_value: ValueReplacement value used for redacted content.
Implementations§
Source§impl TraceRedactionPolicy
impl TraceRedactionPolicy
Sourcepub fn default_safe() -> Self
pub fn default_safe() -> Self
Default-safe policy: drop debug telemetry and redact sensitive keys.
Sourcepub fn debug_redacted() -> Self
pub fn debug_redacted() -> Self
Keep debug telemetry while redacting raw payload-like fields.
Sourcepub fn debug_full_payloads() -> Self
pub fn debug_full_payloads() -> Self
Keep debug telemetry and payload-like fields while still redacting secrets.
Sourcepub const fn with_debug_policy(self, debug: TraceDebugPolicy) -> Self
pub const fn with_debug_policy(self, debug: TraceDebugPolicy) -> Self
Set debug capture behavior.
Sourcepub fn with_sensitive_key(self, key: impl AsRef<str>) -> Self
pub fn with_sensitive_key(self, key: impl AsRef<str>) -> Self
Add a case-insensitive sensitive key.
Sourcepub fn with_debug_payload_key(self, key: impl AsRef<str>) -> Self
pub fn with_debug_payload_key(self, key: impl AsRef<str>) -> Self
Add a case-insensitive debug payload key.
Trait Implementations§
Source§impl Clone for TraceRedactionPolicy
impl Clone for TraceRedactionPolicy
Source§fn clone(&self) -> TraceRedactionPolicy
fn clone(&self) -> TraceRedactionPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraceRedactionPolicy
impl Debug for TraceRedactionPolicy
Source§impl Default for TraceRedactionPolicy
impl Default for TraceRedactionPolicy
Source§impl<'de> Deserialize<'de> for TraceRedactionPolicy
impl<'de> Deserialize<'de> for TraceRedactionPolicy
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TraceRedactionPolicy
Source§impl PartialEq for TraceRedactionPolicy
impl PartialEq for TraceRedactionPolicy
Source§fn eq(&self, other: &TraceRedactionPolicy) -> bool
fn eq(&self, other: &TraceRedactionPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TraceRedactionPolicy
impl Serialize for TraceRedactionPolicy
impl StructuralPartialEq for TraceRedactionPolicy
Auto Trait Implementations§
impl Freeze for TraceRedactionPolicy
impl RefUnwindSafe for TraceRedactionPolicy
impl Send for TraceRedactionPolicy
impl Sync for TraceRedactionPolicy
impl Unpin for TraceRedactionPolicy
impl UnsafeUnpin for TraceRedactionPolicy
impl UnwindSafe for TraceRedactionPolicy
Blanket Implementations§
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
Mutably borrows from an owned value. Read more