ddtrace 0.40.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 +502 -180
- 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-2.0.0 → Dockerfile-3.0.0} +8 -8
- data/.circleci/images/primary/Dockerfile-jruby-9.2-latest +88 -0
- data/.circleci/images/primary/{Dockerfile-jruby-9.2 → Dockerfile-jruby-9.2.0.0} +1 -5
- data/.circleci/images/primary/Dockerfile-truffleruby-21.1.0 +73 -0
- data/.dockerignore +0 -1
- data/.github/workflows/add-milestone-to-pull-requests.yml +42 -0
- data/.github/workflows/create-next-milestone.yml +20 -0
- data/.gitignore +0 -1
- data/.gitlab-ci.yml +18 -18
- data/.rubocop.yml +273 -7
- data/.rubocop_todo.yml +438 -0
- data/.simplecov +9 -0
- data/Appraisals +483 -231
- data/CHANGELOG.md +1386 -342
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +65 -3
- data/LICENSE-3rdparty.csv +2 -0
- data/README.md +1 -0
- data/Rakefile +486 -338
- 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 +8 -36
- data/docker-compose.yml +93 -49
- data/docs/DevelopmentGuide.md +40 -2
- data/docs/GettingStarted.md +299 -78
- 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 +9 -5
- data/lib/ddtrace/analytics.rb +2 -0
- data/lib/ddtrace/auto_instrument.rb +3 -0
- data/lib/ddtrace/auto_instrument_base.rb +6 -0
- data/lib/ddtrace/buffer.rb +260 -53
- data/lib/ddtrace/configuration.rb +113 -21
- 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 +9 -10
- data/lib/ddtrace/configuration/settings.rb +119 -10
- data/lib/ddtrace/context.rb +40 -20
- data/lib/ddtrace/context_flush.rb +14 -2
- data/lib/ddtrace/context_provider.rb +16 -5
- data/lib/ddtrace/contrib/action_cable/event.rb +5 -4
- data/lib/ddtrace/contrib/action_cable/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +2 -4
- data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +1 -1
- data/lib/ddtrace/contrib/action_pack/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_pack/utils.rb +1 -1
- data/lib/ddtrace/contrib/action_view/event.rb +3 -7
- data/lib/ddtrace/contrib/action_view/events/render_partial.rb +1 -0
- data/lib/ddtrace/contrib/action_view/events/render_template.rb +1 -0
- data/lib/ddtrace/contrib/action_view/integration.rb +7 -0
- 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/events/sql.rb +4 -0
- data/lib/ddtrace/contrib/active_record/integration.rb +7 -0
- data/lib/ddtrace/contrib/active_record/utils.rb +68 -21
- data/lib/ddtrace/contrib/active_support/cache/instrumentation.rb +104 -3
- data/lib/ddtrace/contrib/active_support/cache/patcher.rb +25 -4
- data/lib/ddtrace/contrib/active_support/cache/redis.rb +1 -5
- data/lib/ddtrace/contrib/active_support/ext.rb +3 -0
- data/lib/ddtrace/contrib/active_support/integration.rb +7 -1
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +14 -3
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +2 -1
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +11 -7
- data/lib/ddtrace/contrib/auto_instrument.rb +48 -0
- data/lib/ddtrace/contrib/aws/instrumentation.rb +35 -1
- data/lib/ddtrace/contrib/aws/patcher.rb +5 -1
- data/lib/ddtrace/contrib/aws/services.rb +3 -0
- data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +1 -1
- data/lib/ddtrace/contrib/configurable.rb +64 -38
- data/lib/ddtrace/contrib/configuration/resolver.rb +70 -5
- data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +20 -20
- data/lib/ddtrace/contrib/configuration/settings.rb +7 -6
- data/lib/ddtrace/contrib/dalli/instrumentation.rb +5 -1
- data/lib/ddtrace/contrib/dalli/patcher.rb +1 -39
- data/lib/ddtrace/contrib/delayed_job/configuration/settings.rb +2 -0
- data/lib/ddtrace/contrib/delayed_job/ext.rb +2 -0
- data/lib/ddtrace/contrib/delayed_job/plugin.rb +38 -15
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +5 -0
- data/lib/ddtrace/contrib/elasticsearch/quantize.rb +3 -2
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +14 -11
- data/lib/ddtrace/contrib/ethon/ext.rb +1 -0
- data/lib/ddtrace/contrib/ethon/multi_patch.rb +5 -1
- data/lib/ddtrace/contrib/ethon/patcher.rb +2 -2
- data/lib/ddtrace/contrib/excon/middleware.rb +13 -7
- data/lib/ddtrace/contrib/extensions.rb +56 -6
- data/lib/ddtrace/contrib/faraday/middleware.rb +5 -3
- data/lib/ddtrace/contrib/faraday/patcher.rb +2 -38
- data/lib/ddtrace/contrib/grape/configuration/settings.rb +7 -0
- data/lib/ddtrace/contrib/grape/endpoint.rb +52 -24
- data/lib/ddtrace/contrib/grape/ext.rb +1 -0
- 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/client.rb +5 -1
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +5 -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 +12 -8
- data/lib/ddtrace/contrib/http/patcher.rb +1 -1
- data/lib/ddtrace/contrib/httpclient/configuration/settings.rb +32 -0
- data/lib/ddtrace/contrib/httpclient/ext.rb +17 -0
- data/lib/ddtrace/contrib/httpclient/instrumentation.rb +147 -0
- data/lib/ddtrace/contrib/httpclient/integration.rb +43 -0
- data/lib/ddtrace/contrib/httpclient/patcher.rb +38 -0
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +19 -22
- data/lib/ddtrace/contrib/httprb/patcher.rb +6 -3
- data/lib/ddtrace/contrib/integration.rb +3 -3
- data/lib/ddtrace/contrib/kafka/event.rb +3 -3
- 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 +6 -3
- data/lib/ddtrace/contrib/mysql2/instrumentation.rb +5 -1
- data/lib/ddtrace/contrib/mysql2/patcher.rb +1 -1
- data/lib/ddtrace/contrib/patchable.rb +20 -9
- data/lib/ddtrace/contrib/patcher.rb +10 -7
- data/lib/ddtrace/contrib/presto/instrumentation.rb +4 -1
- data/lib/ddtrace/contrib/presto/patcher.rb +6 -3
- data/lib/ddtrace/contrib/qless/configuration/settings.rb +35 -0
- data/lib/ddtrace/contrib/qless/ext.rb +20 -0
- data/lib/ddtrace/contrib/qless/integration.rb +38 -0
- data/lib/ddtrace/contrib/qless/patcher.rb +33 -0
- data/lib/ddtrace/contrib/qless/qless_job.rb +73 -0
- data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +33 -0
- data/lib/ddtrace/contrib/que/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/que/ext.rb +19 -19
- data/lib/ddtrace/contrib/que/tracer.rb +3 -2
- data/lib/ddtrace/contrib/racecar/event.rb +7 -2
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +3 -3
- data/lib/ddtrace/contrib/rack/integration.rb +7 -0
- data/lib/ddtrace/contrib/rack/middlewares.rb +6 -11
- data/lib/ddtrace/contrib/rack/patcher.rb +1 -3
- data/lib/ddtrace/contrib/rack/request_queue.rb +6 -1
- data/lib/ddtrace/contrib/rails/auto_instrument_railtie.rb +10 -0
- data/lib/ddtrace/contrib/rails/patcher.rb +25 -7
- data/lib/ddtrace/contrib/rails/utils.rb +4 -0
- data/lib/ddtrace/contrib/rake/instrumentation.rb +5 -3
- data/lib/ddtrace/contrib/rake/integration.rb +1 -1
- data/lib/ddtrace/contrib/rake/patcher.rb +1 -1
- data/lib/ddtrace/contrib/redis/configuration/resolver.rb +14 -5
- data/lib/ddtrace/contrib/redis/configuration/settings.rb +5 -0
- data/lib/ddtrace/contrib/redis/ext.rb +1 -0
- data/lib/ddtrace/contrib/redis/patcher.rb +20 -3
- data/lib/ddtrace/contrib/redis/quantize.rb +28 -0
- data/lib/ddtrace/contrib/redis/tags.rb +9 -1
- 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 +18 -1
- data/lib/ddtrace/contrib/resque/integration.rb +2 -2
- data/lib/ddtrace/contrib/resque/patcher.rb +4 -4
- data/lib/ddtrace/contrib/resque/resque_job.rb +25 -2
- data/lib/ddtrace/contrib/rest_client/patcher.rb +1 -1
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +6 -4
- data/lib/ddtrace/contrib/sequel/database.rb +4 -2
- data/lib/ddtrace/contrib/sequel/dataset.rb +4 -3
- data/lib/ddtrace/contrib/sequel/ext.rb +1 -0
- data/lib/ddtrace/contrib/sequel/patcher.rb +2 -2
- data/lib/ddtrace/contrib/sequel/utils.rb +15 -5
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +2 -0
- data/lib/ddtrace/contrib/shoryuken/tracer.rb +8 -2
- data/lib/ddtrace/contrib/sidekiq/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +5 -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 +5 -5
- data/lib/ddtrace/contrib/sneakers/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/sneakers/ext.rb +11 -11
- data/lib/ddtrace/contrib/sneakers/tracer.rb +16 -21
- data/lib/ddtrace/contrib/status_code_matcher.rb +69 -0
- 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/distributed.rb +8 -2
- data/lib/ddtrace/ext/git.rb +11 -0
- data/lib/ddtrace/ext/http.rb +1 -1
- data/lib/ddtrace/ext/integration.rb +8 -0
- data/lib/ddtrace/ext/profiling.rb +53 -0
- data/lib/ddtrace/ext/runtime.rb +5 -1
- data/lib/ddtrace/ext/test.rb +8 -0
- 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 +4 -1
- 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 +19 -6
- data/lib/ddtrace/propagation/http_propagator.rb +17 -2
- data/lib/ddtrace/quantization/http.rb +1 -0
- data/lib/ddtrace/runtime/cgroup.rb +2 -2
- data/lib/ddtrace/runtime/container.rb +43 -29
- data/lib/ddtrace/runtime/identity.rb +12 -5
- data/lib/ddtrace/runtime/metrics.rb +9 -7
- data/lib/ddtrace/sampler.rb +3 -3
- data/lib/ddtrace/sampling/rate_limiter.rb +65 -16
- data/lib/ddtrace/sampling/rule_sampler.rb +4 -9
- data/lib/ddtrace/span.rb +154 -29
- 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 +68 -50
- data/lib/ddtrace/transport/http.rb +41 -31
- data/lib/ddtrace/transport/http/adapters/net.rb +34 -9
- 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 +16 -3
- 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 +25 -3
- data/lib/ddtrace/utils.rb +16 -13
- data/lib/ddtrace/utils/compression.rb +27 -0
- data/lib/ddtrace/utils/forking.rb +52 -0
- 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 +21 -4
- data/lib/ddtrace/workers/trace_writer.rb +11 -14
- data/lib/ddtrace/writer.rb +30 -6
- metadata +642 -338
- 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/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**
|
@@ -124,6 +152,16 @@ The trace library uses Rubocop to enforce [code style](https://github.com/bbatso
|
|
124
152
|
$ bundle exec rake rubocop
|
125
153
|
```
|
126
154
|
|
155
|
+
### Running benchmarks
|
156
|
+
|
157
|
+
If your changes can have a measurable performance impact, we recommend running our benchmark suite:
|
158
|
+
|
159
|
+
```
|
160
|
+
$ bundle exec rake spec:benchmark
|
161
|
+
```
|
162
|
+
|
163
|
+
Results are printed to STDOUT as well as written to the `./tmp/benchmark/` directory.
|
164
|
+
|
127
165
|
## Appendix
|
128
166
|
|
129
167
|
### Writing new integrations
|
@@ -141,9 +179,9 @@ To get started quickly, it's perfectly fine to copy-paste an existing integratio
|
|
141
179
|
|
142
180
|
Once you have it working in your application, you can [add unit tests](#writing-tests), [run them locally](#running-tests), and [check for code quality](#checking-code-quality) using Docker Compose.
|
143
181
|
|
144
|
-
Then [open a pull request](
|
182
|
+
Then [open a pull request](../CONTRIBUTING.md#have-a-patch) and be sure to add the following to the description:
|
145
183
|
|
146
|
-
- [Documentation](
|
184
|
+
- [Documentation](./GettingStarted.md) for the integration, including versions supported.
|
147
185
|
- Links to the repository/website of the library being integrated
|
148
186
|
- Screenshots showing a sample trace
|
149
187
|
- Any additional code snippets, sample apps, benchmarks, or other resources that demonstrate its implementation are a huge plus!
|
data/docs/GettingStarted.md
CHANGED
@@ -34,6 +34,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
34
34
|
- [Active Support](#active-support)
|
35
35
|
- [AWS](#aws)
|
36
36
|
- [Concurrent Ruby](#concurrent-ruby)
|
37
|
+
- [Cucumber](#cucumber)
|
37
38
|
- [Dalli](#dalli)
|
38
39
|
- [DelayedJob](#delayedjob)
|
39
40
|
- [Elasticsearch](#elasticsearch)
|
@@ -44,10 +45,13 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
44
45
|
- [GraphQL](#graphql)
|
45
46
|
- [gRPC](#grpc)
|
46
47
|
- [http.rb](#http-rb)
|
48
|
+
- [httpclient](#httpclient)
|
49
|
+
- [httpx](#httpx)
|
47
50
|
- [MongoDB](#mongodb)
|
48
51
|
- [MySQL2](#mysql2)
|
49
52
|
- [Net/HTTP](#net-http)
|
50
53
|
- [Presto](#presto)
|
54
|
+
- [Qless](#qless)
|
51
55
|
- [Que](#que)
|
52
56
|
- [Racecar](#racecar)
|
53
57
|
- [Rack](#rack)
|
@@ -56,6 +60,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
56
60
|
- [Redis](#redis)
|
57
61
|
- [Rest Client](#rest-client)
|
58
62
|
- [Resque](#resque)
|
63
|
+
- [RSpec](#rspec)
|
59
64
|
- [Shoryuken](#shoryuken)
|
60
65
|
- [Sequel](#sequel)
|
61
66
|
- [Sidekiq](#sidekiq)
|
@@ -66,7 +71,9 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
66
71
|
- [Tracer settings](#tracer-settings)
|
67
72
|
- [Custom logging](#custom-logging)
|
68
73
|
- [Environment and tags](#environment-and-tags)
|
74
|
+
- [Environment variables](#environment-variables)
|
69
75
|
- [Sampling](#sampling)
|
76
|
+
- [Application-side sampling](#application-side-sampling)
|
70
77
|
- [Priority sampling](#priority-sampling)
|
71
78
|
- [Distributed tracing](#distributed-tracing)
|
72
79
|
- [HTTP request queuing](#http-request-queuing)
|
@@ -78,6 +85,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
78
85
|
- [Metrics](#metrics)
|
79
86
|
- [For application runtime](#for-application-runtime)
|
80
87
|
- [OpenTracing](#opentracing)
|
88
|
+
- [Profiling](#profiling)
|
81
89
|
|
82
90
|
## Compatibility
|
83
91
|
|
@@ -85,14 +93,15 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
85
93
|
|
86
94
|
| Type | Documentation | Version | Support type | Gem version support |
|
87
95
|
| ----- | -------------------------- | ----- | ------------------------------------ | ------------------- |
|
88
|
-
| MRI | https://www.ruby-lang.org/ |
|
96
|
+
| MRI | https://www.ruby-lang.org/ | 3.0 | Full | Latest |
|
97
|
+
| | | 2.7 | Full | Latest |
|
89
98
|
| | | 2.6 | Full | Latest |
|
90
99
|
| | | 2.5 | Full | Latest |
|
91
100
|
| | | 2.4 | Full | Latest |
|
92
101
|
| | | 2.3 | Full | Latest |
|
93
102
|
| | | 2.2 | Full | Latest |
|
94
103
|
| | | 2.1 | Full | Latest |
|
95
|
-
| | | 2.0 |
|
104
|
+
| | | 2.0 | EOL since June 7th, 2021 | < 0.50.0 |
|
96
105
|
| | | 1.9.3 | EOL since August 6th, 2020 | < 0.27.0 |
|
97
106
|
| | | 1.9.1 | EOL since August 6th, 2020 | < 0.27.0 |
|
98
107
|
| JRuby | https://www.jruby.org | 9.2 | Full | Latest |
|
@@ -123,14 +132,38 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
123
132
|
|
124
133
|
The following steps will help you quickly start tracing your Ruby application.
|
125
134
|
|
126
|
-
###
|
135
|
+
### Configure the Datadog Agent for APM
|
127
136
|
|
128
137
|
Before downloading tracing on your application, install the Datadog Agent. The Ruby APM tracer sends trace data through the Datadog Agent.
|
129
138
|
|
130
|
-
|
139
|
+
Install and configure the Datadog Agent to receive traces from your now instrumented application. By default the Datadog Agent is enabled in your `datadog.yaml` file under `apm_enabled: true` and listens for trace traffic at `localhost:8126`. For containerized environments, follow the steps below to enable trace collection within the Datadog Agent.
|
140
|
+
|
141
|
+
#### Containers
|
142
|
+
|
143
|
+
1. Set `apm_non_local_traffic: true` in your main [`datadog.yaml` configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-main-configuration-file).
|
144
|
+
|
145
|
+
2. See the specific setup instructions for [Docker](https://docs.datadoghq.com/agent/docker/apm/?tab=ruby), [Kubernetes](https://docs.datadoghq.com/agent/kubernetes/apm/?tab=helm), [Amazon ECS](https://docs.datadoghq.com/agent/amazon_ecs/apm/?tab=ruby) or [Fargate](https://docs.datadoghq.com/integrations/ecs_fargate/#trace-collection) to ensure that the Agent is configured to receive traces in a containerized environment:
|
146
|
+
|
147
|
+
3. After having instrumented your application, the tracing client sends traces to `localhost:8126` by default. If this is not the correct host and port change it by setting the env variables `DD_AGENT_HOST` and `DD_TRACE_AGENT_PORT`.
|
148
|
+
|
131
149
|
|
132
150
|
### Quickstart for Rails applications
|
133
151
|
|
152
|
+
#### Automatic instrumentation
|
153
|
+
|
154
|
+
1. Add the `ddtrace` gem to your Gemfile:
|
155
|
+
|
156
|
+
```ruby
|
157
|
+
source 'https://rubygems.org'
|
158
|
+
gem 'ddtrace', require: 'ddtrace/auto_instrument'
|
159
|
+
```
|
160
|
+
|
161
|
+
2. Install the gem with `bundle install`
|
162
|
+
|
163
|
+
3. You can configure, override, or disable any specific integration settings by also adding a [Rails Manual Configuration](#rails-manual-configuration) file.
|
164
|
+
|
165
|
+
#### Manual instrumentation
|
166
|
+
|
134
167
|
1. Add the `ddtrace` gem to your Gemfile:
|
135
168
|
|
136
169
|
```ruby
|
@@ -152,6 +185,25 @@ Before downloading tracing on your application, install the Datadog Agent. The R
|
|
152
185
|
|
153
186
|
### Quickstart for Ruby applications
|
154
187
|
|
188
|
+
#### Automatic instrumentation
|
189
|
+
|
190
|
+
1. Install the gem with `gem install ddtrace`
|
191
|
+
2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
|
192
|
+
3. Add `require 'ddtrace/auto_instrument'` to your application. _Note:_ This must be done _after_ requiring any supported libraries or frameworks.
|
193
|
+
|
194
|
+
```ruby
|
195
|
+
# Example frameworks and libraries
|
196
|
+
require 'sinatra'
|
197
|
+
require 'faraday'
|
198
|
+
require 'redis'
|
199
|
+
|
200
|
+
require 'ddtrace/auto_instrument'
|
201
|
+
```
|
202
|
+
|
203
|
+
You can configure, override, or disable any specific integration settings by also adding a [Ruby Manual Configuration Block](#ruby-manual-configuration).
|
204
|
+
|
205
|
+
#### Manual instrumentation
|
206
|
+
|
155
207
|
1. Install the gem with `gem install ddtrace`
|
156
208
|
2. Add a configuration block to your Ruby application:
|
157
209
|
|
@@ -226,7 +278,7 @@ And `options` is an optional `Hash` that accepts the following parameters:
|
|
226
278
|
| `resource` | `String` | Name of the resource or action being operated on. Traces with the same resource value will be grouped together for the purpose of metrics (but still independently viewable.) Usually domain specific, such as a URL, query, request, etc. (e.g. `'Article#submit'`, `http://example.com/articles/list`.) | `name` of Span. |
|
227
279
|
| `span_type` | `String` | The type of the span (such as `'http'`, `'db'`, etc.) | `nil` |
|
228
280
|
| `child_of` | `Datadog::Span` / `Datadog::Context` | Parent for this span. If not provided, will automatically become current active span. | `nil` |
|
229
|
-
| `start_time` | `
|
281
|
+
| `start_time` | `Time` | When the span actually starts. Useful when tracing events that have already happened. | `Time.now` |
|
230
282
|
| `tags` | `Hash` | Extra tags which should be added to the span. | `{}` |
|
231
283
|
| `on_error` | `Proc` | Handler invoked when a block is provided to trace, and it raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
232
284
|
|
@@ -338,6 +390,7 @@ For a list of available integrations, and their configuration options, please re
|
|
338
390
|
| Active Support | `active_support` | `>= 3.0` | `>= 3.0` | *[Link](#active-support)* | *[Link](https://github.com/rails/rails/tree/master/activesupport)* |
|
339
391
|
| AWS | `aws` | `>= 2.0` | `>= 2.0` | *[Link](#aws)* | *[Link](https://github.com/aws/aws-sdk-ruby)* |
|
340
392
|
| Concurrent Ruby | `concurrent_ruby` | `>= 0.9` | `>= 0.9` | *[Link](#concurrent-ruby)* | *[Link](https://github.com/ruby-concurrency/concurrent-ruby)* |
|
393
|
+
| Cucumber | `cucumber` | `>= 3.0` | `>= 1.7.16` | *[Link](#cucumber)* | *[Link](https://github.com/cucumber/cucumber-ruby)* |
|
341
394
|
| Dalli | `dalli` | `>= 2.0` | `>= 2.0` | *[Link](#dalli)* | *[Link](https://github.com/petergoldstein/dalli)* |
|
342
395
|
| DelayedJob | `delayed_job` | `>= 4.1` | `>= 4.1` | *[Link](#delayedjob)* | *[Link](https://github.com/collectiveidea/delayed_job)* |
|
343
396
|
| Elasticsearch | `elasticsearch` | `>= 1.0` | `>= 1.0` | *[Link](#elasticsearch)* | *[Link](https://github.com/elastic/elasticsearch-ruby)* |
|
@@ -348,19 +401,24 @@ For a list of available integrations, and their configuration options, please re
|
|
348
401
|
| GraphQL | `graphql` | `>= 1.7.9` | `>= 1.7.9` | *[Link](#graphql)* | *[Link](https://github.com/rmosolgo/graphql-ruby)* |
|
349
402
|
| gRPC | `grpc` | `>= 1.7` | *gem not available* | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
|
350
403
|
| http.rb | `httprb` | `>= 2.0` | `>= 2.0` | *[Link](#http-rb)* | *[Link](https://github.com/httprb/http)* |
|
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)* |
|
351
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)* |
|
352
408
|
| MongoDB | `mongo` | `>= 2.1` | `>= 2.1` | *[Link](#mongodb)* | *[Link](https://github.com/mongodb/mongo-ruby-driver)* |
|
353
409
|
| MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
|
354
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)* |
|
355
411
|
| Presto | `presto` | `>= 0.5.14` | `>= 0.5.14` | *[Link](#presto)* | *[Link](https://github.com/treasure-data/presto-client-ruby)* |
|
412
|
+
| Qless | `qless` | `>= 0.10.0` | `>= 0.10.0` | *[Link](#qless)* | *[Link](https://github.com/seomoz/qless)* |
|
356
413
|
| Que | `que` | `>= 1.0.0.beta2` | `>= 1.0.0.beta2` | *[Link](#que)* | *[Link](https://github.com/que-rb/que)* |
|
357
414
|
| Racecar | `racecar` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#racecar)* | *[Link](https://github.com/zendesk/racecar)* |
|
358
415
|
| Rack | `rack` | `>= 1.1` | `>= 1.1` | *[Link](#rack)* | *[Link](https://github.com/rack/rack)* |
|
359
416
|
| Rails | `rails` | `>= 3.0` | `>= 3.0` | *[Link](#rails)* | *[Link](https://github.com/rails/rails)* |
|
360
417
|
| Rake | `rake` | `>= 12.0` | `>= 12.0` | *[Link](#rake)* | *[Link](https://github.com/ruby/rake)* |
|
361
418
|
| Redis | `redis` | `>= 3.2` | `>= 3.2` | *[Link](#redis)* | *[Link](https://github.com/redis/redis-rb)* |
|
362
|
-
| Resque | `resque` | `>= 1.0
|
419
|
+
| Resque | `resque` | `>= 1.0` | `>= 1.0` | *[Link](#resque)* | *[Link](https://github.com/resque/resque)* |
|
363
420
|
| Rest Client | `rest-client` | `>= 1.8` | `>= 1.8` | *[Link](#rest-client)* | *[Link](https://github.com/rest-client/rest-client)* |
|
421
|
+
| RSpec | `rspec`. | `>= 3.0.0` | `>= 3.0.0` | *[Link](#rspec)*. | *[Link](https://github.com/rspec/rspec)* |
|
364
422
|
| Sequel | `sequel` | `>= 3.41` | `>= 3.41` | *[Link](#sequel)* | *[Link](https://github.com/jeremyevans/sequel)* |
|
365
423
|
| Shoryuken | `shoryuken` | `>= 3.2` | `>= 3.2` | *[Link](#shoryuken)* | *[Link](https://github.com/phstc/shoryuken)* |
|
366
424
|
| Sidekiq | `sidekiq` | `>= 3.5.4` | `>= 3.5.4` | *[Link](#sidekiq)* | *[Link](https://github.com/mperham/sidekiq)* |
|
@@ -386,7 +444,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
386
444
|
|
387
445
|
| Key | Description | Default |
|
388
446
|
| --- | ----------- | ------- |
|
389
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
390
447
|
| `service_name` | Service name used for `action_cable` instrumentation | `'action_cable'` |
|
391
448
|
|
392
449
|
### Action View
|
@@ -406,7 +463,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
406
463
|
|
407
464
|
| Key | Description | Default |
|
408
465
|
| ---| --- | --- |
|
409
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
410
466
|
| `service_name` | Service name used for rendering instrumentation. | `action_view` |
|
411
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/'` |
|
412
468
|
|
@@ -428,7 +484,6 @@ ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
|
|
428
484
|
|
429
485
|
| Key | Description | Default |
|
430
486
|
| --- | ----------- | ------- |
|
431
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
432
487
|
| `service_name` | Service name used for `active_model_serializers` instrumentation. | `'active_model_serializers'` |
|
433
488
|
|
434
489
|
### Action Pack
|
@@ -448,7 +503,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
448
503
|
|
449
504
|
| Key | Description | Default |
|
450
505
|
| ---| --- | --- |
|
451
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
452
506
|
| `service_name` | Service name used for rendering instrumentation. | `action_pack` |
|
453
507
|
|
454
508
|
### Active Record
|
@@ -476,7 +530,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
476
530
|
|
477
531
|
| Key | Description | Default |
|
478
532
|
| ---| --- | --- |
|
479
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
480
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'`) |
|
481
534
|
| `service_name` | Service name used for database portion of `active_record` instrumentation. | Name of database adapter (e.g. `'mysql2'`) |
|
482
535
|
|
@@ -495,16 +548,19 @@ Datadog.configure do |c|
|
|
495
548
|
# Only available if you are using Rails with ActiveRecord.
|
496
549
|
c.use :active_record, describes: :secondary_database, service_name: 'secondary-db'
|
497
550
|
|
551
|
+
# Block configuration pattern.
|
498
552
|
c.use :active_record, describes: :secondary_database do |second_db|
|
499
553
|
second_db.service_name = 'secondary-db'
|
500
554
|
end
|
501
555
|
|
502
556
|
# Connection string with the following connection settings:
|
503
|
-
#
|
557
|
+
# adapter, username, host, port, database
|
558
|
+
# Other fields are ignored.
|
504
559
|
c.use :active_record, describes: 'mysql2://root@127.0.0.1:3306/mysql', service_name: 'secondary-db'
|
505
560
|
|
506
|
-
# Hash with following connection settings
|
507
|
-
#
|
561
|
+
# Hash with following connection settings:
|
562
|
+
# adapter, username, host, port, database
|
563
|
+
# Other fields are ignored.
|
508
564
|
c.use :active_record, describes: {
|
509
565
|
adapter: 'mysql2',
|
510
566
|
host: '127.0.0.1',
|
@@ -513,9 +569,34 @@ Datadog.configure do |c|
|
|
513
569
|
username: 'root'
|
514
570
|
},
|
515
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'
|
516
595
|
end
|
517
596
|
```
|
518
597
|
|
598
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
599
|
+
|
519
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.
|
520
601
|
|
521
602
|
### Active Support
|
@@ -538,7 +619,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
538
619
|
|
539
620
|
| Key | Description | Default |
|
540
621
|
| ---| --- | --- |
|
541
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
542
622
|
| `cache_service` | Service name used for caching with `active_support` instrumentation. | `active_support-cache` |
|
543
623
|
|
544
624
|
### AWS
|
@@ -561,7 +641,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
561
641
|
|
562
642
|
| Key | Description | Default |
|
563
643
|
| --- | ----------- | ------- |
|
564
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
565
644
|
| `service_name` | Service name used for `aws` instrumentation | `'aws'` |
|
566
645
|
|
567
646
|
### Concurrent Ruby
|
@@ -590,6 +669,41 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
590
669
|
| --- | ----------- | ------- |
|
591
670
|
| `service_name` | Service name used for `concurrent-ruby` instrumentation | `'concurrent-ruby'` |
|
592
671
|
|
672
|
+
### Cucumber
|
673
|
+
|
674
|
+
Cucumber integration will trace all executions of scenarios and steps when using `cucumber` framework.
|
675
|
+
|
676
|
+
To activate your integration, use the `Datadog.configure` method:
|
677
|
+
|
678
|
+
```ruby
|
679
|
+
require 'cucumber'
|
680
|
+
require 'ddtrace'
|
681
|
+
|
682
|
+
# Configure default Cucumber integration
|
683
|
+
Datadog.configure do |c|
|
684
|
+
c.use :cucumber, options
|
685
|
+
end
|
686
|
+
|
687
|
+
# Example of how to attach tags from scenario to active span
|
688
|
+
Around do |scenario, block|
|
689
|
+
active_span = Datadog.configuration[:cucumber][:tracer].active_span
|
690
|
+
unless active_span.nil?
|
691
|
+
scenario.tags.filter { |tag| tag.include? ':' }.each do |tag|
|
692
|
+
active_span.set_tag(*tag.name.split(':', 2))
|
693
|
+
end
|
694
|
+
end
|
695
|
+
block.call
|
696
|
+
end
|
697
|
+
```
|
698
|
+
|
699
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
700
|
+
|
701
|
+
| Key | Description | Default |
|
702
|
+
| --- | ----------- | ------- |
|
703
|
+
| `enabled` | Defines whether Cucumber tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
704
|
+
| `service_name` | Service name used for `cucumber` instrumentation. | `'cucumber'` |
|
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'` |
|
706
|
+
|
593
707
|
### Dalli
|
594
708
|
|
595
709
|
Dalli integration will trace all calls to your `memcached` server:
|
@@ -612,12 +726,11 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
612
726
|
|
613
727
|
| Key | Description | Default |
|
614
728
|
| --- | ----------- | ------- |
|
615
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
616
729
|
| `service_name` | Service name used for `dalli` instrumentation | `'memcached'` |
|
617
730
|
|
618
731
|
### DelayedJob
|
619
732
|
|
620
|
-
The DelayedJob integration uses lifecycle hooks to trace the job executions.
|
733
|
+
The DelayedJob integration uses lifecycle hooks to trace the job executions and enqueues.
|
621
734
|
|
622
735
|
You can enable it through `Datadog.configure`:
|
623
736
|
|
@@ -633,8 +746,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
633
746
|
|
634
747
|
| Key | Description | Default |
|
635
748
|
| --- | ----------- | ------- |
|
636
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
637
749
|
| `service_name` | Service name used for `DelayedJob` instrumentation | `'delayed_job'` |
|
750
|
+
| `client_service_name` | Service name used for client-side `DelayedJob` instrumentation | `'delayed_job-client'` |
|
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? }` |
|
638
752
|
|
639
753
|
### Elasticsearch
|
640
754
|
|
@@ -657,7 +771,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
657
771
|
|
658
772
|
| Key | Description | Default |
|
659
773
|
| --- | ----------- | ------- |
|
660
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
661
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. | `{}` |
|
662
775
|
| `service_name` | Service name used for `elasticsearch` instrumentation | `'elasticsearch'` |
|
663
776
|
|
@@ -683,7 +796,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
683
796
|
|
684
797
|
| Key | Description | Default |
|
685
798
|
| --- | ----------- | ------- |
|
686
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
687
799
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
688
800
|
| `service_name` | Service name for `ethon` instrumentation. | `'ethon'` |
|
689
801
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -715,7 +827,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
715
827
|
|
716
828
|
| Key | Description | Default |
|
717
829
|
| --- | ----------- | ------- |
|
718
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
719
830
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
720
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` |
|
721
832
|
| `service_name` | Service name for Excon instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'excon'` |
|
@@ -778,7 +889,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
778
889
|
|
779
890
|
| Key | Description | Default |
|
780
891
|
| --- | ----------- | ------- |
|
781
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
782
892
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
783
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` |
|
784
894
|
| `service_name` | Service name for Faraday instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'faraday'` |
|
@@ -812,9 +922,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
812
922
|
|
813
923
|
| Key | Description | Default |
|
814
924
|
| --- | ----------- | ------- |
|
815
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
816
925
|
| `enabled` | Defines whether Grape should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
817
926
|
| `service_name` | Service name used for `grape` instrumentation | `'grape'` |
|
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` |
|
818
928
|
|
819
929
|
### GraphQL
|
820
930
|
|
@@ -836,7 +946,6 @@ The `use :graphql` method accepts the following parameters. Additional options c
|
|
836
946
|
|
837
947
|
| Key | Description | Default |
|
838
948
|
| --- | ----------- | ------- |
|
839
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
840
949
|
| `service_name` | Service name used for `graphql` instrumentation | `'ruby-graphql'` |
|
841
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. | `[]` |
|
842
951
|
|
@@ -915,7 +1024,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
915
1024
|
|
916
1025
|
| Key | Description | Default |
|
917
1026
|
| --- | ----------- | ------- |
|
918
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
919
1027
|
| `service_name` | Service name used for `grpc` instrumentation | `'grpc'` |
|
920
1028
|
|
921
1029
|
**Configuring clients to use different settings**
|
@@ -957,11 +1065,54 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
957
1065
|
|
958
1066
|
| Key | Description | Default |
|
959
1067
|
| --- | ----------- | ------- |
|
960
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
961
1068
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
962
1069
|
| `service_name` | Service name for `httprb` instrumentation. | `'httprb'` |
|
963
1070
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
964
1071
|
|
1072
|
+
### httpclient
|
1073
|
+
|
1074
|
+
The httpclient integration will trace any HTTP call using the httpclient gem.
|
1075
|
+
|
1076
|
+
```ruby
|
1077
|
+
require 'httpclient'
|
1078
|
+
require 'ddtrace'
|
1079
|
+
Datadog.configure do |c|
|
1080
|
+
c.use :httpclient, options
|
1081
|
+
# optionally, specify a different service name for hostnames matching a regex
|
1082
|
+
c.use :httpclient, describes: /user-[^.]+\.example\.com/ do |httpclient|
|
1083
|
+
httpclient.service_name = 'user.example.com'
|
1084
|
+
httpclient.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1085
|
+
end
|
1086
|
+
end
|
1087
|
+
```
|
1088
|
+
|
1089
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
1090
|
+
|
1091
|
+
| Key | Description | Default |
|
1092
|
+
| --- | ----------- | ------- |
|
1093
|
+
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1094
|
+
| `service_name` | Service name for `httpclient` instrumentation. | `'httpclient'` |
|
1095
|
+
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
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
|
+
|
965
1116
|
### Kafka
|
966
1117
|
|
967
1118
|
The Kafka integration provides tracing of the `ruby-kafka` gem:
|
@@ -982,7 +1133,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
982
1133
|
|
983
1134
|
| Key | Description | Default |
|
984
1135
|
| --- | ----------- | ------- |
|
985
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
986
1136
|
| `service_name` | Service name used for `kafka` instrumentation | `'kafka'` |
|
987
1137
|
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
988
1138
|
|
@@ -1011,7 +1161,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1011
1161
|
|
1012
1162
|
| Key | Description | Default |
|
1013
1163
|
| --- | ----------- | ------- |
|
1014
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1015
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] }` |
|
1016
1165
|
| `service_name` | Service name used for `mongo` instrumentation | `'mongodb'` |
|
1017
1166
|
|
@@ -1035,7 +1184,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1035
1184
|
|
1036
1185
|
| Key | Description | Default |
|
1037
1186
|
| --- | ----------- | ------- |
|
1038
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1039
1187
|
| `service_name` | Service name used for `mysql2` instrumentation | `'mysql2'` |
|
1040
1188
|
|
1041
1189
|
### Net/HTTP
|
@@ -1068,7 +1216,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1068
1216
|
|
1069
1217
|
| Key | Description | Default |
|
1070
1218
|
| --- | ----------- | ------- |
|
1071
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1072
1219
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1073
1220
|
| `service_name` | Service name used for `http` instrumentation | `'net/http'` |
|
1074
1221
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -1109,9 +1256,30 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1109
1256
|
|
1110
1257
|
| Key | Description | Default |
|
1111
1258
|
| --- | ----------- | ------- |
|
1112
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1113
1259
|
| `service_name` | Service name used for `presto` instrumentation | `'presto'` |
|
1114
1260
|
|
1261
|
+
### Qless
|
1262
|
+
|
1263
|
+
The Qless integration uses lifecycle hooks to trace job executions.
|
1264
|
+
|
1265
|
+
To add tracing to a Qless job:
|
1266
|
+
|
1267
|
+
```ruby
|
1268
|
+
require 'ddtrace'
|
1269
|
+
|
1270
|
+
Datadog.configure do |c|
|
1271
|
+
c.use :qless, options
|
1272
|
+
end
|
1273
|
+
```
|
1274
|
+
|
1275
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
1276
|
+
|
1277
|
+
| Key | Description | Default |
|
1278
|
+
| --- | ----------- | ------- |
|
1279
|
+
| `service_name` | Service name used for `qless` instrumentation | `'qless'` |
|
1280
|
+
| `tag_job_data` | Enable tagging with job arguments. true for on, false for off. | `false` |
|
1281
|
+
| `tag_job_tags` | Enable tagging with job tags. true for on, false for off. | `false` |
|
1282
|
+
|
1115
1283
|
### Que
|
1116
1284
|
|
1117
1285
|
The Que integration is a middleware which will trace job executions.
|
@@ -1130,11 +1298,11 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1130
1298
|
|
1131
1299
|
| Key | Description | Default |
|
1132
1300
|
| --- | ----------- | ------- |
|
1133
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1134
1301
|
| `enabled` | Defines whether Que should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1135
1302
|
| `service_name` | Service name used for `que` instrumentation | `'que'` |
|
1136
1303
|
| `tag_args` | Enable tagging of a job's args field. `true` for on, `false` for off. | `false` |
|
1137
1304
|
| `tag_data` | Enable tagging of a job's data field. `true` for on, `false` for off. | `false` |
|
1305
|
+
| `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? }` |
|
1138
1306
|
|
1139
1307
|
### Racecar
|
1140
1308
|
|
@@ -1154,7 +1322,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1154
1322
|
|
1155
1323
|
| Key | Description | Default |
|
1156
1324
|
| --- | ----------- | ------- |
|
1157
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1158
1325
|
| `service_name` | Service name used for `racecar` instrumentation | `'racecar'` |
|
1159
1326
|
|
1160
1327
|
### Rack
|
@@ -1184,11 +1351,10 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1184
1351
|
|
1185
1352
|
| Key | Description | Default |
|
1186
1353
|
| --- | ----------- | ------- |
|
1187
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1188
1354
|
| `application` | Your Rack application. Required for `middleware_names`. | `nil` |
|
1189
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` |
|
1190
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'] }` |
|
1191
|
-
| `middleware_names` | Enable this if you want to use the middleware
|
1357
|
+
| `middleware_names` | Enable this if you want to use the last executed middleware class as the resource name for the `rack` span. If enabled alongside the `rails` instrumention, `rails` takes precedence by setting the `rack` resource name to the active `rails` controller when applicable. Requires `application` option to use. | `false` |
|
1192
1358
|
| `quantize` | Hash containing options for quantization. May include `:query` or `:fragment`. | `{}` |
|
1193
1359
|
| `quantize.query` | Hash containing options for query portion of URL quantization. May include `:show` or `:exclude`. See options below. Option must be nested inside the `quantize` option. | `{}` |
|
1194
1360
|
| `quantize.query.show` | Defines which values should always be shown. Shows no values by default. May be an Array of strings, or `:all` to show all values. Option must be nested inside the `query` option. | `nil` |
|
@@ -1247,7 +1413,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1247
1413
|
|
1248
1414
|
| Key | Description | Default |
|
1249
1415
|
| --- | ----------- | ------- |
|
1250
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `nil` |
|
1251
1416
|
| `cache_service` | Cache service name used when tracing cache activity | `'<app_name>-cache'` |
|
1252
1417
|
| `controller_service` | Service name used when tracing a Rails action controller | `'<app_name>'` |
|
1253
1418
|
| `database_service` | Database service name used when tracing database activity | `'<app_name>-<adapter_name>'` |
|
@@ -1267,8 +1432,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1267
1432
|
| 2.1 | | 3.0 - 4.2 |
|
1268
1433
|
| 2.2 - 2.3 | | 3.0 - 5.2 |
|
1269
1434
|
| 2.4 | | 4.2.8 - 5.2 |
|
1270
|
-
| 2.5 | | 4.2.8 - 6.
|
1271
|
-
| 2.6 - 2.7 | 9.2 | 5.0 - 6.
|
1435
|
+
| 2.5 | | 4.2.8 - 6.1 |
|
1436
|
+
| 2.6 - 2.7 | 9.2 | 5.0 - 6.1 |
|
1437
|
+
| 3.0 | | 6.1 |
|
1272
1438
|
|
1273
1439
|
### Rake
|
1274
1440
|
|
@@ -1296,7 +1462,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1296
1462
|
|
1297
1463
|
| Key | Description | Default |
|
1298
1464
|
| --- | ----------- | ------- |
|
1299
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1300
1465
|
| `enabled` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1301
1466
|
| `quantize` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` |
|
1302
1467
|
| `service_name` | Service name used for `rake` instrumentation | `'rake'` |
|
@@ -1356,8 +1521,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1356
1521
|
|
1357
1522
|
| Key | Description | Default |
|
1358
1523
|
| --- | ----------- | ------- |
|
1359
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1360
1524
|
| `service_name` | Service name used for `redis` instrumentation | `'redis'` |
|
1525
|
+
| `command_args` | Show the command arguments (e.g. `key` in `GET key`) as resource name and tag | true |
|
1361
1526
|
|
1362
1527
|
You can also set *per-instance* configuration as it follows:
|
1363
1528
|
|
@@ -1395,12 +1560,17 @@ Datadog.configure do |c|
|
|
1395
1560
|
# The default configuration for any redis client
|
1396
1561
|
c.use :redis, service_name: 'redis-default'
|
1397
1562
|
|
1398
|
-
# The configuration matching a given unix socket
|
1563
|
+
# The configuration matching a given unix socket.
|
1399
1564
|
c.use :redis, describes: { url: 'unix://path/to/file' }, service_name: 'redis-unix'
|
1400
1565
|
|
1401
|
-
#
|
1402
|
-
|
1403
|
-
#
|
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
|
1404
1574
|
c.use :redis, describes: { host: 'my-host.com', port: 6379, db: 1, scheme: 'redis' }, service_name: 'redis-connection-hash'
|
1405
1575
|
# Only a subset of the connection hash
|
1406
1576
|
c.use :redis, describes: { host: ENV['APP_CACHE_HOST'], port: ENV['APP_CACHE_PORT'] }, service_name: 'redis-cache'
|
@@ -1408,6 +1578,8 @@ Datadog.configure do |c|
|
|
1408
1578
|
end
|
1409
1579
|
```
|
1410
1580
|
|
1581
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
1582
|
+
|
1411
1583
|
### Resque
|
1412
1584
|
|
1413
1585
|
The Resque integration uses Resque hooks that wraps the `perform` method.
|
@@ -1415,16 +1587,11 @@ The Resque integration uses Resque hooks that wraps the `perform` method.
|
|
1415
1587
|
To add tracing to a Resque job:
|
1416
1588
|
|
1417
1589
|
```ruby
|
1590
|
+
require 'resque'
|
1418
1591
|
require 'ddtrace'
|
1419
1592
|
|
1420
|
-
class MyJob
|
1421
|
-
def self.perform(*args)
|
1422
|
-
# do_something
|
1423
|
-
end
|
1424
|
-
end
|
1425
|
-
|
1426
1593
|
Datadog.configure do |c|
|
1427
|
-
c.use :resque, options
|
1594
|
+
c.use :resque, **options
|
1428
1595
|
end
|
1429
1596
|
```
|
1430
1597
|
|
@@ -1432,9 +1599,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1432
1599
|
|
1433
1600
|
| Key | Description | Default |
|
1434
1601
|
| --- | ----------- | ------- |
|
1435
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1436
1602
|
| `service_name` | Service name used for `resque` instrumentation | `'resque'` |
|
1437
|
-
| `
|
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` |
|
1438
1605
|
|
1439
1606
|
### Rest Client
|
1440
1607
|
|
@@ -1453,10 +1620,33 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1453
1620
|
|
1454
1621
|
| Key | Description | Default |
|
1455
1622
|
| --- | ----------- | ------- |
|
1456
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1457
1623
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1458
1624
|
| `service_name` | Service name for `rest_client` instrumentation. | `'rest_client'` |
|
1459
1625
|
|
1626
|
+
### RSpec
|
1627
|
+
|
1628
|
+
RSpec integration will trace all executions of example groups and examples when using `rspec` test framework.
|
1629
|
+
|
1630
|
+
To activate your integration, use the `Datadog.configure` method:
|
1631
|
+
|
1632
|
+
```ruby
|
1633
|
+
require 'rspec'
|
1634
|
+
require 'ddtrace'
|
1635
|
+
|
1636
|
+
# Configure default RSpec integration
|
1637
|
+
Datadog.configure do |c|
|
1638
|
+
c.use :rspec, options
|
1639
|
+
end
|
1640
|
+
```
|
1641
|
+
|
1642
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
1643
|
+
|
1644
|
+
| Key | Description | Default |
|
1645
|
+
| --- | ----------- | ------- |
|
1646
|
+
| `enabled` | Defines whether RSpec tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1647
|
+
| `service_name` | Service name used for `rspec` instrumentation. | `'rspec'` |
|
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'` |
|
1649
|
+
|
1460
1650
|
### Sequel
|
1461
1651
|
|
1462
1652
|
The Sequel integration traces queries made to your database.
|
@@ -1487,11 +1677,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1487
1677
|
|
1488
1678
|
| Key | Description | Default |
|
1489
1679
|
| --- | ----------- | ------- |
|
1490
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1491
1680
|
| `service_name` | Service name for `sequel` instrumentation | Name of database adapter (e.g. `'mysql2'`) |
|
1492
1681
|
|
1493
|
-
Only Ruby 2.0+ is supported.
|
1494
|
-
|
1495
1682
|
**Configuring databases to use different settings**
|
1496
1683
|
|
1497
1684
|
If you use multiple databases with Sequel, you can give each of them different settings by configuring their respective `Sequel::Database` objects:
|
@@ -1523,8 +1710,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1523
1710
|
|
1524
1711
|
| Key | Description | Default |
|
1525
1712
|
| --- | ----------- | ------- |
|
1526
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1527
1713
|
| `service_name` | Service name used for `shoryuken` instrumentation | `'shoryuken'` |
|
1714
|
+
| `tag_body` | Tag spans with the SQS message body `true` or `false` | `false` |
|
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? }` |
|
1528
1716
|
|
1529
1717
|
### Sidekiq
|
1530
1718
|
|
@@ -1544,10 +1732,10 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1544
1732
|
|
1545
1733
|
| Key | Description | Default |
|
1546
1734
|
| --- | ----------- | ------- |
|
1547
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1548
1735
|
| `client_service_name` | Service name used for client-side `sidekiq` instrumentation | `'sidekiq-client'` |
|
1549
1736
|
| `service_name` | Service name used for server-side `sidekiq` instrumentation | `'sidekiq'` |
|
1550
1737
|
| `tag_args` | Enable tagging of job arguments. `true` for on, `false` for off. | `false` |
|
1738
|
+
| `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? }` |
|
1551
1739
|
|
1552
1740
|
### Sinatra
|
1553
1741
|
|
@@ -1607,7 +1795,6 @@ Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before y
|
|
1607
1795
|
|
1608
1796
|
| Key | Description | Default |
|
1609
1797
|
| --- | ----------- | ------- |
|
1610
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1611
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` |
|
1612
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'] }` |
|
1613
1800
|
| `resource_script_names` | Prepend resource names with script name | `false` |
|
@@ -1631,10 +1818,10 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1631
1818
|
|
1632
1819
|
| Key | Description | Default |
|
1633
1820
|
| --- | ----------- | ------- |
|
1634
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1635
1821
|
| `enabled` | Defines whether Sneakers should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1636
1822
|
| `service_name` | Service name used for `sneakers` instrumentation | `'sneakers'` |
|
1637
1823
|
| `tag_body` | Enable tagging of job message. `true` for on, `false` for off. | `false` |
|
1824
|
+
| `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? }` |
|
1638
1825
|
|
1639
1826
|
### Sucker Punch
|
1640
1827
|
|
@@ -1655,7 +1842,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1655
1842
|
|
1656
1843
|
| Key | Description | Default |
|
1657
1844
|
| --- | ----------- | ------- |
|
1658
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1659
1845
|
| `service_name` | Service name used for `sucker_punch` instrumentation | `'sucker_punch'` |
|
1660
1846
|
|
1661
1847
|
## Advanced configuration
|
@@ -1671,13 +1857,20 @@ Datadog.configure do |c|
|
|
1671
1857
|
c.tracer.enabled = true
|
1672
1858
|
c.tracer.hostname = 'my-agent'
|
1673
1859
|
c.tracer.port = 8126
|
1674
|
-
|
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)
|
1675
1865
|
c.tracer.sampler = Datadog::AllSampler.new
|
1676
1866
|
|
1677
|
-
#
|
1867
|
+
# Breaks down very large traces into smaller batches
|
1868
|
+
c.tracer.partial_flush.enabled = false
|
1869
|
+
|
1870
|
+
# You can specify your own tracer
|
1678
1871
|
c.tracer.instance = Datadog::Tracer.new
|
1679
1872
|
|
1680
|
-
# To enable debug mode
|
1873
|
+
# To enable debug mode
|
1681
1874
|
c.diagnostics.debug = true
|
1682
1875
|
end
|
1683
1876
|
```
|
@@ -1689,9 +1882,12 @@ Available options are:
|
|
1689
1882
|
- `instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
|
1690
1883
|
- `partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
|
1691
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.
|
1692
1887
|
- `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
1693
1888
|
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
1694
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 }`.
|
1695
1891
|
|
1696
1892
|
#### Custom logging
|
1697
1893
|
|
@@ -1745,13 +1941,22 @@ Other Environment Variables:
|
|
1745
1941
|
|
1746
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`.
|
1747
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.
|
1748
|
-
- `
|
1749
|
-
- `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.
|
1750
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`.
|
1751
1946
|
|
1752
1947
|
### Sampling
|
1753
1948
|
|
1754
|
-
|
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.
|
1755
1960
|
|
1756
1961
|
`Datadog::RateSampler` samples a ratio of the traces. For example:
|
1757
1962
|
|
@@ -1909,12 +2114,14 @@ For more details on how to activate distributed tracing for integrations, see th
|
|
1909
2114
|
|
1910
2115
|
- [Excon](#excon)
|
1911
2116
|
- [Faraday](#faraday)
|
1912
|
-
- [Rest Client](#
|
2117
|
+
- [Rest Client](#rest-client)
|
1913
2118
|
- [Net/HTTP](#nethttp)
|
1914
2119
|
- [Rack](#rack)
|
1915
2120
|
- [Rails](#rails)
|
1916
2121
|
- [Sinatra](#sinatra)
|
1917
2122
|
- [http.rb](#http-rb)
|
2123
|
+
- [httpclient](#httpclient)
|
2124
|
+
- [httpx](#httpx)
|
1918
2125
|
|
1919
2126
|
**Using the HTTP propagator**
|
1920
2127
|
|
@@ -1943,9 +2150,7 @@ end
|
|
1943
2150
|
|
1944
2151
|
Traces that originate from HTTP requests can be configured to include the time spent in a frontend web server or load balancer queue before the request reaches the Ruby application.
|
1945
2152
|
|
1946
|
-
This
|
1947
|
-
|
1948
|
-
To activate this feature, you must add an `X-Request-Start` or `X-Queue-Start` header from your web server (i.e., Nginx). The following is an Nginx configuration example:
|
2153
|
+
This feature is disabled by default. To activate it, you must add an `X-Request-Start` or `X-Queue-Start` header from your web server (i.e., Nginx). The following is an Nginx configuration example:
|
1949
2154
|
|
1950
2155
|
```
|
1951
2156
|
# /etc/nginx/conf.d/ruby_service.conf
|
@@ -1959,9 +2164,7 @@ server {
|
|
1959
2164
|
}
|
1960
2165
|
```
|
1961
2166
|
|
1962
|
-
Then you must enable the request queuing feature in the integration handling the request.
|
1963
|
-
|
1964
|
-
For Rack-based applications, see the [documentation](#rack) for details for enabling this feature.
|
2167
|
+
Then you must enable the request queuing feature, by setting `request_queuing: true`, in the integration handling the request. For Rack-based applications, see the [documentation](#rack) for details.
|
1965
2168
|
|
1966
2169
|
### Processing Pipeline
|
1967
2170
|
|
@@ -2045,9 +2248,11 @@ Datadog.configure do |c|
|
|
2045
2248
|
end
|
2046
2249
|
```
|
2047
2250
|
|
2251
|
+
_Note:_ For `lograge` users who have also defined `lograge.custom_options` in an `initializers/lograge.rb` configuration file, due to the order that Rails loads initializers (alphabetical), automatic trace correlation may not take effect, since `initializers/datadog.rb` would be overwritten by the `initializers/lograge.rb` initializer. To support automatic trace correlation with _existing_ `lograge.custom_options`, use the [Manual (Lograge)](#manual-lograge) configuration below.
|
2252
|
+
|
2048
2253
|
##### Manual (Lograge)
|
2049
2254
|
|
2050
|
-
After [setting up Lograge in a Rails application](https://docs.datadoghq.com/logs/log_collection/ruby/), manually modify the `custom_options` block in your environment configuration file (e.g. `config/environments/production.rb`) to add the trace IDs.
|
2255
|
+
After [setting up Lograge in a Rails application](https://docs.datadoghq.com/logs/log_collection/ruby/), manually modify the `custom_options` block in your environment configuration file (e.g. `config/environments/production.rb`) to add the trace IDs.
|
2051
2256
|
|
2052
2257
|
```ruby
|
2053
2258
|
config.lograge.custom_options = lambda do |event|
|
@@ -2204,7 +2409,7 @@ The tracer and its integrations can produce some additional metrics that can pro
|
|
2204
2409
|
To configure your application for metrics collection:
|
2205
2410
|
|
2206
2411
|
1. [Configure your Datadog agent for StatsD](https://docs.datadoghq.com/developers/dogstatsd/#setup)
|
2207
|
-
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))
|
2208
2413
|
|
2209
2414
|
#### For application runtime
|
2210
2415
|
|
@@ -2274,3 +2479,19 @@ However, additional instrumentation provided by Datadog can be activated alongsi
|
|
2274
2479
|
| `OpenTracing::FORMAT_TEXT_MAP` | Yes | |
|
2275
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. |
|
2276
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.
|