Skip to main content

set_limit_warning_handler

Function set_limit_warning_handler 

Source
pub fn set_limit_warning_handler(
    handler: Box<dyn Fn(&LimitWarning) + Send + Sync>,
)
Expand description

Install a process-global sink that is invoked on the same edge-triggered, hysteresis-gated boundary as the tracing::warn! whenever a tracked limit crosses WARN_FILL_PERCENT. The sidecar uses this to forward limit warnings to the host as structured events (the onLimitWarning hook). The handler must be cheap and non-blocking; it runs on the producer’s thread.