From 92971cf07e407a8bd084e5264ef0173845ffc679 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 10 May 2024 10:16:44 -0400 Subject: [PATCH] Remove `nsa` statsd integration (replaced by OpenTelemetry) --- Gemfile | 1 - Gemfile.lock | 7 ------- config/initializers/statsd.rb | 15 --------------- 3 files changed, 23 deletions(-) delete mode 100644 config/initializers/statsd.rb diff --git a/Gemfile b/Gemfile index be02a65626..4522d034de 100644 --- a/Gemfile +++ b/Gemfile @@ -66,7 +66,6 @@ gem 'link_header', '~> 0.0' gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock' gem 'mime-types', '~> 3.5.0', require: 'mime/types/columnar' gem 'nokogiri', '~> 1.15' -gem 'nsa' gem 'oj', '~> 3.14' gem 'ox', '~> 2.14' gem 'parslet' diff --git a/Gemfile.lock b/Gemfile.lock index 095433981a..9cb7555a12 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -448,11 +448,6 @@ GEM nokogiri (1.16.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nsa (0.3.0) - activesupport (>= 4.2, < 7.2) - concurrent-ruby (~> 1.0, >= 1.0.2) - sidekiq (>= 3.5) - statsd-ruby (~> 1.4, >= 1.4.0) oj (3.16.4) bigdecimal (>= 3.0) omniauth (2.1.2) @@ -812,7 +807,6 @@ GEM simplecov-lcov (0.8.0) simplecov_json_formatter (0.1.4) stackprof (0.2.26) - statsd-ruby (1.5.0) stoplight (4.1.0) redlock (~> 1.0) stringio (3.1.0) @@ -970,7 +964,6 @@ DEPENDENCIES net-http (~> 0.4.0) net-ldap (~> 0.18) nokogiri (~> 1.15) - nsa oj (~> 3.14) omniauth (~> 2.0) omniauth-cas (~> 3.0.0.beta.1) diff --git a/config/initializers/statsd.rb b/config/initializers/statsd.rb deleted file mode 100644 index a655c10716..0000000000 --- a/config/initializers/statsd.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -if ENV['STATSD_ADDR'].present? - host, port = ENV['STATSD_ADDR'].split(':') - - statsd = Statsd.new(host, port) - statsd.namespace = ENV.fetch('STATSD_NAMESPACE') { ['Mastodon', Rails.env].join('.') } - - NSA.inform_statsd(statsd) do |informant| - informant.collect(:action_controller, :web) - informant.collect(:active_record, :db) - informant.collect(:active_support_cache, :cache) - informant.collect(:sidekiq, :sidekiq) if ENV['STATSD_SIDEKIQ'] == 'true' - end -end