diff --git a/.env.sample b/.env.sample index de053c290..301dff6af 100644 --- a/.env.sample +++ b/.env.sample @@ -10,10 +10,13 @@ EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html BATCH_MANAGER_LOCATION=extensions/batch-manager/dist/index.min.html SF_DEFAULT_SERVER=http://localhost:3000 -# Datadog -DATADOG_ENABLED=false - # Development options DEV_DEFAULT_SYNC_SERVER=https://sync.standardnotes.org DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html DEV_BATCH_MANAGER_LOCATION=public/extensions/batch-manager/dist/index.min.html + +# NewRelic (Optional) +NEW_RELIC_ENABLED=false +NEW_RELIC_THREAD_PROFILER_ENABLED=false +NEW_RELIC_LICENSE_KEY= +NEW_RELIC_APP_NAME=Web diff --git a/Gemfile b/Gemfile index 51c76a4c7..3de81edf9 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,7 @@ group :development, :test do gem 'capistrano-git-with-submodules', '~> 2.0' end -gem "dogstatsd-ruby", "~> 4.8" -gem "ddtrace", "~> 0.40" gem "lograge", "~> 0.11.2" + +gem "newrelic_rpm", "~> 7.0" diff --git a/Gemfile.lock b/Gemfile.lock index e317fb7ee..c578fae74 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -67,9 +67,6 @@ GEM concurrent-ruby (1.1.5) connection_pool (2.2.2) crass (1.0.6) - ddtrace (0.40.0) - msgpack - dogstatsd-ruby (4.8.1) dotenv (2.7.5) dotenv-rails (2.7.5) dotenv (= 2.7.5) @@ -100,11 +97,10 @@ GEM mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.0) - msgpack (1.3.3) - msgpack (1.3.3-x64-mingw32) net-scp (2.0.0) net-ssh (>= 2.6.5, < 6.0.0) net-ssh (5.2.0) + newrelic_rpm (7.0.0) nio4r (2.5.2) nokogiri (1.11.1) mini_portile2 (~> 2.5.0) @@ -214,11 +210,10 @@ DEPENDENCIES capistrano-rails capistrano-rvm capistrano-sidekiq - ddtrace (~> 0.40) - dogstatsd-ruby (~> 4.8) dotenv-rails haml lograge (~> 0.11.2) + newrelic_rpm non-stupid-digest-assets puma rack-cors @@ -233,4 +228,4 @@ DEPENDENCIES web-console (= 3.5.1) BUNDLED WITH - 2.1.4 + 2.2.15 diff --git a/config/initializers/datadog.rb b/config/initializers/datadog.rb deleted file mode 100644 index a882239a3..000000000 --- a/config/initializers/datadog.rb +++ /dev/null @@ -1,6 +0,0 @@ -if ENV['DATADOG_ENABLED'] == 'true' - Datadog.configure do |c| - # This will activate auto-instrumentation for Rails - c.use :rails - end -end diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb index 8d8be8a5f..b1f2e3bea 100644 --- a/config/initializers/lograge.rb +++ b/config/initializers/lograge.rb @@ -4,20 +4,4 @@ Rails.application.configure do # Generate log in JSON config.lograge.formatter = Lograge::Formatters::Json.new config.lograge.ignore_actions = ['HealthCheckController#index'] - config.lograge.custom_options = lambda do |event| - correlation = Datadog.tracer.active_correlation - { - dd: { - trace_id: correlation.trace_id.to_s, - span_id: correlation.span_id.to_s, - env: correlation.env.to_s, - service: correlation.service.to_s, - version: correlation.version.to_s - }, - ddsource: ['ruby'], - time: event.time, - params: event.payload[:params], - level: event.payload[:level] - } - end end