Skip to content

Commit

Permalink
Init sentry when the dsn is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpirix committed May 23, 2024
1 parent 041ee6d commit ecfc876
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions qgis-app/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,12 @@
# Sentry
SENTRY_DSN = os.environ.get("SENTRY_DSN", "")

import sentry_sdk

sentry_sdk.init(
dsn=SENTRY_DSN,
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
)
if SENTRY_DSN and SENTRY_DSN != "":
import sentry_sdk

sentry_sdk.init(
dsn=SENTRY_DSN,
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
)

0 comments on commit ecfc876

Please sign in to comment.