Sentry: error context and release tracking (#22)

* Sentry: use KAMAL_VERSION for release tracking

Kamal injects KAMAL_VERSION at container runtime with the git SHA,
so no need to bake it into the Docker image via build args.

* Sentry: serve as Rails error reporter

Sentry receives errors from Rails.error.report and Active Job
`retry_on/discard_on report: true`.

Error context is provided by Rails.error.set_context in Fizzy's
Authentication concern and ApplicationJob.
This commit is contained in:
Jeremy Daer
2025-12-08 09:39:35 -08:00
committed by GitHub
parent 8572fd77b8
commit e35c1223f4
+4 -1
View File
@@ -52,8 +52,11 @@ module Fizzy
config.dsn = ENV["SENTRY_DSN"]
config.breadcrumbs_logger = %i[ active_support_logger http_logger ]
config.send_default_pii = false
config.release = ENV["GIT_REVISION"]
config.release = ENV["KAMAL_VERSION"]
config.excluded_exceptions += [ "ActiveRecord::ConcurrentMigrationError" ]
# Receive Rails.error.report and retry_on/discard_on report: true
config.rails.register_error_subscriber = true
end
end
end