Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ovv committed Jan 31, 2019
1 parent 0b4c660 commit cf2c27a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/paperless/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@ def __get_boolean(key, default="NO"):
},
}

if os.getenv("PAPERLESS_SENTRY_DSN"):
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

sentry_logging = LoggingIntegration(
level=logging.INFO, # Capture info and above as breadcrumbs
event_level=logging.ERROR # Send errors as events
)
sentry_sdk.init(
dsn=os.getenv("PAPERLESS_SENTRY_DSN"),
integrations=[sentry_logging, DjangoIntegration()]
)

# The default language that tesseract will attempt to use when parsing
# documents. It should be a 3-letter language code consistent with ISO 639.
Expand Down

0 comments on commit cf2c27a

Please sign in to comment.