-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rate limit log messages sent to honeycomb logger (#200)
We have encountered a failure case in Refinery where logging overwhelms downstream shepherd. Adding configurable rate-limiting to the Honeycomb logger to prevent this. * prevent overwhelming the downstream service, when getting a spike of similar messages (e.g. the same error) * the sampling strategy will rate-limit per [log level + log message] key, with a configurable throughput * sampler is disabled by default, enabled via config ### Considerations * I looked into adding an integration test. I could see the outbound events traffic by injecting into the http transport, but the sampling is determined by events/sec so it was a spaghetti-o of thread.sleeps and log messages. * Realistically, we'd need to inject the Honeycomb WriterSender as the logger transmission (similarly to the app integration test), but that felt like a larger change than I was up for this round. * I didn't update anything in the README, because that seemed too high level, but I will update the public config docs as a follow-up: https://docs.honeycomb.io/working-with-your-data/best-practices/refinery/configuration/
- Loading branch information
Showing
4 changed files
with
144 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters