Skip to content

Commit

Permalink
Use recommended sentry send mechanism
Browse files Browse the repository at this point in the history
In order to prevent deserialization error and extra memory consumption by sentry errors sending
  • Loading branch information
senid231 committed Jun 27, 2022
1 parent b6fdcc8 commit b81e213
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
20 changes: 0 additions & 20 deletions app/jobs/worker/capture_error_job.rb

This file was deleted.

5 changes: 4 additions & 1 deletion lib/capture_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def configure!
event
}

sentry_config.async = ->(event, hint = nil) { Worker::CaptureErrorJob.perform_later(event, hint) }
# Usage of an async option is discouraged by sentry-ruby developers.
# By default sentry will create its own background workers to send sentry events.
# See https://github.com/getsentry/sentry-ruby/issues/1522
# and https://docs.sentry.io/platforms/ruby/configuration/options/#optional-settings
sentry_config.send_default_pii = true
sentry_config.breadcrumbs_logger = %i[sentry_logger active_support_logger]
sentry_config.project_root = Rails.root.to_s
Expand Down

0 comments on commit b81e213

Please sign in to comment.