diff --git a/.env.dev b/.env.dev index 75ae332dc..e695ed785 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,3 @@ -RAVEN_ENABLED=false -RAVEN_DSN=https://44332e9fdd3d42879c7d35bf8562c6a4:0062dc16a22b41679cd5765e5342f716@sentry.eliotberriot.com/5 DJANGO_ALLOWED_HOSTS=.funkwhale.test,localhost,nginx,0.0.0.0,127.0.0.1 DJANGO_SETTINGS_MODULE=config.settings.local DJANGO_SECRET_KEY=dev diff --git a/api/config/settings/common.py b/api/config/settings/common.py index 4c66050de..2f207289c 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -11,8 +11,6 @@ from urllib.parse import urlsplit import environ from celery.schedules import crontab -from funkwhale_api import __version__ - logger = logging.getLogger("funkwhale_api.config") ROOT_DIR = environ.Path(__file__) - 3 # (/a/b/myfile.py - 3 = /) APPS_DIR = ROOT_DIR.path("funkwhale_api") @@ -33,11 +31,6 @@ logging.config.dictConfig( }, "handlers": { "console": {"class": "logging.StreamHandler", "formatter": "console"}, - # # Add Handler for Sentry for `warning` and above - # 'sentry': { - # 'level': 'WARNING', - # 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', - # }, }, "loggers": { "funkwhale_api": { @@ -227,19 +220,6 @@ THIRD_PARTY_APPS = ( ) -# Sentry -RAVEN_ENABLED = env.bool("RAVEN_ENABLED", default=False) -RAVEN_DSN = env("RAVEN_DSN", default="") - -if RAVEN_ENABLED: - RAVEN_CONFIG = { - "dsn": RAVEN_DSN, - # If you are using git, you can also automatically configure the - # release based on the git info. - "release": __version__, - } - THIRD_PARTY_APPS += ("raven.contrib.django.raven_compat",) - # Apps specific for this project go here. LOCAL_APPS = ( "funkwhale_api.common.apps.CommonConfig", diff --git a/api/funkwhale_api/instance/dynamic_preferences_registry.py b/api/funkwhale_api/instance/dynamic_preferences_registry.py index c4340d4b8..b61096e9c 100644 --- a/api/funkwhale_api/instance/dynamic_preferences_registry.py +++ b/api/funkwhale_api/instance/dynamic_preferences_registry.py @@ -4,7 +4,6 @@ from django.core.validators import FileExtensionValidator from dynamic_preferences import types from dynamic_preferences.registries import global_preferences_registry -raven = types.Section("raven") instance = types.Section("instance") ui = types.Section("ui") @@ -107,22 +106,6 @@ class InstanceFunkwhaleSupportMessageEnabled(types.BooleanPreference): ) -@global_preferences_registry.register -class RavenDSN(types.StringPreference): - show_in_api = True - section = raven - name = "front_dsn" - default = "https://9e0562d46b09442bb8f6844e50cbca2b@sentry.eliotberriot.com/4" - verbose_name = "Raven DSN key (front-end)" - - help_text = ( - "A Raven DSN key used to report front-ent errors to " - "a sentry instance. Keeping the default one will report errors to " - "Funkwhale developers." - ) - field_kwargs = {"required": False} - - @global_preferences_registry.register class InstanceNodeinfoPrivate(types.BooleanPreference): show_in_api = False diff --git a/api/requirements/base.txt b/api/requirements/base.txt index 09c13d9b5..309335869 100644 --- a/api/requirements/base.txt +++ b/api/requirements/base.txt @@ -37,7 +37,6 @@ mutagen~=1.45.0 pymemoize~=1.0.0 django-dynamic-preferences~=1.10 -raven~=6.10.0 python-magic~=0.4.0 channels~=2.4.0 channels_redis~=3.0.0 diff --git a/changes/changelog.d/1425.enhancement b/changes/changelog.d/1425.enhancement new file mode 100644 index 000000000..24798f3be --- /dev/null +++ b/changes/changelog.d/1425.enhancement @@ -0,0 +1 @@ +Removed Raven SDK to report errors to Sentry (#1425) (1425) diff --git a/deploy/env.prod.sample b/deploy/env.prod.sample index 5937e7741..f52f819e1 100644 --- a/deploy/env.prod.sample +++ b/deploy/env.prod.sample @@ -119,13 +119,6 @@ DJANGO_SECRET_KEY= # want to # DJANGO_ADMIN_URL=^api/admin/ -# Sentry/Raven error reporting (server side) -# Enable Raven if you want to help improve funkwhale by -# automatically sending error reports our Sentry instance. -# This will help us detect and correct bugs -RAVEN_ENABLED=false -RAVEN_DSN=https://44332e9fdd3d42879c7d35bf8562c6a4:0062dc16a22b41679cd5765e5342f716@sentry.eliotberriot.com/5 - # In-place import settings # You can safely leave those settings uncommented if you don't plan to use # in place imports.