Skip to content

Commit

Permalink
chore(reporting)!: Removed old Sentry and associated configurations
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Sentry configurations have been moved
  • Loading branch information
b32147 committed Jul 15, 2024
1 parent 13b8c16 commit f5fcb6b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 54 deletions.
26 changes: 1 addition & 25 deletions dbmi_client/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging


def config(service, sentry=True, root_level=logging.WARNING):
def config(service, root_level=logging.WARNING):

# Set the standard configurations
config = {
Expand Down Expand Up @@ -45,30 +45,6 @@ def config(service, sentry=True, root_level=logging.WARNING):
},
}

# Add Sentry/Raven
if sentry:

# Add the handler
config["handlers"]["sentry"] = {
"level": "ERROR", # To capture more than ERROR, change to WARNING, INFO, etc.
"class": "raven.contrib.django.raven_compat.handlers.SentryHandler",
"tags": {"custom-tag": "x"},
}
config["root"]["handlers"].append("sentry")

# Add the loggers
config["loggers"]["raven"] = {
"level": "WARNING",
"handlers": ["console"],
"propagate": False,
}

config["loggers"]["sentry.errors"] = {
"level": "WARNING",
"handlers": ["console"],
"propagate": False,
}

return config


Expand Down
1 change: 1 addition & 0 deletions dbmi_client/reporting.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sentry_sdk
from furl import furl


def sentry(sentry_dsn, sentry_trace_rate=0.0, sentry_profile_rate=0.0):

def filter_transactions(event, hint):
Expand Down
25 changes: 0 additions & 25 deletions dbmi_client/sentry.py

This file was deleted.

4 changes: 0 additions & 4 deletions dbmi_client/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,6 @@ def get_logger(self):
logger.disabled = not dbmi_settings.ENABLE_LOGGING
logger.setLevel(dbmi_settings.LOG_LEVEL)

# Set the sentry client if Raven is used
if "raven.contrib.django.raven_compat" in settings.INSTALLED_APPS:
setattr(settings, "SENTRY_CLIENT", "dbmi_client.sentry.DBMISentryClient")


def reload_dbmi_settings(*args, **kwargs):
setting = kwargs["setting"]
Expand Down

0 comments on commit f5fcb6b

Please sign in to comment.