Skip to content

Commit 31ac778

Browse files
committed
Configure sentry environments
1 parent 7fc0cd2 commit 31ac778

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

conditional/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
# Sentry setup
3232
sentry_sdk.init(
3333
dsn=app.config['SENTRY_DSN'],
34-
integrations=[FlaskIntegration(), SqlalchemyIntegration()]
34+
integrations=[FlaskIntegration(), SqlalchemyIntegration()],
35+
environment=app.config['SENTRY_ENV'],
3536
)
3637

3738
ldap = CSHLDAP(app.config['LDAP_BIND_DN'],

config.env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525
LDAP_BIND_PW = env.get("CONDITIONAL_LDAP_BIND_PW", "")
2626

2727
# Sentry config
28-
# Do not set the DSN for local development
28+
# Not required for local development, but if you set it, make sure the
29+
# SENTRY_ENV is 'local-development'
2930
SENTRY_DSN = env.get("CONDITIONAL_SENTRY_DSN", "")
3031
SENTRY_CONFIG = {
3132
'dsn': env.get("CONDITIONAL_SENTRY_LEGACY_DSN", ""),
3233
'release': VERSION,
3334
}
35+
SENTRY_ENV = env.get("CONDITIONAL_SENTRY_ENV", "local-development")
3436

3537
# OIDC Config
3638
OIDC_ISSUER = env.get("CONDITIONAL_OIDC_ISSUER", "https://sso.csh.rit.edu/auth/realms/csh")

0 commit comments

Comments
 (0)