Skip to content

Commit

Permalink
Utils: Remove dogslow from default configuration
Browse files Browse the repository at this point in the history
It is not that useful after upgrade to sentry_sdk and it doesn't seem to
be easy to fix that.

See getsentry/sentry-python#537

Fixes #3182

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Nov 17, 2019
1 parent 3446fd0 commit 45fef42
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ requests==2.22.0
django-redis==4.10.0
hiredis==1.0.1
sentry_sdk==0.13.2
dogslow==1.2
Cython==0.29.14; python_version >= '3.0'
borgbackup==1.1.10; python_version >= '3.0'
misaka==2.1.1
Expand Down
11 changes: 0 additions & 11 deletions weblate/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@
# Middleware
MIDDLEWARE = [
"weblate.middleware.ProxyMiddleware",
"dogslow.WatchdogMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
Expand Down Expand Up @@ -555,10 +554,6 @@
"class": "logging.StreamHandler",
"formatter": "django.server",
},
"dogslow": {
"level": "WARNING",
"class": "sentry_sdk.integrations.logging.EventHandler",
},
"syslog": {
"level": "DEBUG",
"class": "logging.handlers.SysLogHandler",
Expand Down Expand Up @@ -592,7 +587,6 @@
# 'handlers': [DEFAULT_LOG],
# 'level': 'DEBUG',
# },
"dogslow": {"level": "WARNING", "handlers": ["dogslow"]},
"weblate": {
"handlers": [DEFAULT_LOG],
"level": os.environ.get("WEBLATE_LOGLEVEL", "DEBUG"),
Expand Down Expand Up @@ -1034,11 +1028,6 @@
SENTRY_DSN = os.environ.get("SENTRY_DSN", None)
AKISMET_API_KEY = os.environ.get("WEBLATE_AKISMET_API_KEY", None)

# Logging slow requests
DOGSLOW_LOG_TO_SENTRY = bool(SENTRY_DSN)
DOGSLOW_LOGGER = "dogslow"
DOGSLOW_TIMER = 60

ADDITIONAL_CONFIG = "/app/data/settings-override.py"
if os.path.exists(ADDITIONAL_CONFIG):
with open(ADDITIONAL_CONFIG) as handle:
Expand Down
11 changes: 0 additions & 11 deletions weblate/settings_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@
# Middleware
MIDDLEWARE = [
"weblate.middleware.ProxyMiddleware",
"dogslow.WatchdogMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
Expand Down Expand Up @@ -438,10 +437,6 @@
"class": "logging.StreamHandler",
"formatter": "django.server",
},
"dogslow": {
"level": "WARNING",
"class": "sentry_sdk.integrations.logging.EventHandler",
},
"syslog": {
"level": "DEBUG",
"class": "logging.handlers.SysLogHandler",
Expand Down Expand Up @@ -475,7 +470,6 @@
# 'handlers': [DEFAULT_LOG],
# 'level': 'DEBUG',
# },
"dogslow": {"level": "WARNING", "handlers": ["dogslow"]},
"weblate": {"handlers": [DEFAULT_LOG], "level": "DEBUG"},
# Logging search operations
"weblate.search": {"handlers": [DEFAULT_LOG], "level": "INFO"},
Expand Down Expand Up @@ -855,8 +849,3 @@
GOOGLE_ANALYTICS_ID = None
SENTRY_DSN = None
AKISMET_API_KEY = None

# Logging slow requests
DOGSLOW_LOG_TO_SENTRY = bool(SENTRY_DSN)
DOGSLOW_LOGGER = "dogslow"
DOGSLOW_TIMER = 60

0 comments on commit 45fef42

Please sign in to comment.