diff options
author | 2020-03-08 21:50:52 +0000 | |
---|---|---|
committer | 2020-03-08 21:50:52 +0000 | |
commit | b2b177de0074ff011c3100f1ab373ebd3037ea54 (patch) | |
tree | 77aa24e98814cc221fa5be44c6c2bc3fa74a3ff5 | |
parent | Merge pull request #59 from python-discord/compose (diff) |
Add sentry
-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.""" |