Add support for audit/logger max retry and retry interval (#20402)

Current implementation retries forever until our
log buffer is full, and we start dropping events.

This PR allows you to set a value until we give
up on existing audit/logger batches to proceed to
process the new ones.

Bonus:
 - do not blow up buffers beyond batchSize value
 - do not leak the ticker if the worker returns
This commit is contained in:
Harshavardhana
2024-09-08 05:15:09 -07:00
committed by GitHub
parent 3f39da48ea
commit 8268c12cfb
4 changed files with 162 additions and 77 deletions
+12
View File
@@ -131,6 +131,18 @@ var (
Optional: true,
Type: "string",
},
config.HelpKV{
Key: MaxRetry,
Description: `maximum retry count before we start dropping upto batch_size events`,
Optional: true,
Type: "number",
},
config.HelpKV{
Key: RetryInterval,
Description: `maximum retry sleeps between each retries`,
Optional: true,
Type: "duration",
},
config.HelpKV{
Key: config.Comment,
Description: config.DefaultComment,