Skip to content

Commit

Permalink
Add sentry rate into the environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpirix committed Jun 10, 2024
1 parent b792327 commit cc32564
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dockerize/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ ENABLE_LDAP=False
# SENTRY
SENTRY_DSN=''

# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
SENTRY_RATE=1.0

# Download stats URL
METABASE_DOWNLOAD_STATS_URL='https://plugins.qgis.org/metabase/public/dashboard/<dashboard_id>'

Expand Down
1 change: 1 addition & 0 deletions dockerize/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ services:
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- DEFAULT_PLUGINS_SITE=${DEFAULT_PLUGINS_SITE:-https://plugins.qgis.org/}
- SENTRY_DSN=${SENTRY_DSN}
- SENTRY_RATE=${SENTRY_RATE}
volumes:
- ../qgis-app:/home/web/django_project
- ./docker/uwsgi.conf:/uwsgi.conf
Expand Down
3 changes: 2 additions & 1 deletion qgis-app/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@

# Sentry
SENTRY_DSN = os.environ.get("SENTRY_DSN", "")
SENTRY_RATE = os.environ.get("SENTRY_RATE", 1.0)

if SENTRY_DSN and SENTRY_DSN != "":
import sentry_sdk
Expand All @@ -177,5 +178,5 @@
dsn=SENTRY_DSN,
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
traces_sample_rate=SENTRY_RATE,
)

0 comments on commit cc32564

Please sign in to comment.