From 9c5d7cc3eb032da483811f03208d28ff380fae6f Mon Sep 17 00:00:00 2001 From: Jesse Landis-Eigsti Date: Tue, 25 Jun 2024 09:27:51 -0600 Subject: [PATCH 1/2] 1537 - remove datadog --- Gemfile | 2 +- Gemfile.lock | 6 ++---- config/initializers/datadog.rb | 13 ------------- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 config/initializers/datadog.rb diff --git a/Gemfile b/Gemfile index 06f6e72f0..d5c963618 100644 --- a/Gemfile +++ b/Gemfile @@ -59,6 +59,7 @@ gem 'view_component' group :development, :test do gem 'byebug', platform: :mri + gem 'html_tokenizer', '~> 0.0.8' gem 'database_cleaner' gem 'factory_bot_rails' gem 'faker' @@ -100,7 +101,6 @@ group :test do end group :production do - gem 'ddtrace', '~> 0.34' gem 'lograge', '~> 0.11' gem 'lograge-sql', '~> 1.1' end diff --git a/Gemfile.lock b/Gemfile.lock index 9a25bed36..0b46da928 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -149,8 +149,6 @@ GEM crass (1.0.6) database_cleaner (1.8.5) date (3.3.4) - ddtrace (0.38.0) - msgpack debug_inspector (1.1.0) deprecation (1.1.0) activesupport @@ -228,7 +226,7 @@ GEM concurrent-ruby (~> 1.0) hashdiff (1.0.1) hashie (5.0.0) - html_tokenizer (0.0.7) + html_tokenizer (0.0.8) i18n (1.14.5) concurrent-ruby (~> 1.0) image_processing (1.12.2) @@ -605,7 +603,6 @@ DEPENDENCIES capybara cocoon database_cleaner - ddtrace (~> 0.34) devise diffy edtf @@ -617,6 +614,7 @@ DEPENDENCIES flamegraph flog graphql (~> 1.12) + html_tokenizer (~> 0.0.8) image_processing jbuilder (~> 2.7) jquery-rails diff --git a/config/initializers/datadog.rb b/config/initializers/datadog.rb deleted file mode 100644 index 22e402a1b..000000000 --- a/config/initializers/datadog.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -if ENV['DD_AGENT_HOST'] - require 'ddtrace' - Datadog.configure do |c| - c.use :rails - c.use :active_record, orm_service_name: 'scholarsphere-active_record' - c.use :faraday, service_name: 'scholarsphere-faraday' - c.use :sidekiq, analytics_enabled: true - c.use :redis - c.tracer env: ENV['DD_ENV'] - end -end From f535152b7df97b2b754460f7ab0723daa256eabe Mon Sep 17 00:00:00 2001 From: Jesse Landis-Eigsti Date: Tue, 25 Jun 2024 09:30:07 -0600 Subject: [PATCH 2/2] 1537 - add bugsnag --- Gemfile | 3 ++- Gemfile.lock | 3 +++ config/initializers/bugsnag.rb | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 config/initializers/bugsnag.rb diff --git a/Gemfile b/Gemfile index d5c963618..746d89921 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,7 @@ gem 'blacklight', '~> 7.14' gem 'blacklight_oai_provider', github: 'projectblacklight/blacklight_oai_provider', ref: '428da77' gem 'bootsnap', '>= 1.4.2', require: false gem 'browser' +gem 'bugsnag', '~> 6.26' gem 'cocoon' gem 'devise' gem 'diffy' @@ -59,10 +60,10 @@ gem 'view_component' group :development, :test do gem 'byebug', platform: :mri - gem 'html_tokenizer', '~> 0.0.8' gem 'database_cleaner' gem 'factory_bot_rails' gem 'faker' + gem 'html_tokenizer', '~> 0.0.8' gem 'niftany', '~> 0.10' gem 'pry-byebug' gem 'pry-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 0b46da928..f52cb2704 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -127,6 +127,8 @@ GEM bootsnap (1.13.0) msgpack (~> 1.2) browser (4.2.0) + bugsnag (6.27.1) + concurrent-ruby (~> 1.0) builder (3.2.4) byebug (11.1.3) capybara (3.39.2) @@ -599,6 +601,7 @@ DEPENDENCIES blacklight_oai_provider! bootsnap (>= 1.4.2) browser + bugsnag (~> 6.26) byebug capybara cocoon diff --git a/config/initializers/bugsnag.rb b/config/initializers/bugsnag.rb new file mode 100644 index 000000000..70660cf90 --- /dev/null +++ b/config/initializers/bugsnag.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +Bugsnag.configure do |config| + config.app_version = ENV.fetch('APP_VERSION', nil) + config.release_stage = ENV.fetch('BUGSNAG_RELEASE_STAGE', 'development') +end