Files
openfoodnetwork/config/initializers/datadog.rb
Pau Perez ba018df9c5 Pass request_queuing setting to Rack middleware
It turns out that this setting belongs to the Rack middleware Datadog
comes with to track requests (See
e4c430a174/docs/GettingStarted.md (rack)).

The way to pass this option to it is through `configuration[:rack]`
where the `TraceMiddleware` will read it from. See
f57aefe60a/lib/ddtrace/contrib/rack/middlewares.rb (L215-L217)
and
f57aefe60a/lib/ddtrace/contrib/rack/middlewares.rb (L30-L43).
2021-01-20 10:58:07 +01:00

13 lines
307 B
Ruby

if ENV['DATADOG_RAILS_APM']
Datadog.configure do |c|
c.use :rails, service_name: 'rails'
c.use :delayed_job, service_name: 'delayed_job'
c.use :dalli, service_name: 'memcached'
c.analytics_enabled = true
c.runtime_metrics_enabled = true
c[:rack].request_queuing = true
end
end