8000 fix: Ignore most verbose Celery logger · etherscan-io/sentry-python@eb98703 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb98703

Browse files
committed
fix: Ignore most verbose Celery logger
Fix getsentry#136
1 parent 3ee47b7 commit eb98703

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sentry_sdk/integrations/celery.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from sentry_sdk.hub import Hub
99
from sentry_sdk.utils import capture_internal_exceptions, event_from_exception
1010
from sentry_sdk.integrations import Integration
11+
from sentry_sdk.integrations.logging import ignore_logger
1112

1213

1314
class CeleryIntegration(Integration):
@@ -19,6 +20,11 @@ def setup_once():
1920
task_postrun.connect(_handle_task_postrun, weak=False)
2021
task_failure.connect(_process_failure_signal, weak=False)
2122

23+
# This logger logs every status of every task that ran on the worker.
24+
# Meaning that every task's breadcrumbs are full of stuff like "Task
25+
# <foo> raised unexpected <bar>".
26+
ignore_logger("celery.worker.job")
27+
2228

2329
def _process_failure_signal(sender, task_id, einfo, **kw):
2430
# einfo from celery is not reliable

0 commit comments

Comments
 (0)
0