Class: RailsInformant::Notifiers::Slack

Inherits:
Object
  • Object
show all
Includes:
NotificationPolicy
Defined in:
lib/rails_informant/notifiers/slack.rb

Constant Summary

Constants included from NotificationPolicy

NotificationPolicy::COOLDOWN, NotificationPolicy::MILESTONE_COUNTS, NotificationPolicy::PRIVATE_NETWORKS, NotificationPolicy::SILENT_STATUSES

Instance Method Summary collapse

Methods included from NotificationPolicy

#should_notify?

Instance Method Details

#notify(error_group, occurrence) ⇒ Object



6
7
8
9
10
11
# File 'lib/rails_informant/notifiers/slack.rb', line 6

def notify(error_group, occurrence)
  post_json \
    url: RailsInformant.slack_webhook_url,
    body: build_payload(error_group, occurrence),
    label: "Slack webhook"
end