Skip to content

Commit

Permalink
📦 🐈 Upgrade Sentry SDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed Jul 12, 2019
1 parent c9ec557 commit 1179884
Show file tree
Hide file tree
Showing 18 changed files with 430 additions and 655 deletions.
33 changes: 6 additions & 27 deletions config/settings/base.py
Expand Up @@ -15,7 +15,9 @@
from typing import List

import dj_database_url
import sentry_sdk
from django.core.exceptions import ImproperlyConfigured
from sentry_sdk.integrations.django import DjangoIntegration

BOOLS = ("True", "true", "T", "t", "1", 1)

Expand Down Expand Up @@ -356,10 +358,6 @@ def env(name, default=NoDefaultValue, type_=str):

API_PRODUCT_PAGE_SIZE = env("API_PRODUCT_PAGE_SIZE", type_=int, default=25)


# Raven / Sentry
SENTRY_DSN = env("SENTRY_DSN", default="")

LOG_REQUESTS = True
LOG_REQUEST_ID_HEADER = "HTTP_X_REQUEST_ID"
GENERATE_REQUEST_ID_IF_NOT_IN_HEADER = True
Expand Down Expand Up @@ -429,27 +427,8 @@ def env(name, default=NoDefaultValue, type_=str):
},
}

if SENTRY_DSN:
INSTALLED_APPS += ["raven.contrib.django.raven_compat"]
RAVEN_CONFIG = {"dsn": SENTRY_DSN}
MIDDLEWARE = [
(
"raven.contrib.django.raven_compat.middleware."
"SentryResponseErrorIdMiddleware"
)
] + MIDDLEWARE
# Sentry
SENTRY_DSN = env("SENTRY_DSN", default="")

if not DEBUG:
# Extend the logging dict with Sentry settings:
LOGGING["root"] = {"level": "WARNING", "handlers": ["sentry"]}
LOGGING["handlers"]["sentry"] = {
"level": "ERROR",
"class": ("raven.contrib.django.raven_compat.handlers." "SentryHandler"),
"tags": {"custom-tag": "x"},
}
LOGGING["loggers"]["raven"] = {
"level": "DEBUG",
"handlers": ["console"],
"propagate": False,
}
LOGGING["loggers"]["rq.worker"]["handlers"].append("sentry")
if SENTRY_DSN:
sentry_sdk.init(dsn=SENTRY_DSN, integrations=[DjangoIntegration()])
235 changes: 0 additions & 235 deletions flow-typed/npm/raven-js_v3.17.x.js

This file was deleted.

0 comments on commit 1179884

Please sign in to comment.