Skip to content

Commit 55c87c5

Browse files
committed
Disable DD tracing when testing docker image
1 parent 1268f85 commit 55c87c5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

config/puma.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828

2929
require "concurrent"
3030

31-
# Disable preload_app to prevent Datadog profiler from starting before fork
32-
# (preload_app! is now ON by default in Puma 7.x)
33-
preload_app!(false)
34-
3531
if production_like
3632
# Specifies that the worker count should equal the number of processors in production.
3733
worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count })

script/build_docker.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ docker buildx build --cache-from=type=local,src=/tmp/.buildx-cache \
2929
# This is a ruby script we run to ensure that all dependencies are configured properly in
3030
# the docker container, even if they are not used in the the few requests made to the application.
3131
docker run -e RAILS_ENV=production -e SECRET_KEY_BASE_DUMMY=1 -e DATABASE_URL=postgresql://localhost \
32+
-e DD_TRACE_ENABLED=false -e DD_PROFILING_ENABLED=false \
3233
--net host "$DOCKER_TAG" \
3334
-- bin/rails runner - <<-EOS
3435
Magic.buffer('')
3536
EOS
3637

3738
docker run -e RAILS_ENV=production -e SECRET_KEY_BASE_DUMMY=1 -e DATABASE_URL=postgresql://localhost \
39+
-e DD_TRACE_ENABLED=false -e DD_PROFILING_ENABLED=false \
3840
--net host "$DOCKER_TAG" \
3941
-- bin/rails db:create db:migrate
4042
docker run -d -e RAILS_ENV=production -e SECRET_KEY_BASE_DUMMY=1 -e DATABASE_URL=postgresql://localhost \
43+
-e DD_TRACE_ENABLED=false -e DD_PROFILING_ENABLED=false \
4144
--net host "$DOCKER_TAG" \
4245
-- puma --environment production --config /app/config/puma.rb
4346

0 commit comments

Comments
 (0)