Integrate Sentry for exception tracking#87
Merged
Conversation
Report unhandled exceptions to Sentry in production instead of only logging them. sentry-rails auto-installs the Rack/Rails middleware, so no controller changes are needed. - Add sentry-ruby + sentry-rails (production group) - config/initializers/sentry.rb: prod-only Sentry.init, DSN from ENV["SENTRY_DSN"], no-op when the DSN is absent - .env.sample: SENTRY_DSN placeholder - Update both lockfiles (dual-boot) send_default_pii left off (default) to avoid shipping client IPs and request data to a third party, per the app's privacy policy.
aisayo
approved these changes
Jul 9, 2026
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.
GitHub Issue
Closes #61
Motivation / Context
Exceptions are currently only written to the production logs. This wires the
app up to Sentry so unhandled exceptions are reported and surfaced for
tracking, mirroring the approach used in fastruby/points#336.
Changes
sentry-ruby+sentry-rails(new:productiongroup).sentry-railsauto-installs the Rack/Rails middleware, so no controller changes are needed.
config/initializers/sentry.rb: production-onlySentry.init, DSN read fromENV["SENTRY_DSN"]. Guarded so a missing DSN is a no-op (safe for anyenvironment without the var set).
.env.sample: addSENTRY_DSNplaceholder.Gemfile.lockandGemfile.next.lock) for thedual-boot setup.
config.send_default_piiis intentionally left at its default (false) so wedon't ship client IPs, headers, or request bodies to a third party, in line
with the app's privacy policy. Stack traces and gem context are enough to
debug.
QA / Testing Instructions
The
SENTRY_DSNvalue needs to be set in the production environment. Oncedeployed with a valid DSN, trigger an exception and confirm it shows up in the
Sentry project.
Screenshots
N/A