Skip to content

fix(backend): tag Sentry events with the image's git commit - #140

Merged
lewisjared merged 2 commits into
mainfrom
fix/sentry-release
Oct 19, 2026
Merged

lewisjared merged 2 commits into
mainfrom
fix/sentry-release

Conversation

@lewisjared

@lewisjared lewisjared commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Passes GIT_COMMIT to Sentry as the release. The image already bakes in the commit, but sentry_sdk.init never named a release and the SDK does not read GIT_COMMIT on its own, so backend events had no release in production or staging.

Summary by CodeRabbit

  • Bug Fixes
    • Backend errors reported to Sentry now include the Git commit as their release identifier.

@lewisjared
lewisjared marked this pull request as ready for review October 19, 2026 21:54
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 84faafc5-2346-4270-a718-62f7a928de3b
📥 Commits

Reviewing files that changed from the base of the PR and between e145da7 and 4bbcb3a.

📒 Files selected for processing: 3
  • backend/src/ref_backend/builder.py
  • backend/tests/test_builder.py
  • changelog/140.fix.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Sentry initialisation now uses settings.GIT_COMMIT as the release when a Sentry DSN is configured and the environment is not local. A test checks the release value, and the changelog records the change.

Changes: Sentry release metadata

Layer / File(s) Summary
Set and verify the Sentry release
backend/src/ref_backend/builder.py, backend/tests/test_builder.py, changelog/140.fix.md
Sentry initialisation passes settings.GIT_COMMIT as the release. The test checks that value, and the changelog notes that backend errors reported to Sentry include their release.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 4bbcb

The change associates Sentry events with the image commit, and the configured container build supplies that commit. No material merge risk is evident.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: tagging Sentry events with the image's Git commit.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lewisjared
lewisjared merged commit 834a91f into main Oct 19, 2026
5 checks passed
@lewisjared
lewisjared deleted the fix/sentry-release branch October 19, 2026 21:59
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