diff options
-rw-r--r-- | Pipfile | 1 | ||||
-rw-r--r-- | snekbox/__init__.py | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -23,6 +23,7 @@ networkx = "~= 2.4" beautifulsoup4 = "~= 4.8" pyyaml = "~= 5.2" toml = "~= 0.10" +sentry-sdk = {extras = ["falcon"], version = "0.14.2"} [dev-packages] coverage = ">= 4.4.2, == 4.*" diff --git a/snekbox/__init__.py b/snekbox/__init__.py index 98efdff..d9b007c 100644 --- a/snekbox/__init__.py +++ b/snekbox/__init__.py @@ -2,11 +2,19 @@ import logging import os import sys +import sentry_sdk from gunicorn import glogging from gunicorn.config import Config +from sentry_sdk.integrations.falcon import FalconIntegration DEBUG = os.environ.get("DEBUG", False) +sentry_sdk.init( + dsn=os.environ.get("SNEKBOX_SENTRY_DSN", ""), + integrations=[FalconIntegration()], + send_default_pii=True +) + class GunicornLogger(glogging.Logger): """Logger for Gunicorn with custom formatting and support for the DEBUG environment variable.""" |