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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user