-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sentry to django backend #1528
Conversation
sample_rate=1.0, | ||
traces_sample_rate=1.0 | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for yet another change request, but will this mean we cannot override the values that are set here? Perhaps the best place for this would be in backend.manage.main()
, right after the os.environ.setdefault...
. Then the common_settings
would have:
SENTRY_DSN = os.getenv('SENTRY_DSN')
SENTRY_ENABLE_TRACING = True
SENTRY_SAMPLE_RATE = 1.0
SENTRY_TRACES_SAMPLE_RATE = 1.0
And manage.py
:
if SENTRY_DSN:
sentry_sdk.init(
dsn=SENTRY_DSN,
enable_tracing=SENTRY_ENABLE_TRACING,
sample_rate=SENTRY_SAMPLE_RATE,
traces_sample_rate=SENTRY_TRACES_SAMPLE_RATE
)
That way, we would be able to set different values for enable_tracing
etc. per instance, but keep a Sentry init for all instances.
@@ -20,6 +20,8 @@ | |||
# SECURITY WARNING: keep the secret key used in production secret! | |||
SECRET_KEY = 'kxreeb3bds$oibo7ex#f3bi5r+d(1x5zljo-#ms=i2%ih-!pvn' | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add emtpy lines here.
I added a branch in the deployment module which should make it easier to add Sentry to the different RSLab applications. So it's not necessary to include this in the code base of the individual repos. |
No description provided.