我正在尝试配置空气制动,但无法弄清楚。我想要实现的不仅仅是从生产中获取错误development
和环境。test
但是,通过以下设置,我会收到所有 3 种类型的错误消息,因为它们是在生产中发生的。所以生产错误会发送生产错误通知,但开发/测试错误也会发送生产错误通知。
如何正确配置它?
# Configures the environment the application is running in. Helps the Airbrake
# dashboard to distinguish between exceptions occurring in different
# environments. By default, it's not set.
# NOTE: This option must be set in order to make the 'ignore_environments'
# option work.
# https://github.com/airbrake/airbrake-ruby#environment
c.environment = :production
# Setting this option allows Airbrake to filter exceptions occurring in
# unwanted environments such as :test. By default, it is equal to an empty
# Array, which means Airbrake Ruby sends exceptions occurring in all
# environments.
# NOTE: This option *does not* work if you don't set the 'environment' option.
# https://github.com/airbrake/airbrake-ruby#ignore_environments
c.ignore_environments = %w(test, development)