Skip to content

fix(sentry): silence celery redis-backend reconnect-retry log - #3036

Merged
vpetersson merged 1 commit into
masterfrom
fix/sentry-ignore-celery-redis-backend
Jun 9, 2026
Merged

fix(sentry): silence celery redis-backend reconnect-retry log#3036
vpetersson merged 1 commit into
masterfrom
fix/sentry-ignore-celery-redis-backend

Conversation

@vpetersson

Copy link
Copy Markdown
Contributor

Issues Fixed

Sentry ANTHIAS-2EConnection to Redis lost: Retry (4/20) in 1.00 second. from the celery.backends.redis logger.

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_send exception filter doesn't see it — it has to be silenced at the logger.

  • ignore_logger('celery.backends.redis'), alongside the existing celery.worker.consumer.consumer / celery.beat entries
  • Extend the ignored-logger regression test

Checklist

  • I have performed a self-review of my own code.
  • New and existing unit tests pass locally and on CI with my changes.
  • I have done an end-to-end test for Raspberry Pi devices.
  • I have tested my changes for x86 devices.
  • I added a documentation for the changes I have made (when necessary).

🤖 Generated with Claude Code

- 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]>
@vpetersson
vpetersson requested a review from a team as a code owner June 9, 2026 05:37
@vpetersson vpetersson self-assigned this Jun 9, 2026
@vpetersson
vpetersson requested a review from Copilot June 9, 2026 05:37
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vpetersson vpetersson mentioned this pull request Jun 9, 2026
5 tasks
@vpetersson
vpetersson merged commit 0145e6e into master Jun 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants