Configure the environment option with Sentry (#4047)
* configure the environment option with Sentry * Update webpack.config.js Co-Authored-By: Lucie <lucie.daeye@gmail.com>
This commit is contained in:
Родитель
cdc87cde53
Коммит
fe8720c131
|
@ -79,3 +79,4 @@ CLOUDINARY_API_SECRET=
|
|||
# Sentry
|
||||
SENTRY_DSN=
|
||||
HEROKU_RELEASE_VERSION=
|
||||
SENTRY_ENVIRONMENT=
|
||||
|
|
|
@ -80,6 +80,7 @@ env = environ.Env(
|
|||
# Sentry
|
||||
SENTRY_DSN=(str, None),
|
||||
HEROKU_RELEASE_VERSION=(str, None),
|
||||
SENTRY_ENVIRONMENT=(str, None),
|
||||
REVIEW_APP=(bool, False),
|
||||
)
|
||||
|
||||
|
@ -91,6 +92,7 @@ else:
|
|||
|
||||
SENTRY_DSN = env('SENTRY_DSN')
|
||||
HEROKU_RELEASE_VERSION = env('HEROKU_RELEASE_VERSION')
|
||||
SENTRY_ENVIRONMENT = env('SENTRY_ENVIRONMENT')
|
||||
|
||||
if SENTRY_DSN:
|
||||
import sentry_sdk
|
||||
|
@ -98,7 +100,8 @@ if SENTRY_DSN:
|
|||
sentry_sdk.init(
|
||||
dsn=SENTRY_DSN,
|
||||
integrations=[DjangoIntegration()],
|
||||
release=HEROKU_RELEASE_VERSION
|
||||
release=HEROKU_RELEASE_VERSION,
|
||||
environment=SENTRY_ENVIRONMENT
|
||||
)
|
||||
|
||||
# At True when running on a review app
|
||||
|
|
|
@ -24,7 +24,8 @@ const SHOW_MEMBER_NOTICE = false;
|
|||
// Initialize Sentry error reporting
|
||||
Sentry.init({
|
||||
dsn: __SENTRY_DSN__,
|
||||
release: __HEROKU_RELEASE_VERSION__
|
||||
release: __HEROKU_RELEASE_VERSION__,
|
||||
environment: __SENTRY_ENVIRONMENT__
|
||||
});
|
||||
|
||||
// To be populated via XHR and querySelector
|
||||
|
|
|
@ -36,7 +36,8 @@ let main = {
|
|||
__SENTRY_DSN__: JSON.stringify(process.env.SENTRY_DSN),
|
||||
__HEROKU_RELEASE_VERSION__: JSON.stringify(
|
||||
process.env.HEROKU_RELEASE_VERSION
|
||||
)
|
||||
),
|
||||
__SENTRY_ENVIRONMENT__: JSON.stringify(process.env.SENTRY_ENVIRONMENT)
|
||||
})
|
||||
]
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче