Skip to content
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

Closed
wants to merge 5 commits into from
Closed

Add sentry to django backend #1528

wants to merge 5 commits into from

Conversation

fliepeltje
Copy link
Contributor

No description provided.

sample_rate=1.0,
traces_sample_rate=1.0
)

Copy link
Member

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'



Copy link
Member

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.

@BeritJanssen
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants