From 61a0f463375f354aa9bb6da9db4d770de37b9e12 Mon Sep 17 00:00:00 2001 From: Tom de Bruijn Date: Fri, 23 Aug 2024 11:57:43 +0200 Subject: [PATCH] Update Rails sidekiq app to Ruby gem 4 Update it to use the integration loader mechanism. --- ruby/rails7-sidekiq/app/Gemfile.lock | 6 +++--- ruby/rails7-sidekiq/app/config/puma.rb | 2 ++ ruby/rails7-sidekiq/app/config/routes.rb | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ruby/rails7-sidekiq/app/Gemfile.lock b/ruby/rails7-sidekiq/app/Gemfile.lock index 8e9763ef..835d01fa 100644 --- a/ruby/rails7-sidekiq/app/Gemfile.lock +++ b/ruby/rails7-sidekiq/app/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: /integration specs: - appsignal (3.10.0) + appsignal (4.0.0) rack GEM @@ -155,7 +155,7 @@ GEM psych (5.1.2) stringio public_suffix (5.0.3) - puma (6.4.0) + puma (6.4.2) nio4r (~> 2.0) racc (1.8.0) rack (3.1.3) @@ -244,7 +244,7 @@ GEM thor (1.3.1) tilt (2.3.0) timeout (0.4.1) - turbo-rails (1.4.0) + turbo-rails (2.0.6) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) diff --git a/ruby/rails7-sidekiq/app/config/puma.rb b/ruby/rails7-sidekiq/app/config/puma.rb index daaf0369..330d16c5 100644 --- a/ruby/rails7-sidekiq/app/config/puma.rb +++ b/ruby/rails7-sidekiq/app/config/puma.rb @@ -1,3 +1,5 @@ +plugin :appsignal + # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match diff --git a/ruby/rails7-sidekiq/app/config/routes.rb b/ruby/rails7-sidekiq/app/config/routes.rb index d6cdeead..7482edc0 100644 --- a/ruby/rails7-sidekiq/app/config/routes.rb +++ b/ruby/rails7-sidekiq/app/config/routes.rb @@ -1,6 +1,7 @@ require "sidekiq/web" require 'sinatra/base' -require "appsignal/integrations/sinatra" + +Appsignal.load(:sinatra) class SinatraApp < Sinatra::Base get '/' do