pub type BeforeSend = Arc<dyn Fn(Event) -> Option<Event> + Send + Sync>;Expand description
A before_send hook: final-mile filter run on the calling thread before an
event is queued. Return Some(event) (possibly mutated) to send, or None
to drop.
Notes:
- The
min_levelgate runs before this hook (events below the threshold are never built), so changingevent.levelhere does not re-open the gate.Noneis the only way the hook drops an event. - On panic, behaviour follows
Config::before_send_fail_open: by default the event is dropped (fail-closed), so a scrubber bug can’t leak the un-scrubbed original.
Aliased Type§
pub struct BeforeSend { /* private fields */ }