You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment devs can configure Sentry's DSN either by using YML config or .env using SENTRY_DSN. If devs need fine-grained control on how reporting works on an environment by environment basis (ala dev, test and live) this can only be done in YML. Unfortunately, if you also have, (or want or need) SENTRY_DSN in .env then this config trumps the YML leaving you unable to do this.
Solution: Given that .env will always trump the YML config system, simply add a new module-specific directive SENTRY_ENV which does the same thing. A quick solution would permit one of "live", "dev" or "test" as its value:
Your solution sounds quite convoluted. The module can already detect the status of the site (live/test/dev).
A more logical solution would be to have the following in .env SENTRY_DSN_LIVE=https://[email protected] SENTRY_DSN_DEV=https://[email protected]
et cetera.
And if there's no key defined for the given environment, it doesn't load.
That being said, I personally feel this is quite far fetched. As the .env or _ss_environment files in production are not supposed to be the same anyway, and having dev and live and test environments report to the same Sentry endpoint is far from ideal....
@dcentrica I personally feel using .env is better, because less chances of errors, but whichever works best for you, works. It's not like my preference is the law or anything 😆
At the moment devs can configure Sentry's DSN either by using YML config or
.env
usingSENTRY_DSN
. If devs need fine-grained control on how reporting works on an environment by environment basis (aladev
,test
andlive
) this can only be done in YML. Unfortunately, if you also have, (or want or need)SENTRY_DSN
in.env
then this config trumps the YML leaving you unable to do this.Solution: Given that
.env
will always trump the YML config system, simply add a new module-specific directiveSENTRY_ENV
which does the same thing. A quick solution would permit one of "live", "dev" or "test" as its value:The text was updated successfully, but these errors were encountered: