update Rate Limiter Status
Callback to allow custom log contexts to apply additional rate limiting behaviour. This should be called from within an overriden postProcess() method. Typically this is invoked after calling super.postProcess(logSiteKey), such as:
protected boolean postProcess(@Nullable LogSiteKey logSiteKey) {
boolean shouldLog = super.postProcess(logSiteKey);
// Even if `shouldLog` is false, we still call the rate limiter to update its state.
shouldLog &= updateRateLimiterStatus(CustomRateLimiter.check(...));
if (shouldLog) {
// Maybe add additional metadata here...
}
return shouldLog;
}Content copied to clipboard
See RateLimitStatus for more information on how to implement custom rate limiting in Flogger.
Return
whether logging will occur based on the current combined state of active rate limiters.
Parameters
status
a rate limiting status, or null if the rate limiter was not active.