Skip to content

Commit

Permalink
fix: move data dog config behind flag (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhtishamShahid authored and feanil committed Jun 27, 2024
1 parent 6fa2fa1 commit 5765a10
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions config/unicorn_tcp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 5765a10

Please sign in to comment.