Skip to main content

Module helpers

Module helpers 

Source
Expand description

Log spam protection helpers.

Atomic helper functions for per-site log rate limiting. Use alongside the global tracing-throttle layer for defence-in-depth.

Functions§

log_debounced
Log at most once per interval. Returns true if enough time has passed.
log_sampled
Log every Nth occurrence. Returns true on first call and every sample_rate-th call.
log_state_change
Log on state transition only. Returns true if state changed.