M Gemfile => Gemfile +2 -0
@@ 12,6 12,8 @@ gem "countries"
gem "faraday"
gem "faraday-retry"
gem "faraday-typhoeus"
+gem "sentry-rails"
+gem "sentry-ruby"
gem "shopify_app"
# Use sqlite3 as the database for Active Record
M Gemfile.lock => Gemfile.lock +7 -6
@@ 79,7 79,6 @@ GEM
msgpack (~> 1.2)
browser_sniffer (2.1.0)
builder (3.2.4)
- coderay (1.1.3)
concurrent-ruby (1.1.10)
countries (5.2.0)
unaccent (~> 0.3)
@@ 142,9 141,6 @@ GEM
racc (~> 1.4)
oj (3.13.23)
openssl (3.0.1)
- pry (0.14.1)
- coderay (~> 1.1)
- method_source (~> 1.0)
puma (5.6.5)
nio4r (~> 2.0)
racc (1.6.0)
@@ 192,6 188,11 @@ GEM
sprockets-rails
tilt
securerandom (0.2.0)
+ sentry-rails (5.6.0)
+ railties (>= 5.0)
+ sentry-ruby (~> 5.6.0)
+ sentry-ruby (5.6.0)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
shopify_api (12.2.1)
concurrent-ruby
hash_diff
@@ 248,14 249,14 @@ DEPENDENCIES
faraday-retry
faraday-typhoeus
importmap-rails
- pry
puma (~> 5.0)
rails (~> 7.0.4)
sassc-rails
+ sentry-rails
+ sentry-ruby
shopify_app
sprockets-rails
sqlite3 (~> 1.4)
- tzinfo-data
web-console
BUNDLED WITH
M app/jobs/sync_assigned_orders_job.rb => app/jobs/sync_assigned_orders_job.rb +1 -0
@@ 25,6 25,7 @@ class SyncAssignedOrdersJob < ApplicationJob
end
end
rescue StandardError
+ Sentry.capture_exception($!)
Rails.logger.error $!.to_s
ensure
lock.unlock
M app/jobs/sync_whiplash_order_status_job.rb => app/jobs/sync_whiplash_order_status_job.rb +1 -0
@@ 46,6 46,7 @@ class SyncWhiplashOrderStatusJob < ApplicationJob
end
end
rescue StandardError
+ Sentry.capture_exception($!)
Rails.logger.error $!.to_s
end
end
A config/initializers/sentry.rb => config/initializers/sentry.rb +6 -0
@@ 0,0 1,6 @@
+# frozen_string_literal: true
+
+Sentry.init do |config|
+ config.breadcrumbs_logger = [:active_support_logger, :http_logger]
+ config.traces_sample_rate = 0.0
+end