SlackAlertClient#
- class gafaelfawr.slack.SlackAlertClient(hook_url, application, logger)#
Bases:
objectPublish alerts to Slack.
Use an incoming webhook to publish an alert to a Slack channel.
- Parameters:
hook_url (
str) – The URL of the incoming webhook to use to publish the message.application (
str) – Name of the application reporting an error.logger (
BoundLogger) – Logger to which to report errors sending messages to Slack.
Methods Summary
message(message)Post a Markdown message to Slack.
uncaught_exception(exc)Post an alert to Slack about an uncaught webapp exception.
Methods Documentation
- async message(message)#
Post a Markdown message to Slack.
Slack limits the main section of the message to 3000 characters. It will be truncated if longer than that.