Closed jschaeff closed 9 months ago
By the way, it works in staging.
We should agree on a policy with git branches. I like to never commit directly on the main branch, use the development branch for releasing in staging and merge in main when the code is ready for production.
What do you think about it ?
So, I will change the name of the environemnt in the code depending on whether I am developing locally or going to commit on development for staging or on main for production?
Or use an environment variable for this too?
Use an environment variable for this too :) Like "CONTEXT" or "RUNMODE" as you please.
Ok, done. Development branch. Environment variables: DSN and RUNMODE.
Deployed in staging and in production.
Thanks !
Could you remove the DSN from the code and get it from an environment variable ?
Also, please look at how to setup the environment (dev, staging, production) so that sentry can make the difference.
https://docs.sentry.io/platforms/go/guides/martini/configuration/environments/