Merge branch 'hotfix/3.6.9' into develop

This commit is contained in:
Karol Sójko
2021-05-05 13:09:44 +02:00
5 changed files with 11 additions and 32 deletions

View File

@@ -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

View File

@@ -48,6 +48,7 @@ group :development, :test do
end
gem "dogstatsd-ruby", "~> 4.8"
gem "ddtrace", "~> 0.40"
gem "lograge", "~> 0.11.2"
gem "newrelic_rpm", "~> 7.0"

View File

@@ -67,8 +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)
@@ -100,11 +98,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 +211,11 @@ 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 +230,4 @@ DEPENDENCIES
web-console (= 3.5.1)
BUNDLED WITH
2.1.4
2.2.15

View File

@@ -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

View File

@@ -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