Configure Sentry for different environments (staging, production)
<p>I want to configure Sentry in a Django app to report errors using different environments, like staging and production. This way I can configure alerting per environment.</p>

<p>How can I configure different environments for Raven using different Django settings? The <code>environment</code> variable is not listed at the <a href="https://docs.sentry.io/hosted/clients/python/advanced/#client-arguments" rel="nofollow">Raven Python client arguments docs</a>, however I can find the variable in the <a href="https://github.com/getsentry/raven-python/blob/master/raven/base.py#L188" rel="nofollow">raven-python code</a>.</p>

<p>If you are setting environment as a constant within <a href="https://docs.djangoproject.com/en/dev/topics/settings/" rel="nofollow">Django settings</a>, you can set the <code>environment</code> argument when initializing the <code>raven-python</code> client.</p>

<p>You're correctâour docs didn't include the environment argument. I've <a href="https://github.com/getsentry/raven-python/pull/871" rel="nofollow">updated them</a> to <a href="https://docs.sentry.io/hosted/clients/python/advanced/#client-arguments" rel="nofollow">include it</a>. Thanks for raising the issue.</p>

python django sentry raven