Skip to content

docs(celery): Fix stale comment referencing removed sentry_apply_entry - #8253

Merged
alexander-alderman-webb merged 1 commit into
masterfrom
fix/stale-celery-beat-comment
Nov 12, 2026
Merged

alexander-alderman-webb merged 1 commit into
masterfrom
fix/stale-celery-beat-comment

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Description

Comment-only change in sentry_sdk/integrations/celery/__init__.py (_update_celery_task_headers, line 244). No code changes.

Old comment:

# Add the Sentry options potentially added in `sentry_apply_entry`
# to the headers (done when auto-instrumenting Celery Beat tasks)

Why it's stale: sentry_apply_entry no longer exists. The comment was added in 9fc2f44 (#2993, Apr 2024), when sentry_apply_entry was the inner wrapper in _patch_beat_apply_entry in celery/beat.py. The Celery Beat refactor in 009fa4f (#3175, reapplying #3105, Jun 2024) removed it. It was replaced by _wrap_beat_scheduler / sentry_patched_scheduler, which call _apply_crons_data_to_schedule_entry. That function now sets the sentry-monitor-slug, sentry-monitor-config and sentry-monitor-check-in-id headers on schedule_entry.options (sentry_sdk/integrations/celery/beat.py). sentry_apply_entry appears nowhere in sentry_sdk/ anymore.

Fix: The comment still explains why sentry-* keys get copied into the inner headers dict, so I kept it and only swapped the function name for _apply_crons_data_to_schedule_entry.

Issues

n/a

via automation sched_7b023adc5c6d74c9739cbbdca1ed3cf8 · Run ID sched_7b023adc5c6d74c9739cbbdca1ed3cf8:1794470400000.

--

View Session [Sentry]

@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 12, 2026 08:02
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 139110 passed | ⏭️ 7765 skipped | Total: 146875 | Pass Rate: 94.71% | Execution Time: 447m 31s

📊 Comparison with Base Branch

Metric Change
Total Tests —
Passed Tests —
Failed Tests —
Skipped Tests —

✨ Test counts unchanged from base.

All tests are passing successfully.

✅ Patch coverage is 100.00% (no changed executable lines found; target 80%).
Project statement coverage is 90.24% (unchanged from base (939bcf0) to head (a0d6603)).

Files with missing lines (1)
File Coverage % Lines
sentry_sdk/integrations/celery/__init__.py 94.56% ⚠️ 16 Missing and 15 partials
Coverage diff
@@            Coverage Diff             @@
##        master     #8253       +/-##
==========================================
  Coverage    90.24%    90.24%        —%
==========================================
  Files          203       203         —
  Tracked lines     27125     27229      +104
  Branches     10142     10198       +56
==========================================
+ Hits         24478     24572       +94
- Misses        2647      2657       +10
- Partials      1541      1554       +13

Generated by Coverage Action

@alexander-alderman-webb
alexander-alderman-webb merged commit 01ad0ac into master Nov 12, 2026
173 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the fix/stale-celery-beat-comment branch November 12, 2026 08:17
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.

1 participant