ddtrace 0.44.0 → 0.49.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +392 -17
- data/.circleci/images/primary/Dockerfile-2.0.0 +11 -1
- data/.circleci/images/primary/Dockerfile-2.1.10 +11 -1
- data/.circleci/images/primary/Dockerfile-2.2.10 +11 -1
- data/.circleci/images/primary/Dockerfile-2.3.8 +10 -0
- data/.circleci/images/primary/Dockerfile-2.4.6 +10 -0
- data/.circleci/images/primary/Dockerfile-2.5.6 +10 -0
- data/.circleci/images/primary/Dockerfile-2.6.4 +10 -0
- data/.circleci/images/primary/Dockerfile-2.7.0 +10 -0
- data/.circleci/images/primary/Dockerfile-jruby-9.2-latest +88 -0
- data/.circleci/images/primary/{Dockerfile-jruby-9.2 → Dockerfile-jruby-9.2.0.0} +1 -5
- data/.circleci/images/primary/Dockerfile-truffleruby-21.0.0 +73 -0
- data/.dockerignore +0 -1
- data/.github/workflows/create-next-milestone.yml +2 -2
- data/.gitignore +2 -1
- data/.gitlab-ci.yml +18 -18
- data/.rubocop.yml +281 -7
- data/.rubocop_todo.yml +438 -0
- data/.simplecov +6 -0
- data/Appraisals +97 -9
- data/CHANGELOG.md +270 -1
- data/Gemfile +63 -3
- data/LICENSE-3rdparty.csv +2 -0
- data/README.md +1 -0
- data/Rakefile +75 -25
- data/benchmarks/profiler_sample_loop.rb +69 -0
- data/bin/ddtracerb +15 -0
- data/ddtrace.gemspec +10 -37
- data/docker-compose.yml +69 -25
- data/docs/DevelopmentGuide.md +28 -0
- data/docs/GettingStarted.md +163 -69
- data/docs/ProfilingDevelopment.md +88 -0
- data/gemfiles/jruby_9.2.0.0_contrib.gemfile +79 -0
- data/gemfiles/jruby_9.2.0.0_contrib.gemfile.lock +1518 -0
- data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile.lock +157 -0
- data/gemfiles/jruby_9.2.0.0_core_old.gemfile +34 -0
- data/gemfiles/jruby_9.2.0.0_core_old.gemfile.lock +153 -0
- data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile.lock +174 -0
- data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile.lock +279 -0
- data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile.lock +297 -0
- data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile.lock +295 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile.lock +180 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile.lock +180 -0
- data/gemfiles/jruby_9.2.11.1_contrib.gemfile +79 -0
- data/gemfiles/jruby_9.2.11.1_contrib.gemfile.lock +1518 -0
- data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile.lock +157 -0
- data/gemfiles/jruby_9.2.11.1_core_old.gemfile +34 -0
- data/gemfiles/jruby_9.2.11.1_core_old.gemfile.lock +153 -0
- data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile.lock +174 -0
- data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile.lock +279 -0
- data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile.lock +297 -0
- data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile.lock +295 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile +36 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile.lock +180 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile +36 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile.lock +180 -0
- data/gemfiles/ruby_2.0.0_contrib_old.gemfile +64 -0
- data/gemfiles/ruby_2.0.0_contrib_old.gemfile.lock +290 -0
- data/gemfiles/ruby_2.0.0_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.0.0_core_old.gemfile.lock +118 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile.lock +196 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile.lock +205 -0
- data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile.lock +217 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile.lock +204 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile.lock +223 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile.lock +213 -0
- data/gemfiles/ruby_2.1.10_contrib_old.gemfile +66 -0
- data/gemfiles/ruby_2.1.10_contrib_old.gemfile.lock +305 -0
- data/gemfiles/ruby_2.1.10_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.1.10_core_old.gemfile.lock +118 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile.lock +196 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile.lock +205 -0
- data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile.lock +215 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile.lock +204 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile.lock +223 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile.lock +213 -0
- data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile.lock +218 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile.lock +218 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile.lock +237 -0
- data/gemfiles/ruby_2.2.10_contrib.gemfile +73 -0
- data/gemfiles/ruby_2.2.10_contrib.gemfile.lock +1450 -0
- data/gemfiles/ruby_2.2.10_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.2.10_core_old.gemfile.lock +118 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile.lock +196 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile.lock +205 -0
- data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile.lock +212 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile.lock +204 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile.lock +223 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile.lock +213 -0
- data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile.lock +218 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile.lock +218 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile.lock +237 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile.lock +229 -0
- data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile.lock +234 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile.lock +234 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile.lock +236 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile.lock +236 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile.lock +245 -0
- data/gemfiles/ruby_2.3.8_contrib.gemfile +73 -0
- data/gemfiles/ruby_2.3.8_contrib.gemfile.lock +1459 -0
- data/gemfiles/ruby_2.3.8_contrib_old.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_contrib_old.gemfile.lock +127 -0
- data/gemfiles/ruby_2.3.8_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.3.8_core_old.gemfile.lock +123 -0
- data/gemfiles/ruby_2.3.8_cucumber3.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_cucumber3.gemfile.lock +144 -0
- data/gemfiles/ruby_2.3.8_cucumber4.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_cucumber4.gemfile.lock +174 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile.lock +201 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile.lock +210 -0
- data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile +41 -0
- data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile.lock +217 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile.lock +209 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile.lock +228 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile.lock +218 -0
- data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile.lock +223 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile.lock +223 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile.lock +242 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile.lock +234 -0
- data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile +37 -0
- data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile.lock +234 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile +37 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile.lock +234 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile.lock +236 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile.lock +236 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile.lock +245 -0
- data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile +35 -0
- data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile.lock +150 -0
- data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile +35 -0
- data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile.lock +150 -0
- data/gemfiles/ruby_2.4.6_contrib.gemfile +78 -0
- data/gemfiles/ruby_2.4.6_contrib.gemfile.lock +1513 -0
- data/gemfiles/ruby_2.4.6_contrib_old.gemfile +38 -0
- data/gemfiles/ruby_2.4.6_contrib_old.gemfile.lock +155 -0
- data/gemfiles/ruby_2.4.6_core_old.gemfile +37 -0
- data/gemfiles/ruby_2.4.6_core_old.gemfile.lock +151 -0
- data/gemfiles/ruby_2.4.6_cucumber3.gemfile +38 -0
- data/gemfiles/ruby_2.4.6_cucumber3.gemfile.lock +172 -0
- data/gemfiles/ruby_2.4.6_cucumber4.gemfile +38 -0
- data/gemfiles/ruby_2.4.6_cucumber4.gemfile.lock +202 -0
- data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile +41 -0
- data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile.lock +262 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile +41 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile.lock +262 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile +42 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile.lock +264 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile +42 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile.lock +264 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile.lock +273 -0
- data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile +39 -0
- data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile.lock +178 -0
- data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile +39 -0
- data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile.lock +178 -0
- data/gemfiles/ruby_2.5.6_contrib.gemfile +83 -0
- data/gemfiles/ruby_2.5.6_contrib.gemfile.lock +1526 -0
- data/gemfiles/ruby_2.5.6_contrib_old.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_contrib_old.gemfile.lock +165 -0
- data/gemfiles/ruby_2.5.6_core_old.gemfile +38 -0
- data/gemfiles/ruby_2.5.6_core_old.gemfile.lock +161 -0
- data/gemfiles/ruby_2.5.6_cucumber3.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_cucumber3.gemfile.lock +182 -0
- data/gemfiles/ruby_2.5.6_cucumber4.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_cucumber4.gemfile.lock +214 -0
- data/gemfiles/ruby_2.5.6_cucumber5.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_cucumber5.gemfile.lock +214 -0
- data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile.lock +278 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile +46 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile +46 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile +40 -0
- data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile.lock +188 -0
- data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile +40 -0
- data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile.lock +188 -0
- data/gemfiles/ruby_2.6.4_contrib.gemfile +79 -0
- data/gemfiles/ruby_2.6.4_contrib.gemfile.lock +1524 -0
- data/gemfiles/ruby_2.6.4_contrib_old.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_contrib_old.gemfile.lock +167 -0
- data/gemfiles/ruby_2.6.4_core_old.gemfile +38 -0
- data/gemfiles/ruby_2.6.4_core_old.gemfile.lock +163 -0
- data/gemfiles/ruby_2.6.4_cucumber3.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_cucumber3.gemfile.lock +184 -0
- data/gemfiles/ruby_2.6.4_cucumber4.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_cucumber4.gemfile.lock +216 -0
- data/gemfiles/ruby_2.6.4_cucumber5.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_cucumber5.gemfile.lock +216 -0
- data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile.lock +278 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile +40 -0
- data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile.lock +190 -0
- data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile +40 -0
- data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile.lock +190 -0
- data/gemfiles/ruby_2.7.0_contrib.gemfile +78 -0
- data/gemfiles/ruby_2.7.0_contrib.gemfile.lock +1523 -0
- data/gemfiles/ruby_2.7.0_contrib_old.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_contrib_old.gemfile.lock +167 -0
- data/gemfiles/ruby_2.7.0_core_old.gemfile +38 -0
- data/gemfiles/ruby_2.7.0_core_old.gemfile.lock +163 -0
- data/gemfiles/ruby_2.7.0_cucumber3.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_cucumber3.gemfile.lock +184 -0
- data/gemfiles/ruby_2.7.0_cucumber4.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_cucumber4.gemfile.lock +216 -0
- data/gemfiles/ruby_2.7.0_cucumber5.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_cucumber5.gemfile.lock +216 -0
- data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile.lock +311 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile.lock +311 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile +40 -0
- data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile.lock +190 -0
- data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile +40 -0
- data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile.lock +190 -0
- data/gemfiles/ruby_3.0.0_contrib.gemfile +77 -0
- data/gemfiles/ruby_3.0.0_contrib.gemfile.lock +1534 -0
- data/gemfiles/ruby_3.0.0_core_old.gemfile +39 -0
- data/gemfiles/ruby_3.0.0_core_old.gemfile.lock +165 -0
- data/gemfiles/ruby_3.0.0_cucumber3.gemfile +40 -0
- data/gemfiles/ruby_3.0.0_cucumber3.gemfile.lock +186 -0
- data/gemfiles/ruby_3.0.0_cucumber4.gemfile +40 -0
- data/gemfiles/ruby_3.0.0_cucumber4.gemfile.lock +218 -0
- data/gemfiles/ruby_3.0.0_cucumber5.gemfile +40 -0
- data/gemfiles/ruby_3.0.0_cucumber5.gemfile.lock +218 -0
- data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile +43 -0
- data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile +43 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile +41 -0
- data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile.lock +192 -0
- data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile +41 -0
- data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile.lock +192 -0
- data/integration/README.md +67 -0
- data/integration/apps/rack/.dockerignore +1 -0
- data/integration/apps/rack/.envrc.sample +1 -0
- data/integration/apps/rack/.gitignore +4 -0
- data/integration/apps/rack/.rspec +1 -0
- data/integration/apps/rack/Dockerfile +28 -0
- data/integration/apps/rack/Dockerfile-ci +11 -0
- data/integration/apps/rack/Gemfile +24 -0
- data/integration/apps/rack/README.md +93 -0
- data/integration/apps/rack/app/acme.rb +80 -0
- data/integration/apps/rack/app/datadog.rb +17 -0
- data/integration/apps/rack/bin/run +22 -0
- data/integration/apps/rack/bin/setup +17 -0
- data/integration/apps/rack/bin/test +24 -0
- data/integration/apps/rack/config.ru +6 -0
- data/integration/apps/rack/config/puma.rb +14 -0
- data/integration/apps/rack/config/unicorn.rb +23 -0
- data/integration/apps/rack/docker-compose.ci.yml +62 -0
- data/integration/apps/rack/docker-compose.yml +78 -0
- data/integration/apps/rack/script/build-images +38 -0
- data/integration/apps/rack/script/ci +50 -0
- data/integration/apps/rack/spec/integration/basic_spec.rb +10 -0
- data/integration/apps/rack/spec/spec_helper.rb +16 -0
- data/integration/apps/rack/spec/support/integration_helper.rb +22 -0
- data/integration/apps/rails-five/.dockerignore +1 -0
- data/integration/apps/rails-five/.env +3 -0
- data/integration/apps/rails-five/.envrc.sample +1 -0
- data/integration/apps/rails-five/.gitignore +30 -0
- data/integration/apps/rails-five/Dockerfile +25 -0
- data/integration/apps/rails-five/Dockerfile-ci +11 -0
- data/integration/apps/rails-five/Gemfile +104 -0
- data/integration/apps/rails-five/README.md +94 -0
- data/integration/apps/rails-five/Rakefile +6 -0
- data/integration/apps/rails-five/app/channels/application_cable/channel.rb +4 -0
- data/integration/apps/rails-five/app/channels/application_cable/connection.rb +4 -0
- data/integration/apps/rails-five/app/controllers/application_controller.rb +2 -0
- data/integration/apps/rails-five/app/controllers/basic_controller.rb +36 -0
- data/integration/apps/rails-five/app/controllers/concerns/.keep +0 -0
- data/integration/apps/rails-five/app/controllers/health_controller.rb +9 -0
- data/integration/apps/rails-five/app/controllers/jobs_controller.rb +12 -0
- data/integration/apps/rails-five/app/jobs/application_job.rb +2 -0
- data/integration/apps/rails-five/app/jobs/test_job.rb +12 -0
- data/integration/apps/rails-five/app/mailers/application_mailer.rb +4 -0
- data/integration/apps/rails-five/app/models/application_record.rb +3 -0
- data/integration/apps/rails-five/app/models/concerns/.keep +0 -0
- data/integration/apps/rails-five/app/models/test.rb +2 -0
- data/integration/apps/rails-five/app/views/layouts/mailer.html.erb +13 -0
- data/integration/apps/rails-five/app/views/layouts/mailer.text.erb +1 -0
- data/integration/apps/rails-five/bin/bundle +3 -0
- data/integration/apps/rails-five/bin/rails +9 -0
- data/integration/apps/rails-five/bin/rake +9 -0
- data/integration/apps/rails-five/bin/run +24 -0
- data/integration/apps/rails-five/bin/setup +27 -0
- data/integration/apps/rails-five/bin/spring +17 -0
- data/integration/apps/rails-five/bin/test +21 -0
- data/integration/apps/rails-five/bin/update +28 -0
- data/integration/apps/rails-five/config.ru +5 -0
- data/integration/apps/rails-five/config/application.rb +97 -0
- data/integration/apps/rails-five/config/boot.rb +4 -0
- data/integration/apps/rails-five/config/cable.yml +10 -0
- data/integration/apps/rails-five/config/credentials.yml.enc +1 -0
- data/integration/apps/rails-five/config/database.yml +28 -0
- data/integration/apps/rails-five/config/environment.rb +5 -0
- data/integration/apps/rails-five/config/environments/development.rb +51 -0
- data/integration/apps/rails-five/config/environments/production.rb +82 -0
- data/integration/apps/rails-five/config/environments/test.rb +43 -0
- data/integration/apps/rails-five/config/initializers/datadog.rb +18 -0
- data/integration/apps/rails-five/config/initializers/filter_parameter_logging.rb +4 -0
- data/integration/apps/rails-five/config/initializers/resque.rb +4 -0
- data/integration/apps/rails-five/config/initializers/rollbar.rb +5 -0
- data/integration/apps/rails-five/config/initializers/wrap_parameters.rb +14 -0
- data/integration/apps/rails-five/config/locales/en.yml +33 -0
- data/integration/apps/rails-five/config/puma.rb +24 -0
- data/integration/apps/rails-five/config/routes.rb +11 -0
- data/integration/apps/rails-five/config/spring.rb +6 -0
- data/integration/apps/rails-five/config/unicorn.rb +29 -0
- data/integration/apps/rails-five/db/migrate/20190927215052_create_tests.rb +11 -0
- data/integration/apps/rails-five/db/schema.rb +23 -0
- data/integration/apps/rails-five/db/seeds.rb +7 -0
- data/integration/apps/rails-five/docker-compose.ci.yml +98 -0
- data/integration/apps/rails-five/docker-compose.yml +100 -0
- data/integration/apps/rails-five/lib/tasks/.keep +0 -0
- data/integration/apps/rails-five/log/.keep +0 -0
- data/integration/apps/rails-five/public/robots.txt +1 -0
- data/integration/apps/rails-five/script/build-images +35 -0
- data/integration/apps/rails-five/script/ci +50 -0
- data/integration/apps/rails-five/spec/integration/basic_spec.rb +10 -0
- data/integration/apps/rails-five/spec/spec_helper.rb +16 -0
- data/integration/apps/rails-five/spec/support/integration_helper.rb +22 -0
- data/integration/apps/rails-five/storage/.keep +0 -0
- data/integration/apps/rails-five/tmp/.keep +0 -0
- data/integration/apps/rails-five/vendor/.keep +0 -0
- data/integration/apps/ruby/.dockerignore +1 -0
- data/integration/apps/ruby/.envrc.sample +1 -0
- data/integration/apps/ruby/.gitignore +2 -0
- data/integration/apps/ruby/Dockerfile +25 -0
- data/integration/apps/ruby/Dockerfile-ci +11 -0
- data/integration/apps/ruby/Gemfile +11 -0
- data/integration/apps/ruby/README.md +70 -0
- data/integration/apps/ruby/agent.yaml +3 -0
- data/integration/apps/ruby/app/datadog.rb +13 -0
- data/integration/apps/ruby/app/fibonacci.rb +58 -0
- data/integration/apps/ruby/bin/run +20 -0
- data/integration/apps/ruby/bin/setup +17 -0
- data/integration/apps/ruby/bin/test +21 -0
- data/integration/apps/ruby/docker-compose.ci.yml +51 -0
- data/integration/apps/ruby/docker-compose.yml +63 -0
- data/integration/apps/ruby/script/build-images +38 -0
- data/integration/apps/ruby/script/ci +50 -0
- data/integration/images/agent/Dockerfile +2 -0
- data/integration/images/agent/agent.yaml +3 -0
- data/integration/images/include/datadog/analyzer.rb +71 -0
- data/integration/images/include/datadog/demo_env.rb +101 -0
- data/integration/images/include/http-health-check +33 -0
- data/integration/images/ruby/2.0/Dockerfile +54 -0
- data/integration/images/ruby/2.1/Dockerfile +54 -0
- data/integration/images/ruby/2.2/Dockerfile +54 -0
- data/integration/images/ruby/2.3/Dockerfile +70 -0
- data/integration/images/ruby/2.4/Dockerfile +54 -0
- data/integration/images/ruby/2.5/Dockerfile +54 -0
- data/integration/images/ruby/2.6/Dockerfile +54 -0
- data/integration/images/ruby/2.7/Dockerfile +54 -0
- data/integration/images/ruby/3.0/Dockerfile +54 -0
- data/integration/images/wrk/Dockerfile +33 -0
- data/integration/images/wrk/scripts/entrypoint.sh +17 -0
- data/integration/images/wrk/scripts/scenarios/basic/default.lua +1 -0
- data/integration/images/wrk/scripts/scenarios/basic/fibonacci.lua +1 -0
- data/integration/script/build-images +43 -0
- data/lib/ddtrace.rb +8 -5
- data/lib/ddtrace/analytics.rb +2 -0
- data/lib/ddtrace/auto_instrument.rb +3 -0
- data/lib/ddtrace/auto_instrument_base.rb +6 -0
- data/lib/ddtrace/buffer.rb +4 -4
- data/lib/ddtrace/configuration.rb +121 -26
- data/lib/ddtrace/configuration/agent_settings_resolver.rb +241 -0
- data/lib/ddtrace/configuration/base.rb +1 -1
- data/lib/ddtrace/configuration/components.rb +86 -11
- data/lib/ddtrace/configuration/option_definition.rb +1 -3
- data/lib/ddtrace/configuration/options.rb +4 -7
- data/lib/ddtrace/configuration/settings.rb +61 -6
- data/lib/ddtrace/context.rb +5 -6
- data/lib/ddtrace/context_provider.rb +0 -1
- data/lib/ddtrace/contrib/action_cable/event.rb +1 -0
- data/lib/ddtrace/contrib/action_cable/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +2 -4
- data/lib/ddtrace/contrib/action_pack/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_pack/utils.rb +1 -1
- data/lib/ddtrace/contrib/action_view/event.rb +1 -1
- data/lib/ddtrace/contrib/action_view/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_view/utils.rb +1 -1
- data/lib/ddtrace/contrib/active_record/configuration/makara_resolver.rb +30 -0
- data/lib/ddtrace/contrib/active_record/configuration/resolver.rb +107 -18
- data/lib/ddtrace/contrib/active_record/integration.rb +7 -0
- data/lib/ddtrace/contrib/active_record/utils.rb +57 -20
- data/lib/ddtrace/contrib/active_support/integration.rb +7 -1
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +2 -1
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +1 -0
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +9 -5
- data/lib/ddtrace/contrib/auto_instrument.rb +48 -0
- data/lib/ddtrace/contrib/aws/patcher.rb +1 -0
- data/lib/ddtrace/contrib/aws/services.rb +2 -0
- data/lib/ddtrace/contrib/configurable.rb +63 -39
- data/lib/ddtrace/contrib/configuration/resolver.rb +70 -5
- data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +19 -20
- data/lib/ddtrace/contrib/configuration/settings.rb +7 -6
- data/lib/ddtrace/contrib/cucumber/configuration/settings.rb +0 -10
- data/lib/ddtrace/contrib/cucumber/ext.rb +0 -2
- data/lib/ddtrace/contrib/cucumber/formatter.rb +5 -11
- data/lib/ddtrace/contrib/cucumber/integration.rb +5 -0
- data/lib/ddtrace/contrib/dalli/patcher.rb +0 -38
- data/lib/ddtrace/contrib/delayed_job/plugin.rb +0 -1
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -0
- data/lib/ddtrace/contrib/elasticsearch/quantize.rb +3 -2
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +10 -9
- data/lib/ddtrace/contrib/excon/middleware.rb +2 -6
- data/lib/ddtrace/contrib/extensions.rb +53 -3
- data/lib/ddtrace/contrib/faraday/middleware.rb +1 -3
- data/lib/ddtrace/contrib/faraday/patcher.rb +0 -36
- data/lib/ddtrace/contrib/grape/endpoint.rb +8 -15
- data/lib/ddtrace/contrib/grape/patcher.rb +0 -42
- data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +8 -8
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +1 -0
- data/lib/ddtrace/contrib/grpc/patcher.rb +0 -36
- data/lib/ddtrace/contrib/http/circuit_breaker.rb +1 -3
- data/lib/ddtrace/contrib/http/instrumentation.rb +5 -5
- data/lib/ddtrace/contrib/httpclient/configuration/settings.rb +32 -0
- data/lib/ddtrace/contrib/httpclient/ext.rb +17 -0
- data/lib/ddtrace/contrib/httpclient/instrumentation.rb +147 -0
- data/lib/ddtrace/contrib/httpclient/integration.rb +43 -0
- data/lib/ddtrace/contrib/httpclient/patcher.rb +38 -0
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +14 -20
- data/lib/ddtrace/contrib/httprb/patcher.rb +5 -2
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +2 -0
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +2 -3
- data/lib/ddtrace/contrib/patchable.rb +18 -7
- data/lib/ddtrace/contrib/patcher.rb +9 -6
- data/lib/ddtrace/contrib/presto/patcher.rb +5 -2
- data/lib/ddtrace/contrib/qless/qless_job.rb +1 -0
- data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +1 -0
- data/lib/ddtrace/contrib/que/ext.rb +19 -19
- data/lib/ddtrace/contrib/que/tracer.rb +1 -1
- data/lib/ddtrace/contrib/racecar/event.rb +1 -0
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +3 -3
- data/lib/ddtrace/contrib/rack/integration.rb +7 -0
- data/lib/ddtrace/contrib/rack/middlewares.rb +6 -11
- data/lib/ddtrace/contrib/rack/patcher.rb +1 -3
- data/lib/ddtrace/contrib/rack/request_queue.rb +6 -1
- data/lib/ddtrace/contrib/rails/auto_instrument_railtie.rb +10 -0
- data/lib/ddtrace/contrib/rails/patcher.rb +6 -2
- data/lib/ddtrace/contrib/rails/utils.rb +4 -0
- data/lib/ddtrace/contrib/rake/instrumentation.rb +4 -2
- data/lib/ddtrace/contrib/rake/integration.rb +1 -1
- data/lib/ddtrace/contrib/redis/configuration/resolver.rb +11 -4
- data/lib/ddtrace/contrib/redis/quantize.rb +1 -0
- data/lib/ddtrace/contrib/redis/vendor/LICENSE +20 -0
- data/lib/ddtrace/contrib/redis/vendor/resolver.rb +6 -7
- data/lib/ddtrace/contrib/registry.rb +2 -2
- data/lib/ddtrace/contrib/resque/configuration/settings.rb +17 -1
- data/lib/ddtrace/contrib/resque/integration.rb +1 -1
- data/lib/ddtrace/contrib/resque/patcher.rb +4 -4
- data/lib/ddtrace/contrib/resque/resque_job.rb +24 -1
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +1 -3
- data/lib/ddtrace/contrib/rspec/configuration/settings.rb +0 -10
- data/lib/ddtrace/contrib/rspec/example.rb +24 -10
- data/lib/ddtrace/contrib/rspec/ext.rb +0 -3
- data/lib/ddtrace/contrib/rspec/integration.rb +6 -1
- data/lib/ddtrace/contrib/rspec/patcher.rb +0 -2
- data/lib/ddtrace/contrib/sequel/utils.rb +5 -6
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/shoryuken/tracer.rb +7 -4
- data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +2 -7
- data/lib/ddtrace/contrib/sidekiq/tracing.rb +0 -1
- data/lib/ddtrace/contrib/sinatra/env.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/headers.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/tracer.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +3 -3
- data/lib/ddtrace/contrib/sneakers/ext.rb +11 -11
- data/lib/ddtrace/contrib/sneakers/tracer.rb +2 -4
- data/lib/ddtrace/contrib/status_code_matcher.rb +5 -3
- data/lib/ddtrace/contrib/sucker_punch/instrumentation.rb +4 -0
- data/lib/ddtrace/correlation.rb +1 -0
- data/lib/ddtrace/diagnostics/environment_logger.rb +3 -2
- data/lib/ddtrace/distributed_tracing/headers/headers.rb +1 -0
- data/lib/ddtrace/distributed_tracing/headers/helpers.rb +1 -3
- data/lib/ddtrace/error.rb +86 -8
- data/lib/ddtrace/ext/ci.rb +43 -10
- data/lib/ddtrace/ext/distributed.rb +1 -1
- data/lib/ddtrace/ext/git.rb +0 -1
- data/lib/ddtrace/ext/http.rb +1 -1
- data/lib/ddtrace/ext/profiling.rb +53 -0
- data/lib/ddtrace/ext/runtime.rb +3 -1
- data/lib/ddtrace/ext/transport.rb +2 -0
- data/lib/ddtrace/forced_tracing.rb +2 -0
- data/lib/ddtrace/logger.rb +1 -1
- data/lib/ddtrace/metrics.rb +14 -6
- data/lib/ddtrace/opentracer/distributed_headers.rb +3 -0
- data/lib/ddtrace/opentracer/span.rb +2 -6
- data/lib/ddtrace/opentracer/thread_local_scope.rb +1 -0
- data/lib/ddtrace/patcher.rb +25 -4
- data/lib/ddtrace/pin.rb +8 -61
- data/lib/ddtrace/pipeline/span_filter.rb +1 -1
- data/lib/ddtrace/profiling.rb +105 -0
- data/lib/ddtrace/profiling/backtrace_location.rb +32 -0
- data/lib/ddtrace/profiling/buffer.rb +41 -0
- data/lib/ddtrace/profiling/collectors/stack.rb +259 -0
- data/lib/ddtrace/profiling/encoding/profile.rb +31 -0
- data/lib/ddtrace/profiling/event.rb +13 -0
- data/lib/ddtrace/profiling/events/stack.rb +102 -0
- data/lib/ddtrace/profiling/exporter.rb +23 -0
- data/lib/ddtrace/profiling/ext/cpu.rb +52 -0
- data/lib/ddtrace/profiling/ext/cthread.rb +157 -0
- data/lib/ddtrace/profiling/ext/forking.rb +97 -0
- data/lib/ddtrace/profiling/flush.rb +41 -0
- data/lib/ddtrace/profiling/pprof/builder.rb +121 -0
- data/lib/ddtrace/profiling/pprof/converter.rb +85 -0
- data/lib/ddtrace/profiling/pprof/message_set.rb +12 -0
- data/lib/ddtrace/profiling/pprof/payload.rb +18 -0
- data/lib/ddtrace/profiling/pprof/pprof.proto +212 -0
- data/lib/ddtrace/profiling/pprof/pprof_pb.rb +81 -0
- data/lib/ddtrace/profiling/pprof/stack_sample.rb +90 -0
- data/lib/ddtrace/profiling/pprof/string_table.rb +10 -0
- data/lib/ddtrace/profiling/pprof/template.rb +114 -0
- data/lib/ddtrace/profiling/preload.rb +3 -0
- data/lib/ddtrace/profiling/profiler.rb +30 -0
- data/lib/ddtrace/profiling/recorder.rb +95 -0
- data/lib/ddtrace/profiling/scheduler.rb +105 -0
- data/lib/ddtrace/profiling/tasks/setup.rb +77 -0
- data/lib/ddtrace/profiling/transport/client.rb +12 -0
- data/lib/ddtrace/profiling/transport/http.rb +118 -0
- data/lib/ddtrace/profiling/transport/http/api.rb +43 -0
- data/lib/ddtrace/profiling/transport/http/api/endpoint.rb +91 -0
- data/lib/ddtrace/profiling/transport/http/api/instance.rb +36 -0
- data/lib/ddtrace/profiling/transport/http/api/spec.rb +40 -0
- data/lib/ddtrace/profiling/transport/http/builder.rb +28 -0
- data/lib/ddtrace/profiling/transport/http/client.rb +33 -0
- data/lib/ddtrace/profiling/transport/http/response.rb +21 -0
- data/lib/ddtrace/profiling/transport/io.rb +30 -0
- data/lib/ddtrace/profiling/transport/io/client.rb +27 -0
- data/lib/ddtrace/profiling/transport/io/response.rb +16 -0
- data/lib/ddtrace/profiling/transport/parcel.rb +17 -0
- data/lib/ddtrace/profiling/transport/request.rb +15 -0
- data/lib/ddtrace/profiling/transport/response.rb +8 -0
- data/lib/ddtrace/propagation/grpc_propagator.rb +1 -0
- data/lib/ddtrace/propagation/http_propagator.rb +17 -2
- data/lib/ddtrace/quantization/http.rb +1 -0
- data/lib/ddtrace/runtime/cgroup.rb +2 -2
- data/lib/ddtrace/runtime/container.rb +43 -29
- data/lib/ddtrace/runtime/identity.rb +8 -0
- data/lib/ddtrace/sampler.rb +1 -1
- data/lib/ddtrace/sampling/rule_sampler.rb +4 -9
- data/lib/ddtrace/span.rb +7 -7
- data/lib/ddtrace/sync_writer.rb +12 -12
- data/lib/ddtrace/tasks/exec.rb +48 -0
- data/lib/ddtrace/tasks/help.rb +14 -0
- data/lib/ddtrace/tracer.rb +35 -33
- data/lib/ddtrace/transport/http.rb +41 -31
- data/lib/ddtrace/transport/http/adapters/net.rb +27 -8
- data/lib/ddtrace/transport/http/adapters/registry.rb +1 -0
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +2 -4
- data/lib/ddtrace/transport/http/builder.rb +7 -1
- data/lib/ddtrace/transport/http/env.rb +8 -0
- data/lib/ddtrace/transport/http/traces.rb +2 -3
- data/lib/ddtrace/transport/io.rb +1 -1
- data/lib/ddtrace/transport/io/client.rb +15 -8
- data/lib/ddtrace/transport/io/response.rb +1 -3
- data/lib/ddtrace/transport/io/traces.rb +6 -0
- data/lib/ddtrace/transport/parcel.rb +4 -0
- data/lib/ddtrace/transport/traces.rb +18 -1
- data/lib/ddtrace/utils/compression.rb +27 -0
- data/lib/ddtrace/utils/object_set.rb +41 -0
- data/lib/ddtrace/utils/only_once.rb +40 -0
- data/lib/ddtrace/utils/sequence.rb +17 -0
- data/lib/ddtrace/utils/string_table.rb +45 -0
- data/lib/ddtrace/utils/time.rb +32 -1
- data/lib/ddtrace/vendor/active_record/MIT-LICENSE +20 -0
- data/lib/ddtrace/vendor/multipart-post/LICENSE +11 -0
- data/lib/ddtrace/vendor/multipart-post/multipart.rb +12 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post.rb +8 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/composite_read_io.rb +116 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/multipartable.rb +57 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/parts.rb +135 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/version.rb +9 -0
- data/lib/ddtrace/vendor/multipart-post/net/http/post/multipart.rb +32 -0
- data/lib/ddtrace/version.rb +15 -1
- data/lib/ddtrace/workers.rb +5 -0
- data/lib/ddtrace/workers/async.rb +11 -3
- data/lib/ddtrace/workers/loop.rb +30 -4
- data/lib/ddtrace/workers/polling.rb +1 -0
- data/lib/ddtrace/workers/queue.rb +1 -0
- data/lib/ddtrace/workers/runtime_metrics.rb +14 -1
- data/lib/ddtrace/workers/trace_writer.rb +11 -14
- data/lib/ddtrace/writer.rb +11 -5
- metadata +604 -383
- data/lib/ddtrace/augmentation.rb +0 -13
- data/lib/ddtrace/augmentation/method_wrapper.rb +0 -20
- data/lib/ddtrace/augmentation/method_wrapping.rb +0 -38
- data/lib/ddtrace/augmentation/shim.rb +0 -102
- data/lib/ddtrace/contrib/rspec/example_group.rb +0 -61
- data/lib/ddtrace/monkey.rb +0 -58
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'benchmark/ips'
|
2
|
+
require 'ddtrace'
|
3
|
+
require 'pry'
|
4
|
+
|
5
|
+
# This benchmark measures the performance of the main stack sampling loop of the profiler
|
6
|
+
|
7
|
+
class ProfilerSampleLoopBenchmark
|
8
|
+
def create_profiler
|
9
|
+
Datadog.configure do |c|
|
10
|
+
# c.diagnostics.debug = true
|
11
|
+
c.profiling.enabled = true
|
12
|
+
c.tracer.transport_options = proc { |t| t.adapter :test }
|
13
|
+
end
|
14
|
+
|
15
|
+
# Stop background threads
|
16
|
+
Datadog.profiler.shutdown!
|
17
|
+
|
18
|
+
# Call collection directly
|
19
|
+
@stack_collector = Datadog.profiler.collectors.first
|
20
|
+
@recorder = @stack_collector.recorder
|
21
|
+
end
|
22
|
+
|
23
|
+
def thread_with_very_deep_stack(depth: 500)
|
24
|
+
deep_stack = proc do |n|
|
25
|
+
if n > 0
|
26
|
+
deep_stack.call(n - 1)
|
27
|
+
else
|
28
|
+
sleep
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Thread.new { deep_stack.call(depth) }.tap { |t| t.name = "Deep stack #{depth}" }
|
33
|
+
end
|
34
|
+
|
35
|
+
def run_benchmark
|
36
|
+
Benchmark.ips do |x|
|
37
|
+
x.config(time: 10, warmup: 2)
|
38
|
+
|
39
|
+
x.report("stack collector #{ENV['CONFIG']}") do
|
40
|
+
@stack_collector.collect_and_wait
|
41
|
+
end
|
42
|
+
|
43
|
+
x.save! 'profiler-sample-loop-results'
|
44
|
+
x.compare!
|
45
|
+
end
|
46
|
+
|
47
|
+
@recorder.flush
|
48
|
+
end
|
49
|
+
|
50
|
+
def run_forever
|
51
|
+
while true
|
52
|
+
1000.times { @stack_collector.collect_and_wait }
|
53
|
+
@recorder.flush
|
54
|
+
print '.'
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
puts "Current pid is #{Process.pid}"
|
60
|
+
|
61
|
+
ProfilerSampleLoopBenchmark.new.instance_exec do
|
62
|
+
create_profiler
|
63
|
+
4.times { thread_with_very_deep_stack }
|
64
|
+
if ARGV.include?('--forever')
|
65
|
+
run_forever
|
66
|
+
else
|
67
|
+
run_benchmark
|
68
|
+
end
|
69
|
+
end
|
data/bin/ddtracerb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'ddtrace/tasks/exec'
|
3
|
+
require 'ddtrace/tasks/help'
|
4
|
+
|
5
|
+
command = ARGV.shift
|
6
|
+
|
7
|
+
case command
|
8
|
+
when 'exec'
|
9
|
+
Datadog::Tasks::Exec.new(ARGV).run
|
10
|
+
when 'help', '--help'
|
11
|
+
Datadog::Tasks::Help.new.run
|
12
|
+
else
|
13
|
+
puts "Command '#{command}' is not valid for ddtrace."
|
14
|
+
Datadog::Tasks::Help.new.run
|
15
|
+
end
|
data/ddtrace.gemspec
CHANGED
@@ -7,7 +7,7 @@ require 'ddtrace/version'
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'ddtrace'
|
9
9
|
spec.version = Datadog::VERSION::STRING
|
10
|
-
spec.required_ruby_version = ">= #{Datadog::VERSION::MINIMUM_RUBY_VERSION}"
|
10
|
+
spec.required_ruby_version = [">= #{Datadog::VERSION::MINIMUM_RUBY_VERSION}", "< #{Datadog::VERSION::MAXIMUM_RUBY_VERSION}"]
|
11
11
|
spec.required_rubygems_version = '>= 2.0.0'
|
12
12
|
spec.authors = ['Datadog, Inc.']
|
13
13
|
spec.email = ['dev@datadoghq.com']
|
@@ -29,43 +29,16 @@ Gem::Specification.new do |spec|
|
|
29
29
|
end
|
30
30
|
|
31
31
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
32
|
-
spec.
|
33
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.executables = ['ddtracerb']
|
34
33
|
spec.require_paths = ['lib']
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
# Development dependencies
|
44
|
-
spec.add_development_dependency 'concurrent-ruby' # Leave it open as we also have it as an integration and want Appraisal to control the version under test.
|
45
|
-
spec.add_development_dependency 'rake', '>= 10.5'
|
46
|
-
spec.add_development_dependency 'rubocop', '= 0.49.1' if RUBY_VERSION >= '2.1.0'
|
47
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
48
|
-
spec.add_development_dependency 'rspec-collection_matchers', '~> 1.1'
|
49
|
-
spec.add_development_dependency 'ruby-prof', '~> 1.4' if RUBY_PLATFORM != 'java' && RUBY_VERSION >= '2.4.0'
|
50
|
-
spec.add_development_dependency 'minitest', '= 5.10.1'
|
51
|
-
spec.add_development_dependency 'minitest-around', '0.5.0'
|
52
|
-
spec.add_development_dependency 'minitest-stub_any_instance', '1.0.2'
|
53
|
-
spec.add_development_dependency 'pimpmychangelog', '>= 0.1.2'
|
54
|
-
spec.add_development_dependency 'appraisal', '~> 2.2'
|
55
|
-
spec.add_development_dependency 'yard', '~> 0.9'
|
56
|
-
spec.add_development_dependency 'webmock', '>= 3.10.0'
|
57
|
-
spec.add_development_dependency 'builder'
|
58
|
-
spec.add_development_dependency 'climate_control', '~> 0.2.0'
|
35
|
+
if RUBY_VERSION >= '2.2.0'
|
36
|
+
spec.add_dependency 'msgpack'
|
37
|
+
else
|
38
|
+
# msgpack 1.4 fails for Ruby 2.0 and 2.1: https://github.com/msgpack/msgpack-ruby/issues/205
|
39
|
+
spec.add_dependency 'msgpack', '< 1.4'
|
40
|
+
end
|
59
41
|
|
60
|
-
#
|
61
|
-
spec.
|
62
|
-
spec.add_development_dependency 'benchmark-ips', '~> 2.8'
|
63
|
-
spec.add_development_dependency 'benchmark-memory', '~> 0.1'
|
64
|
-
spec.add_development_dependency 'memory_profiler', '~> 0.9'
|
65
|
-
spec.add_development_dependency 'redcarpet', '~> 3.4' if RUBY_PLATFORM != 'java'
|
66
|
-
spec.add_development_dependency 'pry', '~> 0.12.2'
|
67
|
-
spec.add_development_dependency 'pry-nav', '~> 0.3.0'
|
68
|
-
spec.add_development_dependency 'pry-stack_explorer', '~> 0.4.9' if RUBY_PLATFORM != 'java'
|
69
|
-
spec.add_development_dependency 'simplecov', '~> 0.17'
|
70
|
-
spec.add_development_dependency 'warning', '~> 1' if RUBY_VERSION >= '2.5.0'
|
42
|
+
# Used by the profiler
|
43
|
+
spec.add_dependency 'ffi', '~> 1.0'
|
71
44
|
end
|
data/docker-compose.yml
CHANGED
@@ -30,7 +30,6 @@ services:
|
|
30
30
|
volumes:
|
31
31
|
- .:/app
|
32
32
|
- bundle-2.0:/usr/local/bundle
|
33
|
-
- gemfiles-2.0:/app/gemfiles
|
34
33
|
tracer-2.1:
|
35
34
|
image: palazzem/docker-library:ddtrace_rb_2_1_10
|
36
35
|
command: /bin/bash
|
@@ -61,7 +60,6 @@ services:
|
|
61
60
|
volumes:
|
62
61
|
- .:/app
|
63
62
|
- bundle-2.1:/usr/local/bundle
|
64
|
-
- gemfiles-2.1:/app/gemfiles
|
65
63
|
tracer-2.2:
|
66
64
|
image: palazzem/docker-library:ddtrace_rb_2_2_10
|
67
65
|
command: /bin/bash
|
@@ -92,7 +90,6 @@ services:
|
|
92
90
|
volumes:
|
93
91
|
- .:/app
|
94
92
|
- bundle-2.2:/usr/local/bundle
|
95
|
-
- gemfiles-2.2:/app/gemfiles
|
96
93
|
tracer-2.3:
|
97
94
|
image: palazzem/docker-library:ddtrace_rb_2_3_8
|
98
95
|
command: /bin/bash
|
@@ -123,7 +120,6 @@ services:
|
|
123
120
|
volumes:
|
124
121
|
- .:/app
|
125
122
|
- bundle-2.3:/usr/local/bundle
|
126
|
-
- gemfiles-2.3:/app/gemfiles
|
127
123
|
tracer-2.4:
|
128
124
|
image: palazzem/docker-library:ddtrace_rb_2_4_6
|
129
125
|
command: /bin/bash
|
@@ -154,7 +150,6 @@ services:
|
|
154
150
|
volumes:
|
155
151
|
- .:/app
|
156
152
|
- bundle-2.4:/usr/local/bundle
|
157
|
-
- gemfiles-2.4:/app/gemfiles
|
158
153
|
tracer-2.5:
|
159
154
|
image: marcotc/docker-library:ddtrace_rb_2_5_6
|
160
155
|
command: /bin/bash
|
@@ -185,7 +180,6 @@ services:
|
|
185
180
|
volumes:
|
186
181
|
- .:/app
|
187
182
|
- bundle-2.5:/usr/local/bundle
|
188
|
-
- gemfiles-2.5:/app/gemfiles
|
189
183
|
tracer-2.6:
|
190
184
|
image: marcotc/docker-library:ddtrace_rb_2_6_4
|
191
185
|
command: /bin/bash
|
@@ -216,7 +210,6 @@ services:
|
|
216
210
|
volumes:
|
217
211
|
- .:/app
|
218
212
|
- bundle-2.6:/usr/local/bundle
|
219
|
-
- gemfiles-2.6:/app/gemfiles
|
220
213
|
tracer-2.7:
|
221
214
|
image: marcotc/docker-library:ddtrace_rb_2_7_0
|
222
215
|
command: /bin/bash
|
@@ -247,7 +240,6 @@ services:
|
|
247
240
|
volumes:
|
248
241
|
- .:/app
|
249
242
|
- bundle-2.7:/usr/local/bundle
|
250
|
-
- gemfiles-2.7:/app/gemfiles
|
251
243
|
tracer-3.0:
|
252
244
|
image: marcotc/docker-library:ddtrace_rb_3.0.0
|
253
245
|
command: /bin/bash
|
@@ -275,10 +267,9 @@ services:
|
|
275
267
|
volumes:
|
276
268
|
- .:/app
|
277
269
|
- bundle-3.0:/usr/local/bundle
|
278
|
-
- gemfiles-3.0:/app/gemfiles
|
279
270
|
# JRuby
|
280
|
-
tracer-jruby-9.2:
|
281
|
-
image: marcotc/docker-library:
|
271
|
+
tracer-jruby-9.2.0.0:
|
272
|
+
image: marcotc/docker-library:ddtrace_rb_jruby_9_2_0_0
|
282
273
|
command: /bin/bash
|
283
274
|
depends_on:
|
284
275
|
- ddagent
|
@@ -306,8 +297,68 @@ services:
|
|
306
297
|
tty: true
|
307
298
|
volumes:
|
308
299
|
- .:/app
|
309
|
-
- bundle-jruby-9.2:/usr/local/bundle
|
310
|
-
|
300
|
+
- bundle-jruby-9.2.0.0:/usr/local/bundle
|
301
|
+
tracer-jruby-9.2-latest:
|
302
|
+
image: marcotc/docker-library:ddtrace_rb_jruby_9_2_11_1
|
303
|
+
command: /bin/bash
|
304
|
+
depends_on:
|
305
|
+
- ddagent
|
306
|
+
- elasticsearch
|
307
|
+
- memcached
|
308
|
+
- mongodb
|
309
|
+
- mysql
|
310
|
+
- postgres
|
311
|
+
- presto
|
312
|
+
- redis
|
313
|
+
env_file: ./.env
|
314
|
+
environment:
|
315
|
+
- BUNDLE_GEMFILE=/app/Gemfile
|
316
|
+
- DD_AGENT_HOST=ddagent
|
317
|
+
- TEST_DATADOG_INTEGRATION=1
|
318
|
+
- TEST_ELASTICSEARCH_HOST=elasticsearch
|
319
|
+
- TEST_MEMCACHED_HOST=memcached
|
320
|
+
- TEST_MONGODB_HOST=mongodb
|
321
|
+
- TEST_MYSQL_HOST=mysql
|
322
|
+
- TEST_POSTGRES_HOST=postgres
|
323
|
+
- TEST_PRESTO_HOST=presto
|
324
|
+
- TEST_PRESTO_PORT=8080
|
325
|
+
- TEST_REDIS_HOST=redis
|
326
|
+
stdin_open: true
|
327
|
+
tty: true
|
328
|
+
volumes:
|
329
|
+
- .:/app
|
330
|
+
- bundle-jruby-9.2-latest:/usr/local/bundle
|
331
|
+
# TruffleRuby
|
332
|
+
tracer-truffleruby-21.0.0:
|
333
|
+
image: ivoanjo/docker-library:ddtrace_rb_truffleruby_21_0_0
|
334
|
+
command: /bin/bash
|
335
|
+
depends_on:
|
336
|
+
- ddagent
|
337
|
+
- elasticsearch
|
338
|
+
- memcached
|
339
|
+
- mongodb
|
340
|
+
- mysql
|
341
|
+
- postgres
|
342
|
+
- presto
|
343
|
+
- redis
|
344
|
+
env_file: ./.env
|
345
|
+
environment:
|
346
|
+
- BUNDLE_GEMFILE=/app/Gemfile
|
347
|
+
- DD_AGENT_HOST=ddagent
|
348
|
+
- TEST_DATADOG_INTEGRATION=1
|
349
|
+
- TEST_ELASTICSEARCH_HOST=elasticsearch
|
350
|
+
- TEST_MEMCACHED_HOST=memcached
|
351
|
+
- TEST_MONGODB_HOST=mongodb
|
352
|
+
- TEST_MYSQL_HOST=mysql
|
353
|
+
- TEST_POSTGRES_HOST=postgres
|
354
|
+
- TEST_PRESTO_HOST=presto
|
355
|
+
- TEST_PRESTO_PORT=8080
|
356
|
+
- TEST_REDIS_HOST=redis
|
357
|
+
stdin_open: true
|
358
|
+
tty: true
|
359
|
+
volumes:
|
360
|
+
- .:/app
|
361
|
+
- bundle-truffleruby-21.0.0:/usr/local/bundle
|
311
362
|
ddagent:
|
312
363
|
image: datadog/agent
|
313
364
|
environment:
|
@@ -366,7 +417,8 @@ services:
|
|
366
417
|
ports:
|
367
418
|
- "${TEST_POSTGRES_PORT}:5432"
|
368
419
|
presto:
|
369
|
-
|
420
|
+
# Move to trinodb/trino after https://github.com/treasure-data/presto-client-ruby/issues/64 is resolved.
|
421
|
+
image: starburstdata/presto:332-e.9
|
370
422
|
expose:
|
371
423
|
- "8080"
|
372
424
|
ports:
|
@@ -387,14 +439,6 @@ volumes:
|
|
387
439
|
bundle-2.6:
|
388
440
|
bundle-2.7:
|
389
441
|
bundle-3.0:
|
390
|
-
bundle-jruby-9.2:
|
391
|
-
|
392
|
-
|
393
|
-
gemfiles-2.2:
|
394
|
-
gemfiles-2.3:
|
395
|
-
gemfiles-2.4:
|
396
|
-
gemfiles-2.5:
|
397
|
-
gemfiles-2.6:
|
398
|
-
gemfiles-2.7:
|
399
|
-
gemfiles-3.0:
|
400
|
-
gemfiles-jruby-9.2:
|
442
|
+
bundle-jruby-9.2.0.0:
|
443
|
+
bundle-jruby-9.2-latest:
|
444
|
+
bundle-truffleruby-21.0.0:
|
data/docs/DevelopmentGuide.md
CHANGED
@@ -114,6 +114,34 @@ Because you are likely not running all tests locally, your report will contain p
|
|
114
114
|
You *must* check the CI step `coverage` for the complete test coverage report, ensuring coverage is not
|
115
115
|
decreased.
|
116
116
|
|
117
|
+
**Ensuring tests don't leak resources**
|
118
|
+
|
119
|
+
Tests execution can create resources that are hard to track: threads, sockets, files, etc. Because these resources can come
|
120
|
+
from the both the test setup as well as the code under test, making sure all resources are properly disposed is important
|
121
|
+
to prevent the application from inadvertently creating cumulative resources during its execution.
|
122
|
+
|
123
|
+
When running tests that utilize threads, you might see an error message similar to this one:
|
124
|
+
|
125
|
+
```
|
126
|
+
Test leaked 1 thread: "Datadog::Workers::AsyncTransport integration tests"
|
127
|
+
Ensure all threads are terminated when test finishes:
|
128
|
+
1: #<Thread:0x00007fcbc99863d0 /Users/marco.costa/work/dd-trace-rb/spec/spec_helper.rb:145 sleep> (Thread)
|
129
|
+
Thread Creation Site:
|
130
|
+
./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:245:in 'new'
|
131
|
+
./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:245:in 'block (4 levels) in <top (required)>'
|
132
|
+
Thread Backtrace:
|
133
|
+
./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:262:in 'sleep'
|
134
|
+
.dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:262:in 'block (5 levels) in <top (required)>'
|
135
|
+
./dd-trace-rb/spec/spec_helper.rb:147:in 'block in initialize'
|
136
|
+
```
|
137
|
+
|
138
|
+
This means that this test did not finish all threads by the time the test had finished. In this case, the thread
|
139
|
+
creation can be traced to `workers_integration_spec.rb:245:in 'new'`. The thread itself is sleeping at `workers_integration_spec.rb:262:in 'sleep'`.
|
140
|
+
|
141
|
+
The actionable in this case would be to ensure that the thread created in `workers_integration_spec.rb:245` is properly terminated by invoking `Thread#join` during the test tear down, which will wait for the thread to finish before returning.
|
142
|
+
|
143
|
+
Depending on the situation, the thread in question might need to be forced to terminate. It's recommended to have a mechanism in place to terminate it (a shared variable that changes value when the thread should exit), but as a last resort, `Thread#terminate` forces the thread to finish. Keep in mind that regardless of the termination method, `Thread#join` must be called to ensure that the thread has completely finished its shutdown process.
|
144
|
+
|
117
145
|
### Checking code quality
|
118
146
|
|
119
147
|
**Linting**
|
data/docs/GettingStarted.md
CHANGED
@@ -45,6 +45,8 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
45
45
|
- [GraphQL](#graphql)
|
46
46
|
- [gRPC](#grpc)
|
47
47
|
- [http.rb](#http-rb)
|
48
|
+
- [httpclient](#httpclient)
|
49
|
+
- [httpx](#httpx)
|
48
50
|
- [MongoDB](#mongodb)
|
49
51
|
- [MySQL2](#mysql2)
|
50
52
|
- [Net/HTTP](#net-http)
|
@@ -69,7 +71,9 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
69
71
|
- [Tracer settings](#tracer-settings)
|
70
72
|
- [Custom logging](#custom-logging)
|
71
73
|
- [Environment and tags](#environment-and-tags)
|
74
|
+
- [Environment variables](#environment-variables)
|
72
75
|
- [Sampling](#sampling)
|
76
|
+
- [Application-side sampling](#application-side-sampling)
|
73
77
|
- [Priority sampling](#priority-sampling)
|
74
78
|
- [Distributed tracing](#distributed-tracing)
|
75
79
|
- [HTTP request queuing](#http-request-queuing)
|
@@ -96,7 +100,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
96
100
|
| | | 2.3 | Full | Latest |
|
97
101
|
| | | 2.2 | Full | Latest |
|
98
102
|
| | | 2.1 | Full | Latest |
|
99
|
-
| | | 2.0 |
|
103
|
+
| | | 2.0 | Deprecated | < 0.50.0 |
|
100
104
|
| | | 1.9.3 | EOL since August 6th, 2020 | < 0.27.0 |
|
101
105
|
| | | 1.9.1 | EOL since August 6th, 2020 | < 0.27.0 |
|
102
106
|
| JRuby | https://www.jruby.org | 9.2 | Full | Latest |
|
@@ -144,6 +148,21 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
144
148
|
|
145
149
|
### Quickstart for Rails applications
|
146
150
|
|
151
|
+
#### Automatic instrumentation
|
152
|
+
|
153
|
+
1. Add the `ddtrace` gem to your Gemfile:
|
154
|
+
|
155
|
+
```ruby
|
156
|
+
source 'https://rubygems.org'
|
157
|
+
gem 'ddtrace', require: 'ddtrace/auto_instrument'
|
158
|
+
```
|
159
|
+
|
160
|
+
2. Install the gem with `bundle install`
|
161
|
+
|
162
|
+
3. You can configure, override, or disable any specific integration settings by also adding a [Rails Manual Configuration](#rails-manual-configuration) file.
|
163
|
+
|
164
|
+
#### Manual instrumentation
|
165
|
+
|
147
166
|
1. Add the `ddtrace` gem to your Gemfile:
|
148
167
|
|
149
168
|
```ruby
|
@@ -165,6 +184,25 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
165
184
|
|
166
185
|
### Quickstart for Ruby applications
|
167
186
|
|
187
|
+
#### Automatic instrumentation
|
188
|
+
|
189
|
+
1. Install the gem with `gem install ddtrace`
|
190
|
+
2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
|
191
|
+
3. Add `require 'ddtrace/auto_instrument'` to your application. _Note:_ This must be done _after_ requiring any supported libraries or frameworks.
|
192
|
+
|
193
|
+
```ruby
|
194
|
+
# Example frameworks and libraries
|
195
|
+
require 'sinatra'
|
196
|
+
require 'faraday'
|
197
|
+
require 'redis'
|
198
|
+
|
199
|
+
require 'ddtrace/auto_instrument'
|
200
|
+
```
|
201
|
+
|
202
|
+
You can configure, override, or disable any specific integration settings by also adding a [Ruby Manual Configuration Block](#ruby-manual-configuration).
|
203
|
+
|
204
|
+
#### Manual instrumentation
|
205
|
+
|
168
206
|
1. Install the gem with `gem install ddtrace`
|
169
207
|
2. Add a configuration block to your Ruby application:
|
170
208
|
|
@@ -362,7 +400,10 @@ For a list of available integrations, and their configuration options, please re
|
|
362
400
|
| GraphQL | `graphql` | `>= 1.7.9` | `>= 1.7.9` | *[Link](#graphql)* | *[Link](https://github.com/rmosolgo/graphql-ruby)* |
|
363
401
|
| gRPC | `grpc` | `>= 1.7` | *gem not available* | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
|
364
402
|
| http.rb | `httprb` | `>= 2.0` | `>= 2.0` | *[Link](#http-rb)* | *[Link](https://github.com/httprb/http)* |
|
403
|
+
| httpclient | `httpclient` | `>= 2.2` | `>= 2.2` | *[Link](#httpclient)* | *[Link](https://github.com/nahi/httpclient)* |
|
404
|
+
| httpx | `httpx` | `>= 0.11` | `>= 0.11` | *[Link](#httpx)* | *[Link](https://gitlab.com/honeyryderchuck/httpx)* |
|
365
405
|
| Kafka | `ruby-kafka` | `>= 0.7.10` | `>= 0.7.10` | *[Link](#kafka)* | *[Link](https://github.com/zendesk/ruby-kafka)* |
|
406
|
+
| Makara (through Active Record) | `makara` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#active-record)* | *[Link](https://github.com/instacart/makara)* |
|
366
407
|
| MongoDB | `mongo` | `>= 2.1` | `>= 2.1` | *[Link](#mongodb)* | *[Link](https://github.com/mongodb/mongo-ruby-driver)* |
|
367
408
|
| MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
|
368
409
|
| Net/HTTP | `http` | *(Any supported Ruby)* | *(Any supported Ruby)* | *[Link](#nethttp)* | *[Link](https://ruby-doc.org/stdlib-2.4.0/libdoc/net/http/rdoc/Net/HTTP.html)* |
|
@@ -402,7 +443,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
402
443
|
|
403
444
|
| Key | Description | Default |
|
404
445
|
| --- | ----------- | ------- |
|
405
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
406
446
|
| `service_name` | Service name used for `action_cable` instrumentation | `'action_cable'` |
|
407
447
|
|
408
448
|
### Action View
|
@@ -422,7 +462,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
422
462
|
|
423
463
|
| Key | Description | Default |
|
424
464
|
| ---| --- | --- |
|
425
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
426
465
|
| `service_name` | Service name used for rendering instrumentation. | `action_view` |
|
427
466
|
| `template_base_path` | Used when the template name is parsed. If you don't store your templates in the `views/` folder, you may need to change this value | `'views/'` |
|
428
467
|
|
@@ -444,7 +483,6 @@ ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
|
|
444
483
|
|
445
484
|
| Key | Description | Default |
|
446
485
|
| --- | ----------- | ------- |
|
447
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
448
486
|
| `service_name` | Service name used for `active_model_serializers` instrumentation. | `'active_model_serializers'` |
|
449
487
|
|
450
488
|
### Action Pack
|
@@ -464,7 +502,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
464
502
|
|
465
503
|
| Key | Description | Default |
|
466
504
|
| ---| --- | --- |
|
467
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
468
505
|
| `service_name` | Service name used for rendering instrumentation. | `action_pack` |
|
469
506
|
|
470
507
|
### Active Record
|
@@ -492,7 +529,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
492
529
|
|
493
530
|
| Key | Description | Default |
|
494
531
|
| ---| --- | --- |
|
495
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
496
532
|
| `orm_service_name` | Service name used for the mapping portion of query results to ActiveRecord objects. Inherits service name from parent by default. | _parent.service_name_ (e.g. `'mysql2'`) |
|
497
533
|
| `service_name` | Service name used for database portion of `active_record` instrumentation. | Name of database adapter (e.g. `'mysql2'`) |
|
498
534
|
|
@@ -510,17 +546,20 @@ Datadog.configure do |c|
|
|
510
546
|
# Symbol matching your database connection in config/database.yml
|
511
547
|
# Only available if you are using Rails with ActiveRecord.
|
512
548
|
c.use :active_record, describes: :secondary_database, service_name: 'secondary-db'
|
513
|
-
|
549
|
+
|
550
|
+
# Block configuration pattern.
|
514
551
|
c.use :active_record, describes: :secondary_database do |second_db|
|
515
552
|
second_db.service_name = 'secondary-db'
|
516
553
|
end
|
517
554
|
|
518
555
|
# Connection string with the following connection settings:
|
519
|
-
#
|
556
|
+
# adapter, username, host, port, database
|
557
|
+
# Other fields are ignored.
|
520
558
|
c.use :active_record, describes: 'mysql2://root@127.0.0.1:3306/mysql', service_name: 'secondary-db'
|
521
559
|
|
522
|
-
# Hash with following connection settings
|
523
|
-
#
|
560
|
+
# Hash with following connection settings:
|
561
|
+
# adapter, username, host, port, database
|
562
|
+
# Other fields are ignored.
|
524
563
|
c.use :active_record, describes: {
|
525
564
|
adapter: 'mysql2',
|
526
565
|
host: '127.0.0.1',
|
@@ -529,9 +568,34 @@ Datadog.configure do |c|
|
|
529
568
|
username: 'root'
|
530
569
|
},
|
531
570
|
service_name: 'secondary-db'
|
571
|
+
|
572
|
+
# If using the `makara` gem, it's possible to match on connection `role`:
|
573
|
+
c.use :active_record, describes: { makara_role: 'primary' }, service_name: 'primary-db'
|
574
|
+
c.use :active_record, describes: { makara_role: 'replica' }, service_name: 'secondary-db'
|
575
|
+
end
|
576
|
+
```
|
577
|
+
|
578
|
+
You can also create configurations based on partial matching of database connection fields:
|
579
|
+
|
580
|
+
```ruby
|
581
|
+
Datadog.configure do |c|
|
582
|
+
# Matches any connection on host `127.0.0.1`.
|
583
|
+
c.use :active_record, describes: { host: '127.0.0.1' }, service_name: 'local-db'
|
584
|
+
|
585
|
+
# Matches any `mysql2` connection.
|
586
|
+
c.use :active_record, describes: { adapter: 'mysql2'}, service_name: 'mysql-db'
|
587
|
+
|
588
|
+
# Matches any `mysql2` connection to the `reports` database.
|
589
|
+
#
|
590
|
+
# In case of multiple matching `describe` configurations, the latest one applies.
|
591
|
+
# In this case a connection with both adapter `mysql` and database `reports`
|
592
|
+
# will be configured `service_name: 'reports-db'`, not `service_name: 'mysql-db'`.
|
593
|
+
c.use :active_record, describes: { adapter: 'mysql2', database: 'reports'}, service_name: 'reports-db'
|
532
594
|
end
|
533
595
|
```
|
534
596
|
|
597
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
598
|
+
|
535
599
|
If ActiveRecord traces an event that uses a connection that matches a key defined by `describes`, it will use the trace settings assigned to that connection. If the connection does not match any of the described connections, it will use default settings defined by `c.use :active_record` instead.
|
536
600
|
|
537
601
|
### Active Support
|
@@ -554,7 +618,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
554
618
|
|
555
619
|
| Key | Description | Default |
|
556
620
|
| ---| --- | --- |
|
557
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
558
621
|
| `cache_service` | Service name used for caching with `active_support` instrumentation. | `active_support-cache` |
|
559
622
|
|
560
623
|
### AWS
|
@@ -577,7 +640,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
577
640
|
|
578
641
|
| Key | Description | Default |
|
579
642
|
| --- | ----------- | ------- |
|
580
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
581
643
|
| `service_name` | Service name used for `aws` instrumentation | `'aws'` |
|
582
644
|
|
583
645
|
### Concurrent Ruby
|
@@ -637,7 +699,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
637
699
|
|
638
700
|
| Key | Description | Default |
|
639
701
|
| --- | ----------- | ------- |
|
640
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
|
641
702
|
| `enabled` | Defines whether Cucumber tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
642
703
|
| `service_name` | Service name used for `cucumber` instrumentation. | `'cucumber'` |
|
643
704
|
| `operation_name` | Operation name used for `cucumber` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'cucumber.test'` |
|
@@ -664,7 +725,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
664
725
|
|
665
726
|
| Key | Description | Default |
|
666
727
|
| --- | ----------- | ------- |
|
667
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
668
728
|
| `service_name` | Service name used for `dalli` instrumentation | `'memcached'` |
|
669
729
|
|
670
730
|
### DelayedJob
|
@@ -685,7 +745,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
685
745
|
|
686
746
|
| Key | Description | Default |
|
687
747
|
| --- | ----------- | ------- |
|
688
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
689
748
|
| `service_name` | Service name used for `DelayedJob` instrumentation | `'delayed_job'` |
|
690
749
|
| `client_service_name` | Service name used for client-side `DelayedJob` instrumentation | `'delayed_job-client'` |
|
691
750
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
@@ -711,7 +770,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
711
770
|
|
712
771
|
| Key | Description | Default |
|
713
772
|
| --- | ----------- | ------- |
|
714
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
715
773
|
| `quantize` | Hash containing options for quantization. May include `:show` with an Array of keys to not quantize (or `:all` to skip quantization), or `:exclude` with Array of keys to exclude entirely. | `{}` |
|
716
774
|
| `service_name` | Service name used for `elasticsearch` instrumentation | `'elasticsearch'` |
|
717
775
|
|
@@ -737,7 +795,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
737
795
|
|
738
796
|
| Key | Description | Default |
|
739
797
|
| --- | ----------- | ------- |
|
740
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
741
798
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
742
799
|
| `service_name` | Service name for `ethon` instrumentation. | `'ethon'` |
|
743
800
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -769,7 +826,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
769
826
|
|
770
827
|
| Key | Description | Default |
|
771
828
|
| --- | ----------- | ------- |
|
772
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
773
829
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
774
830
|
| `error_handler` | A `Proc` that accepts a `response` parameter. If it evaluates to a *truthy* value, the trace span is marked as an error. By default only sets 5XX responses as errors. | `nil` |
|
775
831
|
| `service_name` | Service name for Excon instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'excon'` |
|
@@ -832,7 +888,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
832
888
|
|
833
889
|
| Key | Description | Default |
|
834
890
|
| --- | ----------- | ------- |
|
835
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
836
891
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
837
892
|
| `error_handler` | A `Proc` that accepts a `response` parameter. If it evaluates to a *truthy* value, the trace span is marked as an error. By default only sets 5XX responses as errors. | `nil` |
|
838
893
|
| `service_name` | Service name for Faraday instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'faraday'` |
|
@@ -866,7 +921,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
866
921
|
|
867
922
|
| Key | Description | Default |
|
868
923
|
| --- | ----------- | ------- |
|
869
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
870
924
|
| `enabled` | Defines whether Grape should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
871
925
|
| `service_name` | Service name used for `grape` instrumentation | `'grape'` |
|
872
926
|
| `error_statuses`| Defines a status code or range of status codes which should be marked as errors. `'404,405,500-599'` or `[404,405,'500-599']` | `nil` |
|
@@ -891,7 +945,6 @@ The `use :graphql` method accepts the following parameters. Additional options c
|
|
891
945
|
|
892
946
|
| Key | Description | Default |
|
893
947
|
| --- | ----------- | ------- |
|
894
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
895
948
|
| `service_name` | Service name used for `graphql` instrumentation | `'ruby-graphql'` |
|
896
949
|
| `schemas` | Required. Array of `GraphQL::Schema` objects which to trace. Tracing will be added to all the schemas listed, using the options provided to this configuration. If you do not provide any, then tracing will not be activated. | `[]` |
|
897
950
|
|
@@ -970,7 +1023,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
970
1023
|
|
971
1024
|
| Key | Description | Default |
|
972
1025
|
| --- | ----------- | ------- |
|
973
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
974
1026
|
| `service_name` | Service name used for `grpc` instrumentation | `'grpc'` |
|
975
1027
|
|
976
1028
|
**Configuring clients to use different settings**
|
@@ -1012,11 +1064,54 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1012
1064
|
|
1013
1065
|
| Key | Description | Default |
|
1014
1066
|
| --- | ----------- | ------- |
|
1015
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1016
1067
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1017
1068
|
| `service_name` | Service name for `httprb` instrumentation. | `'httprb'` |
|
1018
1069
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
1019
1070
|
|
1071
|
+
### httpclient
|
1072
|
+
|
1073
|
+
The httpclient integration will trace any HTTP call using the httpclient gem.
|
1074
|
+
|
1075
|
+
```ruby
|
1076
|
+
require 'httpclient'
|
1077
|
+
require 'ddtrace'
|
1078
|
+
Datadog.configure do |c|
|
1079
|
+
c.use :httpclient, options
|
1080
|
+
# optionally, specify a different service name for hostnames matching a regex
|
1081
|
+
c.use :httpclient, describes: /user-[^.]+\.example\.com/ do |httpclient|
|
1082
|
+
httpclient.service_name = 'user.example.com'
|
1083
|
+
httpclient.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1084
|
+
end
|
1085
|
+
end
|
1086
|
+
```
|
1087
|
+
|
1088
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
1089
|
+
|
1090
|
+
| Key | Description | Default |
|
1091
|
+
| --- | ----------- | ------- |
|
1092
|
+
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1093
|
+
| `service_name` | Service name for `httpclient` instrumentation. | `'httpclient'` |
|
1094
|
+
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
1095
|
+
|
1096
|
+
### httpx
|
1097
|
+
|
1098
|
+
`httpx` maintains its [own integration with `ddtrace`](https://honeyryderchuck.gitlab.io/httpx/wiki/Datadog-Adapter):
|
1099
|
+
|
1100
|
+
```ruby
|
1101
|
+
require "ddtrace"
|
1102
|
+
require "httpx/adapters/datadog"
|
1103
|
+
|
1104
|
+
Datadog.configure do |c|
|
1105
|
+
c.use :httpx
|
1106
|
+
|
1107
|
+
# optionally, specify a different service name for hostnames matching a regex
|
1108
|
+
c.use :httpx, describes: /user-[^.]+\.example\.com/ do |http|
|
1109
|
+
http.service_name = 'user.example.com'
|
1110
|
+
http.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1111
|
+
end
|
1112
|
+
end
|
1113
|
+
```
|
1114
|
+
|
1020
1115
|
### Kafka
|
1021
1116
|
|
1022
1117
|
The Kafka integration provides tracing of the `ruby-kafka` gem:
|
@@ -1037,7 +1132,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1037
1132
|
|
1038
1133
|
| Key | Description | Default |
|
1039
1134
|
| --- | ----------- | ------- |
|
1040
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1041
1135
|
| `service_name` | Service name used for `kafka` instrumentation | `'kafka'` |
|
1042
1136
|
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1043
1137
|
|
@@ -1066,7 +1160,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1066
1160
|
|
1067
1161
|
| Key | Description | Default |
|
1068
1162
|
| --- | ----------- | ------- |
|
1069
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1070
1163
|
| `quantize` | Hash containing options for quantization. May include `:show` with an Array of keys to not quantize (or `:all` to skip quantization), or `:exclude` with Array of keys to exclude entirely. | `{ show: [:collection, :database, :operation] }` |
|
1071
1164
|
| `service_name` | Service name used for `mongo` instrumentation | `'mongodb'` |
|
1072
1165
|
|
@@ -1090,7 +1183,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1090
1183
|
|
1091
1184
|
| Key | Description | Default |
|
1092
1185
|
| --- | ----------- | ------- |
|
1093
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1094
1186
|
| `service_name` | Service name used for `mysql2` instrumentation | `'mysql2'` |
|
1095
1187
|
|
1096
1188
|
### Net/HTTP
|
@@ -1123,7 +1215,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1123
1215
|
|
1124
1216
|
| Key | Description | Default |
|
1125
1217
|
| --- | ----------- | ------- |
|
1126
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1127
1218
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1128
1219
|
| `service_name` | Service name used for `http` instrumentation | `'net/http'` |
|
1129
1220
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -1164,7 +1255,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1164
1255
|
|
1165
1256
|
| Key | Description | Default |
|
1166
1257
|
| --- | ----------- | ------- |
|
1167
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1168
1258
|
| `service_name` | Service name used for `presto` instrumentation | `'presto'` |
|
1169
1259
|
|
1170
1260
|
### Qless
|
@@ -1185,7 +1275,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1185
1275
|
|
1186
1276
|
| Key | Description | Default |
|
1187
1277
|
| --- | ----------- | ------- |
|
1188
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1189
1278
|
| `service_name` | Service name used for `qless` instrumentation | `'qless'` |
|
1190
1279
|
| `tag_job_data` | Enable tagging with job arguments. true for on, false for off. | `false` |
|
1191
1280
|
| `tag_job_tags` | Enable tagging with job tags. true for on, false for off. | `false` |
|
@@ -1208,7 +1297,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1208
1297
|
|
1209
1298
|
| Key | Description | Default |
|
1210
1299
|
| --- | ----------- | ------- |
|
1211
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1212
1300
|
| `enabled` | Defines whether Que should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1213
1301
|
| `service_name` | Service name used for `que` instrumentation | `'que'` |
|
1214
1302
|
| `tag_args` | Enable tagging of a job's args field. `true` for on, `false` for off. | `false` |
|
@@ -1233,7 +1321,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1233
1321
|
|
1234
1322
|
| Key | Description | Default |
|
1235
1323
|
| --- | ----------- | ------- |
|
1236
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1237
1324
|
| `service_name` | Service name used for `racecar` instrumentation | `'racecar'` |
|
1238
1325
|
|
1239
1326
|
### Rack
|
@@ -1263,7 +1350,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1263
1350
|
|
1264
1351
|
| Key | Description | Default |
|
1265
1352
|
| --- | ----------- | ------- |
|
1266
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1267
1353
|
| `application` | Your Rack application. Required for `middleware_names`. | `nil` |
|
1268
1354
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) so that this service trace is connected with a trace of another service if tracing headers are received | `true` |
|
1269
1355
|
| `headers` | Hash of HTTP request or response headers to add as tags to the `rack.request`. Accepts `request` and `response` keys with Array values e.g. `['Last-Modified']`. Adds `http.request.headers.*` and `http.response.headers.*` tags respectively. | `{ response: ['Content-Type', 'X-Request-ID'] }` |
|
@@ -1326,7 +1412,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1326
1412
|
|
1327
1413
|
| Key | Description | Default |
|
1328
1414
|
| --- | ----------- | ------- |
|
1329
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `nil` |
|
1330
1415
|
| `cache_service` | Cache service name used when tracing cache activity | `'<app_name>-cache'` |
|
1331
1416
|
| `controller_service` | Service name used when tracing a Rails action controller | `'<app_name>'` |
|
1332
1417
|
| `database_service` | Database service name used when tracing database activity | `'<app_name>-<adapter_name>'` |
|
@@ -1376,7 +1461,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1376
1461
|
|
1377
1462
|
| Key | Description | Default |
|
1378
1463
|
| --- | ----------- | ------- |
|
1379
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1380
1464
|
| `enabled` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1381
1465
|
| `quantize` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` |
|
1382
1466
|
| `service_name` | Service name used for `rake` instrumentation | `'rake'` |
|
@@ -1436,7 +1520,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1436
1520
|
|
1437
1521
|
| Key | Description | Default |
|
1438
1522
|
| --- | ----------- | ------- |
|
1439
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1440
1523
|
| `service_name` | Service name used for `redis` instrumentation | `'redis'` |
|
1441
1524
|
| `command_args` | Show the command arguments (e.g. `key` in `GET key`) as resource name and tag | true |
|
1442
1525
|
|
@@ -1476,12 +1559,17 @@ Datadog.configure do |c|
|
|
1476
1559
|
# The default configuration for any redis client
|
1477
1560
|
c.use :redis, service_name: 'redis-default'
|
1478
1561
|
|
1479
|
-
# The configuration matching a given unix socket
|
1562
|
+
# The configuration matching a given unix socket.
|
1480
1563
|
c.use :redis, describes: { url: 'unix://path/to/file' }, service_name: 'redis-unix'
|
1481
1564
|
|
1482
|
-
#
|
1483
|
-
|
1484
|
-
#
|
1565
|
+
# For network connections, only these fields are considered during matching:
|
1566
|
+
# scheme, host, port, db
|
1567
|
+
# Other fields are ignored.
|
1568
|
+
|
1569
|
+
# Network connection string
|
1570
|
+
c.use :redis, describes: 'redis://127.0.0.1:6379/0', service_name: 'redis-connection-string'
|
1571
|
+
c.use :redis, describes: { url: 'redis://127.0.0.1:6379/1' }, service_name: 'redis-connection-url'
|
1572
|
+
# Network client hash
|
1485
1573
|
c.use :redis, describes: { host: 'my-host.com', port: 6379, db: 1, scheme: 'redis' }, service_name: 'redis-connection-hash'
|
1486
1574
|
# Only a subset of the connection hash
|
1487
1575
|
c.use :redis, describes: { host: ENV['APP_CACHE_HOST'], port: ENV['APP_CACHE_PORT'] }, service_name: 'redis-cache'
|
@@ -1489,6 +1577,8 @@ Datadog.configure do |c|
|
|
1489
1577
|
end
|
1490
1578
|
```
|
1491
1579
|
|
1580
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
1581
|
+
|
1492
1582
|
### Resque
|
1493
1583
|
|
1494
1584
|
The Resque integration uses Resque hooks that wraps the `perform` method.
|
@@ -1496,16 +1586,11 @@ The Resque integration uses Resque hooks that wraps the `perform` method.
|
|
1496
1586
|
To add tracing to a Resque job:
|
1497
1587
|
|
1498
1588
|
```ruby
|
1589
|
+
require 'resque'
|
1499
1590
|
require 'ddtrace'
|
1500
1591
|
|
1501
|
-
class MyJob
|
1502
|
-
def self.perform(*args)
|
1503
|
-
# do_something
|
1504
|
-
end
|
1505
|
-
end
|
1506
|
-
|
1507
1592
|
Datadog.configure do |c|
|
1508
|
-
c.use :resque, options
|
1593
|
+
c.use :resque, **options
|
1509
1594
|
end
|
1510
1595
|
```
|
1511
1596
|
|
@@ -1513,10 +1598,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1513
1598
|
|
1514
1599
|
| Key | Description | Default |
|
1515
1600
|
| --- | ----------- | ------- |
|
1516
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1517
1601
|
| `service_name` | Service name used for `resque` instrumentation | `'resque'` |
|
1518
|
-
| `workers` | An array including all worker classes you want to trace (e.g. `[MyJob]`) | `[]` |
|
1519
1602
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
1603
|
+
| `workers` | **[DEPRECATED]** Limits instrumented worker classes to only the ones specified in an array (e.g. `[MyJob]`). If not provided, instruments all workers. | `nil` |
|
1520
1604
|
|
1521
1605
|
### Rest Client
|
1522
1606
|
|
@@ -1535,7 +1619,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1535
1619
|
|
1536
1620
|
| Key | Description | Default |
|
1537
1621
|
| --- | ----------- | ------- |
|
1538
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1539
1622
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1540
1623
|
| `service_name` | Service name for `rest_client` instrumentation. | `'rest_client'` |
|
1541
1624
|
|
@@ -1559,7 +1642,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1559
1642
|
|
1560
1643
|
| Key | Description | Default |
|
1561
1644
|
| --- | ----------- | ------- |
|
1562
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
|
1563
1645
|
| `enabled` | Defines whether RSpec tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1564
1646
|
| `service_name` | Service name used for `rspec` instrumentation. | `'rspec'` |
|
1565
1647
|
| `operation_name` | Operation name used for `rspec` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'rspec.example'` |
|
@@ -1594,7 +1676,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1594
1676
|
|
1595
1677
|
| Key | Description | Default |
|
1596
1678
|
| --- | ----------- | ------- |
|
1597
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1598
1679
|
| `service_name` | Service name for `sequel` instrumentation | Name of database adapter (e.g. `'mysql2'`) |
|
1599
1680
|
|
1600
1681
|
Only Ruby 2.0+ is supported.
|
@@ -1630,8 +1711,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1630
1711
|
|
1631
1712
|
| Key | Description | Default |
|
1632
1713
|
| --- | ----------- | ------- |
|
1633
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1634
1714
|
| `service_name` | Service name used for `shoryuken` instrumentation | `'shoryuken'` |
|
1715
|
+
| `tag_body` | Tag spans with the SQS message body `true` or `false` | `false` |
|
1635
1716
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
1636
1717
|
|
1637
1718
|
### Sidekiq
|
@@ -1652,7 +1733,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1652
1733
|
|
1653
1734
|
| Key | Description | Default |
|
1654
1735
|
| --- | ----------- | ------- |
|
1655
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1656
1736
|
| `client_service_name` | Service name used for client-side `sidekiq` instrumentation | `'sidekiq-client'` |
|
1657
1737
|
| `service_name` | Service name used for server-side `sidekiq` instrumentation | `'sidekiq'` |
|
1658
1738
|
| `tag_args` | Enable tagging of job arguments. `true` for on, `false` for off. | `false` |
|
@@ -1716,7 +1796,6 @@ Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before y
|
|
1716
1796
|
|
1717
1797
|
| Key | Description | Default |
|
1718
1798
|
| --- | ----------- | ------- |
|
1719
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1720
1799
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) so that this service trace is connected with a trace of another service if tracing headers are received | `true` |
|
1721
1800
|
| `headers` | Hash of HTTP request or response headers to add as tags to the `sinatra.request`. Accepts `request` and `response` keys with Array values e.g. `['Last-Modified']`. Adds `http.request.headers.*` and `http.response.headers.*` tags respectively. | `{ response: ['Content-Type', 'X-Request-ID'] }` |
|
1722
1801
|
| `resource_script_names` | Prepend resource names with script name | `false` |
|
@@ -1740,7 +1819,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1740
1819
|
|
1741
1820
|
| Key | Description | Default |
|
1742
1821
|
| --- | ----------- | ------- |
|
1743
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1744
1822
|
| `enabled` | Defines whether Sneakers should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1745
1823
|
| `service_name` | Service name used for `sneakers` instrumentation | `'sneakers'` |
|
1746
1824
|
| `tag_body` | Enable tagging of job message. `true` for on, `false` for off. | `false` |
|
@@ -1765,7 +1843,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1765
1843
|
|
1766
1844
|
| Key | Description | Default |
|
1767
1845
|
| --- | ----------- | ------- |
|
1768
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1769
1846
|
| `service_name` | Service name used for `sucker_punch` instrumentation | `'sucker_punch'` |
|
1770
1847
|
|
1771
1848
|
## Advanced configuration
|
@@ -1781,13 +1858,20 @@ Datadog.configure do |c|
|
|
1781
1858
|
c.tracer.enabled = true
|
1782
1859
|
c.tracer.hostname = 'my-agent'
|
1783
1860
|
c.tracer.port = 8126
|
1784
|
-
|
1861
|
+
|
1862
|
+
# Ensure all traces are ingested by Datadog
|
1863
|
+
c.sampling.default_rate = 1.0 # Recommended
|
1864
|
+
c.sampling.rate_limit = 200
|
1865
|
+
# or provide a custom implementation (overrides c.sampling settings)
|
1785
1866
|
c.tracer.sampler = Datadog::AllSampler.new
|
1786
1867
|
|
1787
|
-
#
|
1868
|
+
# Breaks down very large traces into smaller batches
|
1869
|
+
c.tracer.partial_flush.enabled = false
|
1870
|
+
|
1871
|
+
# You can specify your own tracer
|
1788
1872
|
c.tracer.instance = Datadog::Tracer.new
|
1789
1873
|
|
1790
|
-
# To enable debug mode
|
1874
|
+
# To enable debug mode
|
1791
1875
|
c.diagnostics.debug = true
|
1792
1876
|
end
|
1793
1877
|
```
|
@@ -1799,9 +1883,12 @@ Available options are:
|
|
1799
1883
|
- `instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
|
1800
1884
|
- `partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
|
1801
1885
|
- `port`: set the port the trace agent is listening on.
|
1886
|
+
- `sampling.default_rate`: default tracer sampling rate, between `0.0` (0%) and `1.0` (100%, recommended). `1.0` or Tracing without Limits™, allows you to send all of your traffic and retention can be [configured within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/). When this configuration is not set, the Datadog agent will keep an intelligent assortment of diverse traces.
|
1887
|
+
- `sampling.rate_limit`: maximum number of traces per second to sample. Defaults to 100 per second.
|
1802
1888
|
- `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
1803
1889
|
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
1804
1890
|
- `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
|
1891
|
+
- `time_now_provider`: when testing, it might be helpful to use a different time provider. For Timecop, for example, `->{ Time.now_without_mock_time }` allows the tracer to use the real wall time. Span duration calculation will still use the system monotonic clock when available, thus not being affected by this setting. Defaults to `->{ Time.now }`.
|
1805
1892
|
|
1806
1893
|
#### Custom logging
|
1807
1894
|
|
@@ -1855,13 +1942,22 @@ Other Environment Variables:
|
|
1855
1942
|
|
1856
1943
|
- `DD_TRACE_AGENT_URL`: Sets the URL endpoint where traces are sent. Has priority over `DD_AGENT_HOST` and `DD_TRACE_AGENT_PORT` if set. e.g. `DD_TRACE_AGENT_URL=http://localhost:8126`.
|
1857
1944
|
- `DD_TRACE_<INTEGRATION>_ENABLED`: Enables or disables an **activated** integration. Defaults to `true`.. e.g. `DD_TRACE_RAILS_ENABLED=false`. This option has no effects on integrations that have not been explicitly activated (e.g. `Datadog.configure{ |c| c.use :integration }`).on code. This environment variable can only be used to disable an integration.
|
1858
|
-
- `
|
1859
|
-
- `DD_TRACE_<INTEGRATION>_ANALYTICS_SAMPLE_RATE`: Sets the App Analytics sampling rate for a specific integration. A floating number between 0.0 and 1.0 (default). e.g. `DD_TRACE_ACTION_CABLE_ANALYTICS_SAMPLE_RATE=0.5`.
|
1945
|
+
- `DD_TRACE_SAMPLE_RATE`: Sets the trace sampling rate between `0.0` (0%) and `1.0` (100%, recommended). `1.0` or Tracing without Limits™, allows you to send all of your traffic and retention can be [configured within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/). When this configuration is not set, the Datadog agent will keep an intelligent assortment of diverse traces.
|
1860
1946
|
- `DD_LOGS_INJECTION`: Automatically enables injection [Trace Correlation](#trace-correlation) information, such as `dd.trace_id`, into Rails logs. Supports the default logger (`ActiveSupport::TaggedLogging`) and `Lograge`. Details on the format of Trace Correlation information can be found in the [Trace Correlation](#trace-correlation) section. Valid values are: `true` or `false`(default). e.g. `DD_LOGS_INJECTION=true`.
|
1861
1947
|
|
1862
1948
|
### Sampling
|
1863
1949
|
|
1864
|
-
|
1950
|
+
Datadog's Tracing without Limits™ allows you to send all of your traffic and [configure retention within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/).
|
1951
|
+
|
1952
|
+
We recommend setting the environment variable `DD_TRACE_SAMPLE_RATE=1.0` in all new applications using `ddtrace`.
|
1953
|
+
|
1954
|
+
App Analytics, previously configured with the `analytics_enabled` setting, is deprecated in favor of Tracing without Limits™. Documentation for this [deprecated configuration is still available](https://docs.datadoghq.com/tracing/legacy_app_analytics/).
|
1955
|
+
|
1956
|
+
#### Application-side sampling
|
1957
|
+
|
1958
|
+
While the trace agent can sample traces to reduce bandwidth usage, application-side sampling reduces the performance overhead.
|
1959
|
+
|
1960
|
+
This will **reduce visibility and is not recommended**. See [DD_TRACE_SAMPLE_RATE](#environment-variables) for the recommended sampling approach.
|
1865
1961
|
|
1866
1962
|
`Datadog::RateSampler` samples a ratio of the traces. For example:
|
1867
1963
|
|
@@ -2019,12 +2115,14 @@ For more details on how to activate distributed tracing for integrations, see th
|
|
2019
2115
|
|
2020
2116
|
- [Excon](#excon)
|
2021
2117
|
- [Faraday](#faraday)
|
2022
|
-
- [Rest Client](#
|
2118
|
+
- [Rest Client](#rest-client)
|
2023
2119
|
- [Net/HTTP](#nethttp)
|
2024
2120
|
- [Rack](#rack)
|
2025
2121
|
- [Rails](#rails)
|
2026
2122
|
- [Sinatra](#sinatra)
|
2027
2123
|
- [http.rb](#http-rb)
|
2124
|
+
- [httpclient](#httpclient)
|
2125
|
+
- [httpx](#httpx)
|
2028
2126
|
|
2029
2127
|
**Using the HTTP propagator**
|
2030
2128
|
|
@@ -2053,9 +2151,7 @@ end
|
|
2053
2151
|
|
2054
2152
|
Traces that originate from HTTP requests can be configured to include the time spent in a frontend web server or load balancer queue before the request reaches the Ruby application.
|
2055
2153
|
|
2056
|
-
This
|
2057
|
-
|
2058
|
-
To activate this feature, you must add an `X-Request-Start` or `X-Queue-Start` header from your web server (i.e., Nginx). The following is an Nginx configuration example:
|
2154
|
+
This feature is disabled by default. To activate it, you must add an `X-Request-Start` or `X-Queue-Start` header from your web server (i.e., Nginx). The following is an Nginx configuration example:
|
2059
2155
|
|
2060
2156
|
```
|
2061
2157
|
# /etc/nginx/conf.d/ruby_service.conf
|
@@ -2069,9 +2165,7 @@ server {
|
|
2069
2165
|
}
|
2070
2166
|
```
|
2071
2167
|
|
2072
|
-
Then you must enable the request queuing feature in the integration handling the request.
|
2073
|
-
|
2074
|
-
For Rack-based applications, see the [documentation](#rack) for details for enabling this feature.
|
2168
|
+
Then you must enable the request queuing feature, by setting `request_queuing: true`, in the integration handling the request. For Rack-based applications, see the [documentation](#rack) for details.
|
2075
2169
|
|
2076
2170
|
### Processing Pipeline
|
2077
2171
|
|