Skip to content

Commit

Permalink
Merge pull request #206 from readthedocs/davidfischer/send-warnings-t…
Browse files Browse the repository at this point in the history
…o-sentry

Send warnings to Sentry
  • Loading branch information
davidfischer committed Jul 28, 2020
2 parents 8d571ba + ef4bd72 commit ee88b37
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- DATABASE_URL
- SENDGRID_API_KEY
"""
import logging

from .base import * # noqa
from .base import env

Expand Down Expand Up @@ -111,8 +113,13 @@
# pylint: disable=import-error
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import LoggingIntegration

sentry_logging = LoggingIntegration(
event_level=logging.WARNING # Send warnings as events
)

sentry_sdk.init(dsn=SENTRY_DSN, integrations=[DjangoIntegration()])
sentry_sdk.init(dsn=SENTRY_DSN, integrations=[sentry_logging, DjangoIntegration()])


# Production ad server specific settings
Expand Down

0 comments on commit ee88b37

Please sign in to comment.