Skip to content

Commit

Permalink
Add sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonejt committed Apr 21, 2024
1 parent c1e189e commit 7dd8c3d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 8 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pyyaml = "*"
gunicorn = "*"
uritemplate = "*"
psycopg = {extras = ["binary"], version = "*"}
sentry-sdk = {extras = ["django"], version = "*"}

[dev-packages]
pylint = "*"
Expand Down
41 changes: 33 additions & 8 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions sibyl/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from pathlib import Path
from django.core.management.utils import get_random_secret_key
import dj_database_url
import sentry_sdk

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down Expand Up @@ -157,3 +158,15 @@
SECURE_HSTS_SECONDS = 3600 if DEBUG is False else 0
SECURE_HSTS_INCLUDE_SUBDOMAINS = not DEBUG
SECURE_HSTS_PRELOAD = not DEBUG

# Sentry
sentry_sdk.init(
dsn="https://5db3e0ba1c5afa81a69054606357b5c1@o4507124907638784.ingest.us.sentry.io/4507124912357376",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
# Set profiles_sample_rate to 1.0 to profile 100%
# of sampled transactions.
# We recommend adjusting this value in production.
profiles_sample_rate=1.0,
)

0 comments on commit 7dd8c3d

Please sign in to comment.