diff --git a/config/unicorn_tcp.rb b/config/unicorn_tcp.rb index e873d1d1d8..a05728b0cf 100644 --- a/config/unicorn_tcp.rb +++ b/config/unicorn_tcp.rb @@ -11,12 +11,13 @@ preload_app true service_name = 'forum' - -require 'ddtrace' -# Add Datadog APM configuration -Datadog.configure do |c| - c.tracing.instrument :rails, service_name: service_name - c.tracing.instrument :sinatra, service_name: service_name +if ENV['ENABLE_DATA_DOG'] + require 'ddtrace' + # Add Datadog APM configuration + Datadog.configure do |c| + c.tracing.instrument :rails, service_name: service_name + c.tracing.instrument :sinatra, service_name: service_name + end end listen_host = ENV['LISTEN_HOST'] || '0.0.0.0'