ddtrace 0.45.0 → 0.50.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 +360 -56
- 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-2.0.0 → Dockerfile-truffleruby-21.1.0} +8 -8
- data/.dockerignore +0 -1
- data/.github/workflows/create-next-milestone.yml +2 -2
- data/.gitignore +0 -1
- data/.gitlab-ci.yml +18 -18
- data/.rubocop.yml +273 -7
- data/.rubocop_todo.yml +438 -0
- data/.simplecov +6 -0
- data/Appraisals +74 -101
- data/CHANGELOG.md +275 -1
- data/Gemfile +63 -3
- data/LICENSE-3rdparty.csv +2 -0
- data/Rakefile +299 -353
- data/benchmarks/data/profiler-submission-marshal.gz +0 -0
- data/benchmarks/profiler_sample_loop.rb +69 -0
- data/benchmarks/profiler_submission.rb +93 -0
- data/bin/ddtracerb +15 -0
- data/ddtrace.gemspec +10 -38
- data/docker-compose.yml +68 -54
- data/docs/DevelopmentGuide.md +28 -0
- data/docs/GettingStarted.md +123 -73
- 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.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 +78 -0
- data/gemfiles/ruby_3.0.0_contrib.gemfile.lock +1540 -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 +51 -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 +51 -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/rspec/.dockerignore +1 -0
- data/integration/apps/rspec/.envrc.sample +1 -0
- data/integration/apps/rspec/.gitignore +2 -0
- data/integration/apps/rspec/.rspec +1 -0
- data/integration/apps/rspec/Dockerfile +25 -0
- data/integration/apps/rspec/Dockerfile-ci +11 -0
- data/integration/apps/rspec/Gemfile +14 -0
- data/integration/apps/rspec/README.md +70 -0
- data/integration/apps/rspec/agent.yaml +3 -0
- data/integration/apps/rspec/app/datadog.rb +13 -0
- data/integration/apps/rspec/app/fibonacci.rb +30 -0
- data/integration/apps/rspec/bin/run +20 -0
- data/integration/apps/rspec/bin/setup +17 -0
- data/integration/apps/rspec/bin/test +21 -0
- data/integration/apps/rspec/docker-compose.ci.yml +51 -0
- data/integration/apps/rspec/docker-compose.yml +63 -0
- data/integration/apps/rspec/script/build-images +37 -0
- data/integration/apps/rspec/script/ci +53 -0
- data/integration/apps/rspec/spec/fibonacci_spec.rb +16 -0
- data/integration/apps/rspec/spec/rspec_spec.rb +58 -0
- data/integration/apps/rspec/spec/spec_helper.rb +24 -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 +51 -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.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/datadog/ci.rb +16 -0
- data/lib/datadog/ci/configuration/components.rb +30 -0
- data/lib/datadog/ci/configuration/settings.rb +36 -0
- data/lib/datadog/ci/context_flush.rb +28 -0
- data/lib/datadog/ci/contrib/cucumber/configuration/settings.rb +30 -0
- data/lib/datadog/ci/contrib/cucumber/ext.rb +19 -0
- data/lib/datadog/ci/contrib/cucumber/formatter.rb +97 -0
- data/lib/datadog/ci/contrib/cucumber/instrumentation.rb +26 -0
- data/lib/datadog/ci/contrib/cucumber/integration.rb +47 -0
- data/lib/datadog/ci/contrib/cucumber/patcher.rb +25 -0
- data/lib/datadog/ci/contrib/rspec/configuration/settings.rb +30 -0
- data/lib/datadog/ci/contrib/rspec/example.rb +73 -0
- data/lib/datadog/ci/contrib/rspec/ext.rb +18 -0
- data/lib/datadog/ci/contrib/rspec/integration.rb +48 -0
- data/lib/datadog/ci/contrib/rspec/patcher.rb +25 -0
- data/lib/datadog/ci/ext/app_types.rb +9 -0
- data/lib/datadog/ci/ext/environment.rb +303 -0
- data/lib/datadog/ci/ext/settings.rb +10 -0
- data/lib/datadog/ci/ext/test.rb +28 -0
- data/lib/datadog/ci/extensions.rb +17 -0
- data/lib/datadog/ci/test.rb +63 -0
- data/lib/ddtrace.rb +1 -7
- data/lib/ddtrace/analytics.rb +2 -0
- data/lib/ddtrace/buffer.rb +4 -4
- data/lib/ddtrace/configuration.rb +98 -25
- data/lib/ddtrace/configuration/agent_settings_resolver.rb +230 -0
- data/lib/ddtrace/configuration/base.rb +7 -10
- data/lib/ddtrace/configuration/components.rb +119 -21
- data/lib/ddtrace/configuration/option_definition.rb +1 -3
- data/lib/ddtrace/configuration/options.rb +6 -9
- data/lib/ddtrace/configuration/settings.rb +110 -7
- data/lib/ddtrace/context.rb +22 -20
- data/lib/ddtrace/context_flush.rb +14 -2
- data/lib/ddtrace/context_provider.rb +0 -1
- data/lib/ddtrace/contrib/action_cable/event.rb +5 -4
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +2 -4
- data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +1 -1
- data/lib/ddtrace/contrib/action_pack/utils.rb +1 -1
- data/lib/ddtrace/contrib/action_view/event.rb +3 -3
- data/lib/ddtrace/contrib/action_view/patcher.rb +4 -4
- data/lib/ddtrace/contrib/action_view/utils.rb +1 -1
- data/lib/ddtrace/contrib/active_model_serializers/event.rb +2 -2
- 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/event.rb +2 -2
- data/lib/ddtrace/contrib/active_record/utils.rb +1 -0
- data/lib/ddtrace/contrib/active_support/cache/patcher.rb +7 -7
- data/lib/ddtrace/contrib/active_support/cache/redis.rb +1 -5
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +4 -3
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +2 -1
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +9 -5
- data/lib/ddtrace/contrib/auto_instrument.rb +2 -2
- data/lib/ddtrace/contrib/aws/instrumentation.rb +29 -0
- data/lib/ddtrace/contrib/aws/patcher.rb +5 -0
- data/lib/ddtrace/contrib/aws/services.rb +2 -0
- data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +1 -1
- data/lib/ddtrace/contrib/configurable.rb +64 -40
- 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/dalli/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/dalli/patcher.rb +1 -39
- 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 +6 -6
- data/lib/ddtrace/contrib/ethon/multi_patch.rb +1 -1
- data/lib/ddtrace/contrib/ethon/patcher.rb +2 -2
- data/lib/ddtrace/contrib/excon/middleware.rb +2 -6
- data/lib/ddtrace/contrib/extensions.rb +30 -6
- data/lib/ddtrace/contrib/faraday/middleware.rb +1 -3
- data/lib/ddtrace/contrib/faraday/patcher.rb +2 -38
- data/lib/ddtrace/contrib/grape/endpoint.rb +8 -15
- data/lib/ddtrace/contrib/grape/instrumentation.rb +2 -2
- data/lib/ddtrace/contrib/grape/patcher.rb +1 -43
- 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 +1 -37
- data/lib/ddtrace/contrib/http/circuit_breaker.rb +1 -3
- data/lib/ddtrace/contrib/http/instrumentation.rb +6 -6
- data/lib/ddtrace/contrib/http/patcher.rb +1 -1
- data/lib/ddtrace/contrib/httpclient/instrumentation.rb +15 -20
- data/lib/ddtrace/contrib/httpclient/patcher.rb +6 -3
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +15 -21
- data/lib/ddtrace/contrib/httprb/patcher.rb +6 -3
- data/lib/ddtrace/contrib/integration.rb +3 -3
- data/lib/ddtrace/contrib/kafka/event.rb +2 -2
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +4 -2
- data/lib/ddtrace/contrib/mongodb/patcher.rb +2 -2
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +2 -3
- data/lib/ddtrace/contrib/mysql2/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/mysql2/patcher.rb +1 -1
- data/lib/ddtrace/contrib/patchable.rb +2 -2
- data/lib/ddtrace/contrib/patcher.rb +10 -7
- data/lib/ddtrace/contrib/presto/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/presto/patcher.rb +6 -3
- data/lib/ddtrace/contrib/qless/patcher.rb +3 -5
- 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 +3 -2
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +3 -3
- data/lib/ddtrace/contrib/rack/middlewares.rb +5 -10
- data/lib/ddtrace/contrib/rack/patcher.rb +1 -3
- data/lib/ddtrace/contrib/rails/patcher.rb +6 -2
- data/lib/ddtrace/contrib/rake/instrumentation.rb +5 -3
- data/lib/ddtrace/contrib/rake/patcher.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/registerable.rb +2 -2
- 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/patcher.rb +1 -1
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +2 -4
- data/lib/ddtrace/contrib/sequel/database.rb +1 -1
- data/lib/ddtrace/contrib/sequel/dataset.rb +1 -1
- data/lib/ddtrace/contrib/sequel/patcher.rb +2 -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/patcher.rb +1 -1
- 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/exception_handler.rb +4 -6
- data/lib/ddtrace/contrib/sucker_punch/instrumentation.rb +4 -0
- data/lib/ddtrace/correlation.rb +1 -0
- data/lib/ddtrace/diagnostics/environment_logger.rb +5 -4
- 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 +77 -8
- data/lib/ddtrace/ext/app_types.rb +0 -1
- data/lib/ddtrace/ext/distributed.rb +1 -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/test.rb +2 -18
- 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 +42 -9
- data/lib/ddtrace/opentelemetry/extensions.rb +1 -1
- data/lib/ddtrace/opentracer.rb +20 -39
- 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 +27 -6
- data/lib/ddtrace/pin.rb +8 -61
- data/lib/ddtrace/pipeline/span_filter.rb +1 -1
- data/lib/ddtrace/profiling.rb +107 -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 +262 -0
- data/lib/ddtrace/profiling/encoding/profile.rb +37 -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 +155 -0
- data/lib/ddtrace/profiling/ext/forking.rb +97 -0
- data/lib/ddtrace/profiling/flush.rb +43 -0
- data/lib/ddtrace/profiling/pprof/builder.rb +119 -0
- data/lib/ddtrace/profiling/pprof/converter.rb +89 -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 +106 -0
- data/lib/ddtrace/profiling/pprof/string_table.rb +10 -0
- data/lib/ddtrace/profiling/pprof/template.rb +118 -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 +116 -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 +100 -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/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/runtime/metrics.rb +3 -5
- 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 +14 -13
- data/lib/ddtrace/tasks/exec.rb +48 -0
- data/lib/ddtrace/tasks/help.rb +14 -0
- data/lib/ddtrace/tracer.rb +43 -37
- 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/statistics.rb +2 -2
- data/lib/ddtrace/transport/http/traces.rb +5 -6
- 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 +7 -1
- 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/forking.rb +1 -1
- data/lib/ddtrace/utils/object_set.rb +39 -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 -3
- 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 +14 -2
- data/lib/ddtrace/workers.rb +6 -1
- data/lib/ddtrace/workers/async.rb +13 -4
- data/lib/ddtrace/workers/loop.rb +31 -5
- data/lib/ddtrace/workers/polling.rb +12 -5
- data/lib/ddtrace/workers/queue.rb +2 -1
- 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 +620 -408
- 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/cucumber/configuration/settings.rb +0 -38
- data/lib/ddtrace/contrib/cucumber/ext.rb +0 -19
- data/lib/ddtrace/contrib/cucumber/formatter.rb +0 -104
- data/lib/ddtrace/contrib/cucumber/instrumentation.rb +0 -24
- data/lib/ddtrace/contrib/cucumber/integration.rb +0 -45
- data/lib/ddtrace/contrib/cucumber/patcher.rb +0 -23
- data/lib/ddtrace/contrib/rspec/configuration/settings.rb +0 -38
- data/lib/ddtrace/contrib/rspec/example.rb +0 -61
- data/lib/ddtrace/contrib/rspec/example_group.rb +0 -61
- data/lib/ddtrace/contrib/rspec/ext.rb +0 -19
- data/lib/ddtrace/contrib/rspec/integration.rb +0 -46
- data/lib/ddtrace/contrib/rspec/patcher.rb +0 -25
- data/lib/ddtrace/ext/ci.rb +0 -297
- data/lib/ddtrace/monkey.rb +0 -58
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
@@ -46,6 +46,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
46
46
|
- [gRPC](#grpc)
|
47
47
|
- [http.rb](#http-rb)
|
48
48
|
- [httpclient](#httpclient)
|
49
|
+
- [httpx](#httpx)
|
49
50
|
- [MongoDB](#mongodb)
|
50
51
|
- [MySQL2](#mysql2)
|
51
52
|
- [Net/HTTP](#net-http)
|
@@ -70,7 +71,9 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
70
71
|
- [Tracer settings](#tracer-settings)
|
71
72
|
- [Custom logging](#custom-logging)
|
72
73
|
- [Environment and tags](#environment-and-tags)
|
74
|
+
- [Environment variables](#environment-variables)
|
73
75
|
- [Sampling](#sampling)
|
76
|
+
- [Application-side sampling](#application-side-sampling)
|
74
77
|
- [Priority sampling](#priority-sampling)
|
75
78
|
- [Distributed tracing](#distributed-tracing)
|
76
79
|
- [HTTP request queuing](#http-request-queuing)
|
@@ -82,6 +85,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
82
85
|
- [Metrics](#metrics)
|
83
86
|
- [For application runtime](#for-application-runtime)
|
84
87
|
- [OpenTracing](#opentracing)
|
88
|
+
- [Profiling](#profiling)
|
85
89
|
|
86
90
|
## Compatibility
|
87
91
|
|
@@ -97,7 +101,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
97
101
|
| | | 2.3 | Full | Latest |
|
98
102
|
| | | 2.2 | Full | Latest |
|
99
103
|
| | | 2.1 | Full | Latest |
|
100
|
-
| | | 2.0 |
|
104
|
+
| | | 2.0 | EOL since June 7th, 2021 | < 0.50.0 |
|
101
105
|
| | | 1.9.3 | EOL since August 6th, 2020 | < 0.27.0 |
|
102
106
|
| | | 1.9.1 | EOL since August 6th, 2020 | < 0.27.0 |
|
103
107
|
| JRuby | https://www.jruby.org | 9.2 | Full | Latest |
|
@@ -145,7 +149,7 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
145
149
|
|
146
150
|
### Quickstart for Rails applications
|
147
151
|
|
148
|
-
####
|
152
|
+
#### Automatic instrumentation
|
149
153
|
|
150
154
|
1. Add the `ddtrace` gem to your Gemfile:
|
151
155
|
|
@@ -158,7 +162,7 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
158
162
|
|
159
163
|
3. You can configure, override, or disable any specific integration settings by also adding a [Rails Manual Configuration](#rails-manual-configuration) file.
|
160
164
|
|
161
|
-
####
|
165
|
+
#### Manual instrumentation
|
162
166
|
|
163
167
|
1. Add the `ddtrace` gem to your Gemfile:
|
164
168
|
|
@@ -181,10 +185,10 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
181
185
|
|
182
186
|
### Quickstart for Ruby applications
|
183
187
|
|
184
|
-
####
|
188
|
+
#### Automatic instrumentation
|
185
189
|
|
186
190
|
1. Install the gem with `gem install ddtrace`
|
187
|
-
2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
|
191
|
+
2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
|
188
192
|
3. Add `require 'ddtrace/auto_instrument'` to your application. _Note:_ This must be done _after_ requiring any supported libraries or frameworks.
|
189
193
|
|
190
194
|
```ruby
|
@@ -195,10 +199,10 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
195
199
|
|
196
200
|
require 'ddtrace/auto_instrument'
|
197
201
|
```
|
198
|
-
|
202
|
+
|
199
203
|
You can configure, override, or disable any specific integration settings by also adding a [Ruby Manual Configuration Block](#ruby-manual-configuration).
|
200
204
|
|
201
|
-
####
|
205
|
+
#### Manual instrumentation
|
202
206
|
|
203
207
|
1. Install the gem with `gem install ddtrace`
|
204
208
|
2. Add a configuration block to your Ruby application:
|
@@ -398,7 +402,9 @@ For a list of available integrations, and their configuration options, please re
|
|
398
402
|
| gRPC | `grpc` | `>= 1.7` | *gem not available* | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
|
399
403
|
| http.rb | `httprb` | `>= 2.0` | `>= 2.0` | *[Link](#http-rb)* | *[Link](https://github.com/httprb/http)* |
|
400
404
|
| httpclient | `httpclient` | `>= 2.2` | `>= 2.2` | *[Link](#httpclient)* | *[Link](https://github.com/nahi/httpclient)* |
|
405
|
+
| httpx | `httpx` | `>= 0.11` | `>= 0.11` | *[Link](#httpx)* | *[Link](https://gitlab.com/honeyryderchuck/httpx)* |
|
401
406
|
| Kafka | `ruby-kafka` | `>= 0.7.10` | `>= 0.7.10` | *[Link](#kafka)* | *[Link](https://github.com/zendesk/ruby-kafka)* |
|
407
|
+
| Makara (through Active Record) | `makara` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#active-record)* | *[Link](https://github.com/instacart/makara)* |
|
402
408
|
| MongoDB | `mongo` | `>= 2.1` | `>= 2.1` | *[Link](#mongodb)* | *[Link](https://github.com/mongodb/mongo-ruby-driver)* |
|
403
409
|
| MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
|
404
410
|
| 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)* |
|
@@ -438,7 +444,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
438
444
|
|
439
445
|
| Key | Description | Default |
|
440
446
|
| --- | ----------- | ------- |
|
441
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
442
447
|
| `service_name` | Service name used for `action_cable` instrumentation | `'action_cable'` |
|
443
448
|
|
444
449
|
### Action View
|
@@ -458,7 +463,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
458
463
|
|
459
464
|
| Key | Description | Default |
|
460
465
|
| ---| --- | --- |
|
461
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
462
466
|
| `service_name` | Service name used for rendering instrumentation. | `action_view` |
|
463
467
|
| `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/'` |
|
464
468
|
|
@@ -480,7 +484,6 @@ ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
|
|
480
484
|
|
481
485
|
| Key | Description | Default |
|
482
486
|
| --- | ----------- | ------- |
|
483
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
484
487
|
| `service_name` | Service name used for `active_model_serializers` instrumentation. | `'active_model_serializers'` |
|
485
488
|
|
486
489
|
### Action Pack
|
@@ -500,7 +503,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
500
503
|
|
501
504
|
| Key | Description | Default |
|
502
505
|
| ---| --- | --- |
|
503
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
504
506
|
| `service_name` | Service name used for rendering instrumentation. | `action_pack` |
|
505
507
|
|
506
508
|
### Active Record
|
@@ -528,7 +530,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
528
530
|
|
529
531
|
| Key | Description | Default |
|
530
532
|
| ---| --- | --- |
|
531
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
532
533
|
| `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'`) |
|
533
534
|
| `service_name` | Service name used for database portion of `active_record` instrumentation. | Name of database adapter (e.g. `'mysql2'`) |
|
534
535
|
|
@@ -547,16 +548,19 @@ Datadog.configure do |c|
|
|
547
548
|
# Only available if you are using Rails with ActiveRecord.
|
548
549
|
c.use :active_record, describes: :secondary_database, service_name: 'secondary-db'
|
549
550
|
|
551
|
+
# Block configuration pattern.
|
550
552
|
c.use :active_record, describes: :secondary_database do |second_db|
|
551
553
|
second_db.service_name = 'secondary-db'
|
552
554
|
end
|
553
555
|
|
554
556
|
# Connection string with the following connection settings:
|
555
|
-
#
|
557
|
+
# adapter, username, host, port, database
|
558
|
+
# Other fields are ignored.
|
556
559
|
c.use :active_record, describes: 'mysql2://root@127.0.0.1:3306/mysql', service_name: 'secondary-db'
|
557
560
|
|
558
|
-
# Hash with following connection settings
|
559
|
-
#
|
561
|
+
# Hash with following connection settings:
|
562
|
+
# adapter, username, host, port, database
|
563
|
+
# Other fields are ignored.
|
560
564
|
c.use :active_record, describes: {
|
561
565
|
adapter: 'mysql2',
|
562
566
|
host: '127.0.0.1',
|
@@ -565,9 +569,34 @@ Datadog.configure do |c|
|
|
565
569
|
username: 'root'
|
566
570
|
},
|
567
571
|
service_name: 'secondary-db'
|
572
|
+
|
573
|
+
# If using the `makara` gem, it's possible to match on connection `role`:
|
574
|
+
c.use :active_record, describes: { makara_role: 'primary' }, service_name: 'primary-db'
|
575
|
+
c.use :active_record, describes: { makara_role: 'replica' }, service_name: 'secondary-db'
|
576
|
+
end
|
577
|
+
```
|
578
|
+
|
579
|
+
You can also create configurations based on partial matching of database connection fields:
|
580
|
+
|
581
|
+
```ruby
|
582
|
+
Datadog.configure do |c|
|
583
|
+
# Matches any connection on host `127.0.0.1`.
|
584
|
+
c.use :active_record, describes: { host: '127.0.0.1' }, service_name: 'local-db'
|
585
|
+
|
586
|
+
# Matches any `mysql2` connection.
|
587
|
+
c.use :active_record, describes: { adapter: 'mysql2'}, service_name: 'mysql-db'
|
588
|
+
|
589
|
+
# Matches any `mysql2` connection to the `reports` database.
|
590
|
+
#
|
591
|
+
# In case of multiple matching `describe` configurations, the latest one applies.
|
592
|
+
# In this case a connection with both adapter `mysql` and database `reports`
|
593
|
+
# will be configured `service_name: 'reports-db'`, not `service_name: 'mysql-db'`.
|
594
|
+
c.use :active_record, describes: { adapter: 'mysql2', database: 'reports'}, service_name: 'reports-db'
|
568
595
|
end
|
569
596
|
```
|
570
597
|
|
598
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
599
|
+
|
571
600
|
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.
|
572
601
|
|
573
602
|
### Active Support
|
@@ -590,7 +619,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
590
619
|
|
591
620
|
| Key | Description | Default |
|
592
621
|
| ---| --- | --- |
|
593
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
594
622
|
| `cache_service` | Service name used for caching with `active_support` instrumentation. | `active_support-cache` |
|
595
623
|
|
596
624
|
### AWS
|
@@ -613,7 +641,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
613
641
|
|
614
642
|
| Key | Description | Default |
|
615
643
|
| --- | ----------- | ------- |
|
616
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
617
644
|
| `service_name` | Service name used for `aws` instrumentation | `'aws'` |
|
618
645
|
|
619
646
|
### Concurrent Ruby
|
@@ -673,7 +700,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
673
700
|
|
674
701
|
| Key | Description | Default |
|
675
702
|
| --- | ----------- | ------- |
|
676
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
|
677
703
|
| `enabled` | Defines whether Cucumber tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
678
704
|
| `service_name` | Service name used for `cucumber` instrumentation. | `'cucumber'` |
|
679
705
|
| `operation_name` | Operation name used for `cucumber` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'cucumber.test'` |
|
@@ -700,7 +726,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
700
726
|
|
701
727
|
| Key | Description | Default |
|
702
728
|
| --- | ----------- | ------- |
|
703
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
704
729
|
| `service_name` | Service name used for `dalli` instrumentation | `'memcached'` |
|
705
730
|
|
706
731
|
### DelayedJob
|
@@ -721,7 +746,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
721
746
|
|
722
747
|
| Key | Description | Default |
|
723
748
|
| --- | ----------- | ------- |
|
724
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
725
749
|
| `service_name` | Service name used for `DelayedJob` instrumentation | `'delayed_job'` |
|
726
750
|
| `client_service_name` | Service name used for client-side `DelayedJob` instrumentation | `'delayed_job-client'` |
|
727
751
|
| `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? }` |
|
@@ -747,7 +771,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
747
771
|
|
748
772
|
| Key | Description | Default |
|
749
773
|
| --- | ----------- | ------- |
|
750
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
751
774
|
| `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. | `{}` |
|
752
775
|
| `service_name` | Service name used for `elasticsearch` instrumentation | `'elasticsearch'` |
|
753
776
|
|
@@ -773,7 +796,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
773
796
|
|
774
797
|
| Key | Description | Default |
|
775
798
|
| --- | ----------- | ------- |
|
776
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
777
799
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
778
800
|
| `service_name` | Service name for `ethon` instrumentation. | `'ethon'` |
|
779
801
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -805,7 +827,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
805
827
|
|
806
828
|
| Key | Description | Default |
|
807
829
|
| --- | ----------- | ------- |
|
808
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
809
830
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
810
831
|
| `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` |
|
811
832
|
| `service_name` | Service name for Excon instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'excon'` |
|
@@ -868,7 +889,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
868
889
|
|
869
890
|
| Key | Description | Default |
|
870
891
|
| --- | ----------- | ------- |
|
871
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
872
892
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
873
893
|
| `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` |
|
874
894
|
| `service_name` | Service name for Faraday instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'faraday'` |
|
@@ -902,7 +922,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
902
922
|
|
903
923
|
| Key | Description | Default |
|
904
924
|
| --- | ----------- | ------- |
|
905
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
906
925
|
| `enabled` | Defines whether Grape should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
907
926
|
| `service_name` | Service name used for `grape` instrumentation | `'grape'` |
|
908
927
|
| `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` |
|
@@ -927,7 +946,6 @@ The `use :graphql` method accepts the following parameters. Additional options c
|
|
927
946
|
|
928
947
|
| Key | Description | Default |
|
929
948
|
| --- | ----------- | ------- |
|
930
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
931
949
|
| `service_name` | Service name used for `graphql` instrumentation | `'ruby-graphql'` |
|
932
950
|
| `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. | `[]` |
|
933
951
|
|
@@ -1006,7 +1024,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1006
1024
|
|
1007
1025
|
| Key | Description | Default |
|
1008
1026
|
| --- | ----------- | ------- |
|
1009
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1010
1027
|
| `service_name` | Service name used for `grpc` instrumentation | `'grpc'` |
|
1011
1028
|
|
1012
1029
|
**Configuring clients to use different settings**
|
@@ -1048,7 +1065,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1048
1065
|
|
1049
1066
|
| Key | Description | Default |
|
1050
1067
|
| --- | ----------- | ------- |
|
1051
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1052
1068
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1053
1069
|
| `service_name` | Service name for `httprb` instrumentation. | `'httprb'` |
|
1054
1070
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -1058,7 +1074,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1058
1074
|
The httpclient integration will trace any HTTP call using the httpclient gem.
|
1059
1075
|
|
1060
1076
|
```ruby
|
1061
|
-
require '
|
1077
|
+
require 'httpclient'
|
1062
1078
|
require 'ddtrace'
|
1063
1079
|
Datadog.configure do |c|
|
1064
1080
|
c.use :httpclient, options
|
@@ -1074,11 +1090,29 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1074
1090
|
|
1075
1091
|
| Key | Description | Default |
|
1076
1092
|
| --- | ----------- | ------- |
|
1077
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1078
1093
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1079
1094
|
| `service_name` | Service name for `httpclient` instrumentation. | `'httpclient'` |
|
1080
1095
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
1081
1096
|
|
1097
|
+
### httpx
|
1098
|
+
|
1099
|
+
`httpx` maintains its [own integration with `ddtrace`](https://honeyryderchuck.gitlab.io/httpx/wiki/Datadog-Adapter):
|
1100
|
+
|
1101
|
+
```ruby
|
1102
|
+
require "ddtrace"
|
1103
|
+
require "httpx/adapters/datadog"
|
1104
|
+
|
1105
|
+
Datadog.configure do |c|
|
1106
|
+
c.use :httpx
|
1107
|
+
|
1108
|
+
# optionally, specify a different service name for hostnames matching a regex
|
1109
|
+
c.use :httpx, describes: /user-[^.]+\.example\.com/ do |http|
|
1110
|
+
http.service_name = 'user.example.com'
|
1111
|
+
http.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1112
|
+
end
|
1113
|
+
end
|
1114
|
+
```
|
1115
|
+
|
1082
1116
|
### Kafka
|
1083
1117
|
|
1084
1118
|
The Kafka integration provides tracing of the `ruby-kafka` gem:
|
@@ -1099,7 +1133,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1099
1133
|
|
1100
1134
|
| Key | Description | Default |
|
1101
1135
|
| --- | ----------- | ------- |
|
1102
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1103
1136
|
| `service_name` | Service name used for `kafka` instrumentation | `'kafka'` |
|
1104
1137
|
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1105
1138
|
|
@@ -1128,7 +1161,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1128
1161
|
|
1129
1162
|
| Key | Description | Default |
|
1130
1163
|
| --- | ----------- | ------- |
|
1131
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1132
1164
|
| `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] }` |
|
1133
1165
|
| `service_name` | Service name used for `mongo` instrumentation | `'mongodb'` |
|
1134
1166
|
|
@@ -1152,7 +1184,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1152
1184
|
|
1153
1185
|
| Key | Description | Default |
|
1154
1186
|
| --- | ----------- | ------- |
|
1155
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1156
1187
|
| `service_name` | Service name used for `mysql2` instrumentation | `'mysql2'` |
|
1157
1188
|
|
1158
1189
|
### Net/HTTP
|
@@ -1185,7 +1216,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1185
1216
|
|
1186
1217
|
| Key | Description | Default |
|
1187
1218
|
| --- | ----------- | ------- |
|
1188
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1189
1219
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1190
1220
|
| `service_name` | Service name used for `http` instrumentation | `'net/http'` |
|
1191
1221
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -1226,7 +1256,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1226
1256
|
|
1227
1257
|
| Key | Description | Default |
|
1228
1258
|
| --- | ----------- | ------- |
|
1229
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1230
1259
|
| `service_name` | Service name used for `presto` instrumentation | `'presto'` |
|
1231
1260
|
|
1232
1261
|
### Qless
|
@@ -1247,7 +1276,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1247
1276
|
|
1248
1277
|
| Key | Description | Default |
|
1249
1278
|
| --- | ----------- | ------- |
|
1250
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1251
1279
|
| `service_name` | Service name used for `qless` instrumentation | `'qless'` |
|
1252
1280
|
| `tag_job_data` | Enable tagging with job arguments. true for on, false for off. | `false` |
|
1253
1281
|
| `tag_job_tags` | Enable tagging with job tags. true for on, false for off. | `false` |
|
@@ -1270,7 +1298,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1270
1298
|
|
1271
1299
|
| Key | Description | Default |
|
1272
1300
|
| --- | ----------- | ------- |
|
1273
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1274
1301
|
| `enabled` | Defines whether Que should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1275
1302
|
| `service_name` | Service name used for `que` instrumentation | `'que'` |
|
1276
1303
|
| `tag_args` | Enable tagging of a job's args field. `true` for on, `false` for off. | `false` |
|
@@ -1295,7 +1322,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1295
1322
|
|
1296
1323
|
| Key | Description | Default |
|
1297
1324
|
| --- | ----------- | ------- |
|
1298
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1299
1325
|
| `service_name` | Service name used for `racecar` instrumentation | `'racecar'` |
|
1300
1326
|
|
1301
1327
|
### Rack
|
@@ -1325,7 +1351,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1325
1351
|
|
1326
1352
|
| Key | Description | Default |
|
1327
1353
|
| --- | ----------- | ------- |
|
1328
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1329
1354
|
| `application` | Your Rack application. Required for `middleware_names`. | `nil` |
|
1330
1355
|
| `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` |
|
1331
1356
|
| `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'] }` |
|
@@ -1388,7 +1413,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1388
1413
|
|
1389
1414
|
| Key | Description | Default |
|
1390
1415
|
| --- | ----------- | ------- |
|
1391
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `nil` |
|
1392
1416
|
| `cache_service` | Cache service name used when tracing cache activity | `'<app_name>-cache'` |
|
1393
1417
|
| `controller_service` | Service name used when tracing a Rails action controller | `'<app_name>'` |
|
1394
1418
|
| `database_service` | Database service name used when tracing database activity | `'<app_name>-<adapter_name>'` |
|
@@ -1438,7 +1462,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1438
1462
|
|
1439
1463
|
| Key | Description | Default |
|
1440
1464
|
| --- | ----------- | ------- |
|
1441
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1442
1465
|
| `enabled` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1443
1466
|
| `quantize` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` |
|
1444
1467
|
| `service_name` | Service name used for `rake` instrumentation | `'rake'` |
|
@@ -1498,7 +1521,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1498
1521
|
|
1499
1522
|
| Key | Description | Default |
|
1500
1523
|
| --- | ----------- | ------- |
|
1501
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1502
1524
|
| `service_name` | Service name used for `redis` instrumentation | `'redis'` |
|
1503
1525
|
| `command_args` | Show the command arguments (e.g. `key` in `GET key`) as resource name and tag | true |
|
1504
1526
|
|
@@ -1538,12 +1560,17 @@ Datadog.configure do |c|
|
|
1538
1560
|
# The default configuration for any redis client
|
1539
1561
|
c.use :redis, service_name: 'redis-default'
|
1540
1562
|
|
1541
|
-
# The configuration matching a given unix socket
|
1563
|
+
# The configuration matching a given unix socket.
|
1542
1564
|
c.use :redis, describes: { url: 'unix://path/to/file' }, service_name: 'redis-unix'
|
1543
1565
|
|
1544
|
-
#
|
1545
|
-
|
1546
|
-
#
|
1566
|
+
# For network connections, only these fields are considered during matching:
|
1567
|
+
# scheme, host, port, db
|
1568
|
+
# Other fields are ignored.
|
1569
|
+
|
1570
|
+
# Network connection string
|
1571
|
+
c.use :redis, describes: 'redis://127.0.0.1:6379/0', service_name: 'redis-connection-string'
|
1572
|
+
c.use :redis, describes: { url: 'redis://127.0.0.1:6379/1' }, service_name: 'redis-connection-url'
|
1573
|
+
# Network client hash
|
1547
1574
|
c.use :redis, describes: { host: 'my-host.com', port: 6379, db: 1, scheme: 'redis' }, service_name: 'redis-connection-hash'
|
1548
1575
|
# Only a subset of the connection hash
|
1549
1576
|
c.use :redis, describes: { host: ENV['APP_CACHE_HOST'], port: ENV['APP_CACHE_PORT'] }, service_name: 'redis-cache'
|
@@ -1551,6 +1578,8 @@ Datadog.configure do |c|
|
|
1551
1578
|
end
|
1552
1579
|
```
|
1553
1580
|
|
1581
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
1582
|
+
|
1554
1583
|
### Resque
|
1555
1584
|
|
1556
1585
|
The Resque integration uses Resque hooks that wraps the `perform` method.
|
@@ -1558,16 +1587,11 @@ The Resque integration uses Resque hooks that wraps the `perform` method.
|
|
1558
1587
|
To add tracing to a Resque job:
|
1559
1588
|
|
1560
1589
|
```ruby
|
1590
|
+
require 'resque'
|
1561
1591
|
require 'ddtrace'
|
1562
1592
|
|
1563
|
-
class MyJob
|
1564
|
-
def self.perform(*args)
|
1565
|
-
# do_something
|
1566
|
-
end
|
1567
|
-
end
|
1568
|
-
|
1569
1593
|
Datadog.configure do |c|
|
1570
|
-
c.use :resque, options
|
1594
|
+
c.use :resque, **options
|
1571
1595
|
end
|
1572
1596
|
```
|
1573
1597
|
|
@@ -1575,10 +1599,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1575
1599
|
|
1576
1600
|
| Key | Description | Default |
|
1577
1601
|
| --- | ----------- | ------- |
|
1578
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1579
1602
|
| `service_name` | Service name used for `resque` instrumentation | `'resque'` |
|
1580
|
-
| `workers` | An array including all worker classes you want to trace (e.g. `[MyJob]`) | `[]` |
|
1581
1603
|
| `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? }` |
|
1604
|
+
| `workers` | **[DEPRECATED]** Limits instrumented worker classes to only the ones specified in an array (e.g. `[MyJob]`). If not provided, instruments all workers. | `nil` |
|
1582
1605
|
|
1583
1606
|
### Rest Client
|
1584
1607
|
|
@@ -1597,7 +1620,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1597
1620
|
|
1598
1621
|
| Key | Description | Default |
|
1599
1622
|
| --- | ----------- | ------- |
|
1600
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1601
1623
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1602
1624
|
| `service_name` | Service name for `rest_client` instrumentation. | `'rest_client'` |
|
1603
1625
|
|
@@ -1621,7 +1643,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1621
1643
|
|
1622
1644
|
| Key | Description | Default |
|
1623
1645
|
| --- | ----------- | ------- |
|
1624
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
|
1625
1646
|
| `enabled` | Defines whether RSpec tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1626
1647
|
| `service_name` | Service name used for `rspec` instrumentation. | `'rspec'` |
|
1627
1648
|
| `operation_name` | Operation name used for `rspec` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'rspec.example'` |
|
@@ -1656,11 +1677,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1656
1677
|
|
1657
1678
|
| Key | Description | Default |
|
1658
1679
|
| --- | ----------- | ------- |
|
1659
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1660
1680
|
| `service_name` | Service name for `sequel` instrumentation | Name of database adapter (e.g. `'mysql2'`) |
|
1661
1681
|
|
1662
|
-
Only Ruby 2.0+ is supported.
|
1663
|
-
|
1664
1682
|
**Configuring databases to use different settings**
|
1665
1683
|
|
1666
1684
|
If you use multiple databases with Sequel, you can give each of them different settings by configuring their respective `Sequel::Database` objects:
|
@@ -1692,8 +1710,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1692
1710
|
|
1693
1711
|
| Key | Description | Default |
|
1694
1712
|
| --- | ----------- | ------- |
|
1695
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1696
1713
|
| `service_name` | Service name used for `shoryuken` instrumentation | `'shoryuken'` |
|
1714
|
+
| `tag_body` | Tag spans with the SQS message body `true` or `false` | `false` |
|
1697
1715
|
| `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? }` |
|
1698
1716
|
|
1699
1717
|
### Sidekiq
|
@@ -1714,7 +1732,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1714
1732
|
|
1715
1733
|
| Key | Description | Default |
|
1716
1734
|
| --- | ----------- | ------- |
|
1717
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1718
1735
|
| `client_service_name` | Service name used for client-side `sidekiq` instrumentation | `'sidekiq-client'` |
|
1719
1736
|
| `service_name` | Service name used for server-side `sidekiq` instrumentation | `'sidekiq'` |
|
1720
1737
|
| `tag_args` | Enable tagging of job arguments. `true` for on, `false` for off. | `false` |
|
@@ -1778,7 +1795,6 @@ Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before y
|
|
1778
1795
|
|
1779
1796
|
| Key | Description | Default |
|
1780
1797
|
| --- | ----------- | ------- |
|
1781
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1782
1798
|
| `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` |
|
1783
1799
|
| `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'] }` |
|
1784
1800
|
| `resource_script_names` | Prepend resource names with script name | `false` |
|
@@ -1802,7 +1818,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1802
1818
|
|
1803
1819
|
| Key | Description | Default |
|
1804
1820
|
| --- | ----------- | ------- |
|
1805
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1806
1821
|
| `enabled` | Defines whether Sneakers should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1807
1822
|
| `service_name` | Service name used for `sneakers` instrumentation | `'sneakers'` |
|
1808
1823
|
| `tag_body` | Enable tagging of job message. `true` for on, `false` for off. | `false` |
|
@@ -1827,7 +1842,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1827
1842
|
|
1828
1843
|
| Key | Description | Default |
|
1829
1844
|
| --- | ----------- | ------- |
|
1830
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1831
1845
|
| `service_name` | Service name used for `sucker_punch` instrumentation | `'sucker_punch'` |
|
1832
1846
|
|
1833
1847
|
## Advanced configuration
|
@@ -1843,13 +1857,20 @@ Datadog.configure do |c|
|
|
1843
1857
|
c.tracer.enabled = true
|
1844
1858
|
c.tracer.hostname = 'my-agent'
|
1845
1859
|
c.tracer.port = 8126
|
1846
|
-
|
1860
|
+
|
1861
|
+
# Ensure all traces are ingested by Datadog
|
1862
|
+
c.sampling.default_rate = 1.0 # Recommended
|
1863
|
+
c.sampling.rate_limit = 200
|
1864
|
+
# or provide a custom implementation (overrides c.sampling settings)
|
1847
1865
|
c.tracer.sampler = Datadog::AllSampler.new
|
1848
1866
|
|
1849
|
-
#
|
1867
|
+
# Breaks down very large traces into smaller batches
|
1868
|
+
c.tracer.partial_flush.enabled = false
|
1869
|
+
|
1870
|
+
# You can specify your own tracer
|
1850
1871
|
c.tracer.instance = Datadog::Tracer.new
|
1851
1872
|
|
1852
|
-
# To enable debug mode
|
1873
|
+
# To enable debug mode
|
1853
1874
|
c.diagnostics.debug = true
|
1854
1875
|
end
|
1855
1876
|
```
|
@@ -1861,9 +1882,12 @@ Available options are:
|
|
1861
1882
|
- `instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
|
1862
1883
|
- `partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
|
1863
1884
|
- `port`: set the port the trace agent is listening on.
|
1885
|
+
- `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.
|
1886
|
+
- `sampling.rate_limit`: maximum number of traces per second to sample. Defaults to 100 per second.
|
1864
1887
|
- `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
1865
1888
|
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
1866
1889
|
- `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
|
1890
|
+
- `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 }`.
|
1867
1891
|
|
1868
1892
|
#### Custom logging
|
1869
1893
|
|
@@ -1917,13 +1941,22 @@ Other Environment Variables:
|
|
1917
1941
|
|
1918
1942
|
- `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`.
|
1919
1943
|
- `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.
|
1920
|
-
- `
|
1921
|
-
- `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`.
|
1944
|
+
- `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.
|
1922
1945
|
- `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`.
|
1923
1946
|
|
1924
1947
|
### Sampling
|
1925
1948
|
|
1926
|
-
|
1949
|
+
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/).
|
1950
|
+
|
1951
|
+
We recommend setting the environment variable `DD_TRACE_SAMPLE_RATE=1.0` in all new applications using `ddtrace`.
|
1952
|
+
|
1953
|
+
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/).
|
1954
|
+
|
1955
|
+
#### Application-side sampling
|
1956
|
+
|
1957
|
+
While the trace agent can sample traces to reduce bandwidth usage, application-side sampling reduces the performance overhead.
|
1958
|
+
|
1959
|
+
This will **reduce visibility and is not recommended**. See [DD_TRACE_SAMPLE_RATE](#environment-variables) for the recommended sampling approach.
|
1927
1960
|
|
1928
1961
|
`Datadog::RateSampler` samples a ratio of the traces. For example:
|
1929
1962
|
|
@@ -2081,13 +2114,14 @@ For more details on how to activate distributed tracing for integrations, see th
|
|
2081
2114
|
|
2082
2115
|
- [Excon](#excon)
|
2083
2116
|
- [Faraday](#faraday)
|
2084
|
-
- [Rest Client](#
|
2117
|
+
- [Rest Client](#rest-client)
|
2085
2118
|
- [Net/HTTP](#nethttp)
|
2086
2119
|
- [Rack](#rack)
|
2087
2120
|
- [Rails](#rails)
|
2088
2121
|
- [Sinatra](#sinatra)
|
2089
2122
|
- [http.rb](#http-rb)
|
2090
2123
|
- [httpclient](#httpclient)
|
2124
|
+
- [httpx](#httpx)
|
2091
2125
|
|
2092
2126
|
**Using the HTTP propagator**
|
2093
2127
|
|
@@ -2375,7 +2409,7 @@ The tracer and its integrations can produce some additional metrics that can pro
|
|
2375
2409
|
To configure your application for metrics collection:
|
2376
2410
|
|
2377
2411
|
1. [Configure your Datadog agent for StatsD](https://docs.datadoghq.com/developers/dogstatsd/#setup)
|
2378
|
-
2. Add `gem 'dogstatsd-ruby'` to your Gemfile
|
2412
|
+
2. Add `gem 'dogstatsd-ruby', '~> 4.0'` to your Gemfile (note that it is advised to pin v4.x [until this issue is solved](https://github.com/DataDog/dogstatsd-ruby/issues/182))
|
2379
2413
|
|
2380
2414
|
#### For application runtime
|
2381
2415
|
|
@@ -2445,3 +2479,19 @@ However, additional instrumentation provided by Datadog can be activated alongsi
|
|
2445
2479
|
| `OpenTracing::FORMAT_TEXT_MAP` | Yes | |
|
2446
2480
|
| `OpenTracing::FORMAT_RACK` | Yes | Because of the loss of resolution in the Rack format, please note that baggage items with names containing either upper case characters or `-` will be converted to lower case and `_` in a round-trip respectively. We recommend avoiding these characters or accommodating accordingly on the receiving end. |
|
2447
2481
|
| `OpenTracing::FORMAT_BINARY` | No | |
|
2482
|
+
|
2483
|
+
### Profiling
|
2484
|
+
|
2485
|
+
*Currently available as BETA feature.*
|
2486
|
+
|
2487
|
+
`ddtrace` can produce profiles that measure method-level application resource usage within production environments. These profiles can give insight into resources spent in Ruby code outside of existing trace instrumentation.
|
2488
|
+
|
2489
|
+
**Setup**
|
2490
|
+
|
2491
|
+
To get started with profiling, follow the [Profiler Getting Started Guide](https://docs.datadoghq.com/tracing/profiler/getting_started/?code-lang=ruby).
|
2492
|
+
|
2493
|
+
#### Profiling Resque jobs
|
2494
|
+
|
2495
|
+
When profiling [Resque](https://github.com/resque/resque) jobs, you should set the `RUN_AT_EXIT_HOOKS=1` option described in the [Resque](https://github.com/resque/resque/blob/v2.0.0/docs/HOOKS.md#worker-hooks) documentation.
|
2496
|
+
|
2497
|
+
Without this flag, profiles for short-lived Resque jobs will not be available as Resque kills worker processes before they have a chance to submit this information.
|