Environments

In Honeybadger, errors are grouped by the environment they belong to. You don't have to set an environment, but it can be useful if you're running different versions of your app: for instance, you may have a "production" and a "staging" environment.

Our integrations typically set the environment automatically if your framework has an environment (such as Rails.env). To set the environment manually, set the env configuration option:

yaml
--- api_key: 'your-api-key' env: 'production'

Another option for configuring the environment that gets reported to Honyebadger is to set the HONEYBADGER_ENV environment variable. If this variable is set, its value will override the RAILS_ENV variable.

Development Environments

Some environments should usually not report errors at all, such as when you are developing on your local machine or running your test suite (locally or in CI). The honeybadger gem has an internal list of environment names which it considers development environments:

development test cucumber

Honeybadger does not report errors in these environments unless you explicitly enable data reporting:

yaml
--- api_key: 'your-api-key' report_data: true