trace-redact 0.1.0

Redact sensitive fields (api keys, tokens, emails, phone numbers) from agent traces before exporting to OTel or a log sink. Zero deps.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 3 items with examples
  • Size
  • Source code size: 22.66 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 289.33 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MukundaKatta/trace-redact
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MukundaKatta

trace-redact

crates.io

Walk a serde_json::Value (agent trace, span attributes) and redact sensitive fields in place. Key-name match (api_key, authorization, …) plus value-pattern match (API keys, bearer tokens, emails, SSNs).

use trace_redact::redact;
use serde_json::json;
let mut v = json!({
    "headers": { "authorization": "Bearer sk-live-AAAABBBBCCCCDDDD" },
    "email": "jane@example.com",
});
redact(&mut v);

MIT or Apache-2.0.