mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #445] Slack handler not throttling to match their requirements #152
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PLaRoche on GitHub (Oct 30, 2014).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/445
Slack only allows one message per second, and if you hit that for a sustained period of time they will cut you off. It would be nice if the slack handler could limit this, or at least listen for them saying you have been cut off.
From slack:
Since Slack is primarily a tool for humans to communicate with one another, this is a preventative measure to ensure that an out-of-control script doesn't compromise the quality of your archive or make it difficult for you to talk to one another.
To prevent this from happening in the future, you'll want to implement error checking in your integration. When we detect that one of your integrations might be running out of control (current thresholds are more than one message per second over a sustained period of time), we'll return an HTTP 429 and a chunk of JSON with some more details.
When we send one of these error messages back, it also means that your message did not make it into Slack — you'll want to queue it up and try again in a few seconds.
Also, as noted on the API Rate limits page, you may wish to explore alternatives for log aggregation: https://api.slack.com/docs/rate-limits
@Seldaek commented on GitHub (Dec 28, 2014):
Thanks for the warning. I guess we should implement a handleBatch method that allows sending all records as one message instead of one API call per record. At least if users configure it correctly after a BufferHandler or so.