Skip to content

Commit

Permalink
Set up Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Oct 1, 2024
1 parent cdeb380 commit 5d6788e
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 18 deletions.
1 change: 1 addition & 0 deletions backend/.env/template
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ DJANGO_DB_PORT=None
DJANGO_DB_USER=None
DJANGO_OPEN_AI_SECRET_KEY=None
DJANGO_SECRET_KEY=None
DJANGO_SENTRY_DSN=None
DJANGO_SLACK_APP_TOKEN=None
DJANGO_SLACK_BOT_TOKEN=None
DJANGO_SLACK_SIGNING_SECRET=None
Expand Down
88 changes: 70 additions & 18 deletions backend/poetry.lock

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

1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pygithub = "^2.3.0"
python = "^3.12"
pyyaml = "^6.0.2"
requests = "^2.32.3"
sentry-sdk = {extras = ["django"], version = "^2.14.0"}
slack-bolt = "^1.20.1"

[tool.poetry.group.dev.dependencies]
Expand Down
7 changes: 7 additions & 0 deletions backend/settings/staging.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""OWASP Nest staging configuration."""

import sentry_sdk
from configurations import values

from settings.base import Base
Expand All @@ -8,6 +9,12 @@
class Staging(Base):
"""Stagind configuration."""

sentry_sdk.init(
dsn=values.SecretValue(environ_name="SENTRY_DSN"),
traces_sample_rate=0.5,
profiles_sample_rate=0.5,
)

AWS_ACCESS_KEY_ID = values.SecretValue()
AWS_SECRET_ACCESS_KEY = values.SecretValue()
AWS_STORAGE_BUCKET_NAME = "owasp-nest"
Expand Down

0 comments on commit 5d6788e

Please sign in to comment.