2 Star 1 Fork 1

Gitee 组 / exception_notification

forked from Jim / exception_notification 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sns.md 1.39 KB
一键复制 编辑 原始数据 按行查看 历史

Amazon SNS Notifier

Notify all exceptions Amazon - Simple Notification Service: SNS.

Usage

Add the aws-sdk-sns gem to your Gemfile:

  gem 'aws-sdk-sns', '~> 1.5'

To configure it, you need to set 3 required options for aws: region, access_key_id and secret_access_key, and one more option for sns: topic_arn.

Rails.application.config.middleware.use ExceptionNotification::Rack,
                                        sns: {
                                          region: 'us-east-x',
                                          access_key_id: 'access_key_id',
                                          secret_access_key: 'secret_access_key',
                                          topic_arn: 'arn:aws:sns:us-east-x:XXXX:my-topic'
                                        }
sns_prefix

*String, optional *

Prefix in the notification subject, by default: "[Error]"

backtrace_lines

*Integer, optional *

Number of backtrace lines to be displayed in the notification message. By default: 10

Note:

  • You may need to update your previous aws-sdk-* gems in order to setup aws-sdk-sns correctly.
  • If you need any further information about the available regions or any other SNS related topic consider: SNS faqs
Ruby
1
https://gitee.com/mayun-team/exception_notification.git
git@gitee.com:mayun-team/exception_notification.git
mayun-team
exception_notification
exception_notification
master

搜索帮助