Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Sentry for different environments (staging, production)

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.

How can I configure different environments for Raven using different Django settings? The environment variable is not listed at the Raven Python client arguments docs, however I can find the variable in the raven-python code.

like image 911
dukebody Avatar asked Sep 22 '16 09:09

dukebody


1 Answers

If you are setting environment as a constant within Django settings, you can set the environment argument when initializing the raven-python client.

You're correct—our docs didn't include the environment argument. I've updated them to include it. Thanks for raising the issue.

like image 151
ehfeng Avatar answered Sep 27 '22 22:09

ehfeng