Skip to content

Commit

Permalink
Merge pull request #119 from SmoFlaDru/dev-benno
Browse files Browse the repository at this point in the history
Use Sentry for error reporting
  • Loading branch information
Bensge authored Aug 25, 2024
2 parents f0d622c + 8a68f3b commit c7311d4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
17 changes: 16 additions & 1 deletion Spybot2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pathlib import Path
import environ
import os
import sentry_sdk

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down Expand Up @@ -42,6 +43,9 @@
# Steam API Key
STEAM_API_KEY = env('STEAM_API_KEY')

# Sentry SDK
SENTRY_DSN = env('SENTRY_DSN')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env.bool('DEBUG', False)

Expand Down Expand Up @@ -224,4 +228,15 @@
BOOTSTRAP5 = {
'include_jquery': False,
'javascript_in_head': False,
}
}

sentry_sdk.init(
dsn=SENTRY_DSN,
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
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,
)
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ dependencies = [
"fido2 ~=1.1",
"user-agents ~=2.2",
"django-bootstrap5 ~=24.2",
"sentry-sdk>=2.13.0",
]


[tool.uv]
dev-dependencies = ["unittest-xml-reporting ~=3.2"]

[tool.setuptools]
py-modules = []
py-modules = []
15 changes: 15 additions & 0 deletions uv.lock

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

0 comments on commit c7311d4

Please sign in to comment.