How to turn off Sentry in development and test environment?

Viewed 2333

I set up Sentry for a rails app, but it also logs errors on localhost, which is undesirable.

How can I configure Sentry to only log the production and staging environments? (not development nor test environments)

I looked at the ruby sentry docs, and the heroku sentry addon docs but couldn't see how to do this.

1 Answers
# config/initializers/sentry.rb

...
config.enabled_environments = %w[production staging]
...
Related