fix(sentry): silence celery redis-backend reconnect-retry log - #3036
Merged
Conversation
- celery's redis result backend logs its own connection-loss retries
at ERROR ("Connection to Redis lost: Retry (4/20) in 1.00 second.")
while it retries on its own — the same expected-transient noise as
the consumer/beat loggers already ignored, but from the
celery.backends.redis logger (Sentry ANTHIAS-2E)
- ignore_logger('celery.backends.redis'); extend the regression test
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
There was a problem hiding this comment.
Pull request overview
This pull request reduces Sentry noise by silencing Celery’s Redis result-backend reconnect/retry ERROR logs (celery.backends.redis), aligning it with the existing ignored Celery reconnect loggers already filtered for transient Redis outages.
Changes:
- Add
ignore_logger('celery.backends.redis')to Sentry logging integration setup. - Extend the existing regression test to assert the new logger is included in Sentry’s ignored logger set.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/anthias_server/django_project/settings.py |
Adds celery.backends.redis to the Sentry ignored logger list to suppress reconnect/retry ERROR log noise. |
tests/test_sentry.py |
Extends the ignored-logger regression test to cover the redis result backend logger. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
Sentry ANTHIAS-2E —
Connection to Redis lost: Retry (4/20) in 1.00 second.from thecelery.backends.redislogger.Description
Same transient-redis noise as the consumer/beat reconnect logs already ignored (#3018/#3028), but emitted by celery's redis result backend when it retries a dropped backend connection on its own. It arrives as an ERROR-level log message (not an exception), so the
before_sendexception filter doesn't see it — it has to be silenced at the logger.ignore_logger('celery.backends.redis'), alongside the existingcelery.worker.consumer.consumer/celery.beatentriesChecklist
🤖 Generated with Claude Code