From 4907f8976d52d7f02c3f64412801ba2cd583b0e4 Mon Sep 17 00:00:00 2001 From: Eito Katagiri Date: Mon, 6 Dec 2021 12:56:19 +0900 Subject: [PATCH] update elastic-apm from 3.6.0 to 4.4.0 (#844) --- Gemfile | 5 ++++- Gemfile.lock | 31 ++++++++++++++++--------------- config/application.rb | 4 +++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Gemfile b/Gemfile index cb38d8757..4c3f186ff 100644 --- a/Gemfile +++ b/Gemfile @@ -28,7 +28,6 @@ gem 'devise-i18n' gem 'devise-token_authenticatable' gem 'dotenv-rails' gem 'draper' -gem 'elastic-apm' gem 'elasticsearch-model' gem 'fog-aws', '~> 2.0.0' gem 'formatted-dates' @@ -54,6 +53,10 @@ gem 'tzinfo-data', platforms: %i(mingw mswin x64_mingw) gem 'uglifier' gem 'wdm', platforms: %i(mingw mswin x64_mingw) +group :production do + gem 'elastic-apm' +end + group :development do gem 'pry-byebug', group: :test gem 'pry-rails' diff --git a/Gemfile.lock b/Gemfile.lock index b39959e27..96a556b0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -131,7 +131,7 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) crack (0.4.5) rexml crass (1.0.6) @@ -169,7 +169,7 @@ GEM activemodel-serializers-xml (>= 1.0) activesupport (>= 5.0) request_store (>= 1.0) - elastic-apm (3.6.0) + elastic-apm (4.4.0) concurrent-ruby (~> 1.0) http (>= 3.0) elasticsearch (7.6.0) @@ -194,9 +194,9 @@ GEM fabrication (2.21.1) faraday (1.0.1) multipart-post (>= 1.2, < 3) - ffi (1.15.0) - ffi (1.15.0-x64-mingw32) - ffi (1.15.0-x86-mingw32) + ffi (1.15.4) + ffi (1.15.4-x64-mingw32) + ffi (1.15.4-x86-mingw32) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake @@ -230,16 +230,14 @@ GEM hashdiff (1.0.1) hashie (4.1.0) htmlentities (4.3.4) - http (4.4.1) - addressable (~> 2.3) + http (5.0.4) + addressable (~> 2.8) http-cookie (~> 1.0) http-form_data (~> 2.2) - http-parser (~> 1.2.0) - http-cookie (1.0.3) + llhttp-ffi (~> 0.4.0) + http-cookie (1.0.4) domain_name (~> 0.5) http-form_data (2.3.0) - http-parser (1.2.1) - ffi-compiler (>= 1.0, < 2.0) i18n (1.8.10) concurrent-ruby (~> 1.0) ipaddress (0.8.3) @@ -270,6 +268,9 @@ GEM listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + llhttp-ffi (0.4.0) + ffi-compiler (~> 1.0) + rake (~> 13.0) loofah (2.9.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -369,7 +370,7 @@ GEM rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.0.0) - rake (13.0.3) + rake (13.0.6) rakismet (1.5.4) rb-fsevent (0.10.4) rb-inotify (0.10.1) @@ -486,9 +487,9 @@ GEM execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - unf_ext (0.0.7.7-x64-mingw32) - unf_ext (0.0.7.7-x86-mingw32) + unf_ext (0.0.8) + unf_ext (0.0.8-x64-mingw32) + unf_ext (0.0.8-x86-mingw32) unicode-display_width (2.0.0) warden (1.2.8) rack (>= 2.0.6) diff --git a/config/application.rb b/config/application.rb index 89fdcaaa3..40f62f6b7 100644 --- a/config/application.rb +++ b/config/application.rb @@ -15,7 +15,9 @@ class Application < Rails::Application config.action_mailer.delivery_job = 'ActionMailer::MailDeliveryJob' # default 6.0 config.active_record.belongs_to_required_by_default = false - config.elastic_apm.active = ENV['ELASTIC_APM_SECRET_TOKEN'].present? + if config.respond_to?(:elastic_apm) + config.elastic_apm.active = ENV['ELASTIC_APM_SECRET_TOKEN'].present? + end # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers