mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
Configure sentry environments
This commit is contained in:
parent
b95e446857
commit
d6eaeaf33e
3 changed files with 8 additions and 4 deletions
|
@ -62,5 +62,7 @@ WEBSOCKIFY_TARGET_FILE = environ.get('PROXSTAR_WEBSOCKIFY_TARGET_FILE',
|
||||||
'/opt/app-root/src/targets')
|
'/opt/app-root/src/targets')
|
||||||
|
|
||||||
# SENTRY
|
# SENTRY
|
||||||
# Do not set the DSN for local development
|
# If you set the sentry dsn locally, make sure you use the local-dev or some
|
||||||
SENTRY_DSN = environ.get("CONDITIONAL_SENTRY_DSN", "")
|
# other local environment, so we can separate local errors from production
|
||||||
|
SENTRY_DSN = environ.get("PROXSTAR_SENTRY_DSN", "")
|
||||||
|
SENTRY_ENV = environ.get("PROXSTAR_SENTRY_ENV", "local-dev")
|
||||||
|
|
|
@ -47,7 +47,8 @@ app.config['GIT_REVISION'] = subprocess.check_output(
|
||||||
# Sentry setup
|
# Sentry setup
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
dsn=app.config['SENTRY_DSN'],
|
dsn=app.config['SENTRY_DSN'],
|
||||||
integrations=[FlaskIntegration(), RqIntegration(), SqlalchemyIntegration()]
|
integrations=[FlaskIntegration(), RqIntegration(), SqlalchemyIntegration()],
|
||||||
|
environment=app.config['SENTRY_ENV']
|
||||||
)
|
)
|
||||||
|
|
||||||
with open('proxmox_ssh_key', 'w') as ssh_key_file:
|
with open('proxmox_ssh_key', 'w') as ssh_key_file:
|
||||||
|
|
|
@ -10,5 +10,6 @@ else:
|
||||||
|
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
config.SENTRY_DSN,
|
config.SENTRY_DSN,
|
||||||
integrations=[RqIntegration()]
|
integrations=[RqIntegration()],
|
||||||
|
environment=config.SENTRY_ENV
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue