Migrate sentry-raven -> sentry-ruby 6.7 (adds deploy release tracking) - #391
Conversation
…ration) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…racking Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe application replaces ChangesSentry migration
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@documentation/plans/2026-08-11-sentry-release-tracking.md`:
- Line 9: Update the release-tracking plan’s SDK references around the Tech
Stack and related sections to use version 6.7.0, and reorder the release
detector precedence to SENTRY_RELEASE, then git SHA, then Capistrano REVISION.
Keep the plan consistent with the lockfile, initializer, and design
specification.
- Around line 118-133: Add a test covering ActiveSupport logger breadcrumbs with
sentinel password and token values, then update the Sentry.init configuration to
define config.before_breadcrumb that filters breadcrumb.data via
ActiveSupport::ParameterFilter using Rails.application.config.filter_parameters
before returning the breadcrumb. Keep the existing send_default_pii request-body
decision logic unchanged.
In `@spec/initializers/sentry_spec.rb`:
- Around line 3-8: Add isolated production release-detection examples to the
Sentry configuration spec: verify Sentry.configuration.release reads a temporary
REVISION file, and verify SENTRY_RELEASE takes precedence over it. Stub or
isolate Git SHA detection so the REVISION case exercises the Capistrano
fallback, and ensure temporary files and environment variables are restored
after each example.
In `@spec/lib/bible_gateway_spec.rb`:
- Around line 31-43: Update the persistent HTTP failure example around
gateway.lookup to assert that URI.open is called exactly three times, and verify
gateway.sleep receives backoff values 1 and 2 in order while retaining the
Sentry tag expectation.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ddb87dde-6c0c-4c4b-a8aa-86f36e8d45c6
⛔ Files ignored due to path filters (1)
Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
Gemfileapp/lib/bible_gateway.rbconfig/initializers/sentry.rbdocumentation/plans/2026-08-11-sentry-release-tracking.mddocumentation/specs/2026-08-11-sentry-release-tracking-design.mdspec/initializers/sentry_spec.rbspec/lib/bible_gateway_spec.rb
- Sync plan doc to resolved SDK version 6.7.0 and correct detection order - Tighten BibleGateway retry test: assert 3 attempts and ordered backoff Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CodeRabbit review — all 4 threads processedCommit: ✅ Fixed (2)1. Plan doc stale SDK version + detection order ( 2. BibleGateway retry test precision ( ❌ Declined with reasoning (2)3. Add
4. Add isolated release-detection specs (REVISION file, SENTRY_RELEASE precedence) ( 🤖 Generated with Claude Code |
Summary
sentry-raven3.1.2 SDK (unmaintained since 2021) withsentry-ruby/sentry-rails/sentry-sidekiq6.7.0REVISIONfile at boot, so errors correlate directly to deploys with no deploy-side changes and no new secretssend_default_piioff (default), request bodies, cookies, and IPs are not sent at all (raven sent sanitized bodies)app/lib/bible_gateway.rb) fromRaven.tags_contexttoSentry.set_tagsDesign spec:
documentation/specs/2026-08-11-sentry-release-tracking-design.mdImplementation plan:
documentation/plans/2026-08-11-sentry-release-tracking.mdTest results (run serially at HEAD c1c63eb)
Post-deploy verification (one-time)
Sentry.capture_message("release tracking test")Note:
Sentry.configuration.releaseisniloutside production by design — on sentry-ruby 6.x, release detection only runs where sending is enabled. This will also settle whether the 90-day Sentry event silence was app health or broken raven delivery.Follow-up candidates (out of scope here)
BibleGatewaysets tags but never captures an event (parity with old raven behavior) — considerSentry.with_scope+capture_exceptionif persistent failures should be visible~> 6.7) to avoid a silent future major jump🤖 Generated with Claude Code
Summary by CodeRabbit