ddtrace 0.46.0 → 0.51.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 +303 -79
- data/.circleci/images/primary/Dockerfile-2.1.10 +12 -2
- data/.circleci/images/primary/Dockerfile-2.2.10 +12 -2
- data/.circleci/images/primary/Dockerfile-2.3.8 +14 -2
- data/.circleci/images/primary/Dockerfile-2.4.10 +85 -0
- data/.circleci/images/primary/{Dockerfile-2.5.6 → Dockerfile-2.5.9} +13 -3
- data/.circleci/images/primary/{Dockerfile-2.6.4 → Dockerfile-2.6.7} +13 -3
- data/.circleci/images/primary/{Dockerfile-2.7.0 → Dockerfile-2.7.3} +13 -3
- data/.circleci/images/primary/{Dockerfile-3.0.0 → Dockerfile-3.0.1} +3 -3
- 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} +2 -6
- data/.circleci/images/primary/{Dockerfile-2.4.6 → Dockerfile-truffleruby-21.1.0} +4 -4
- data/.dd-ci/ci-app-spec.json +31 -0
- data/.dockerignore +0 -1
- data/.gitattributes +1 -0
- data/.github/workflows/create-next-milestone.yml +2 -2
- data/.github/workflows/test-head.yaml +34 -0
- data/.gitignore +0 -1
- data/.gitlab-ci.yml +18 -18
- data/.rubocop.yml +32 -9
- data/.rubocop_todo.yml +53 -12
- data/.simplecov +6 -0
- data/Appraisals +254 -176
- data/CHANGELOG.md +271 -1
- data/Gemfile +35 -7
- data/LICENSE-3rdparty.csv +2 -0
- data/Rakefile +339 -332
- 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 +6 -4
- data/docker-compose.yml +68 -54
- data/docs/GettingStarted.md +149 -67
- data/docs/ProfilingDevelopment.md +88 -0
- data/gemfiles/jruby_9.2.0.0_contrib.gemfile +82 -0
- data/gemfiles/jruby_9.2.0.0_contrib.gemfile.lock +1571 -0
- data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile.lock +159 -0
- data/gemfiles/jruby_9.2.0.0_core_old.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_core_old.gemfile.lock +155 -0
- data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile.lock +176 -0
- data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile.lock +208 -0
- data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile.lock +208 -0
- data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile.lock +275 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile.lock +275 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile.lock +281 -0
- data/gemfiles/jruby_9.2.0.0_rails5_semantic_logger.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails5_semantic_logger.gemfile.lock +272 -0
- data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile.lock +299 -0
- data/gemfiles/jruby_9.2.0.0_rails61_semantic_logger.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails61_semantic_logger.gemfile.lock +291 -0
- data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile.lock +291 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile.lock +291 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile.lock +297 -0
- data/gemfiles/jruby_9.2.0.0_rails6_semantic_logger.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails6_semantic_logger.gemfile.lock +288 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile +37 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile.lock +182 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile +37 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile.lock +182 -0
- data/gemfiles/jruby_9.2.18.0_contrib.gemfile +82 -0
- data/gemfiles/jruby_9.2.18.0_contrib.gemfile.lock +1571 -0
- data/gemfiles/jruby_9.2.18.0_contrib_old.gemfile +36 -0
- data/gemfiles/jruby_9.2.18.0_contrib_old.gemfile.lock +159 -0
- data/gemfiles/jruby_9.2.18.0_core_old.gemfile +35 -0
- data/gemfiles/jruby_9.2.18.0_core_old.gemfile.lock +155 -0
- data/gemfiles/jruby_9.2.18.0_cucumber3.gemfile +36 -0
- data/gemfiles/jruby_9.2.18.0_cucumber3.gemfile.lock +176 -0
- data/gemfiles/jruby_9.2.18.0_cucumber4.gemfile +36 -0
- data/gemfiles/jruby_9.2.18.0_cucumber4.gemfile.lock +208 -0
- data/gemfiles/jruby_9.2.18.0_cucumber5.gemfile +36 -0
- data/gemfiles/jruby_9.2.18.0_cucumber5.gemfile.lock +208 -0
- data/gemfiles/jruby_9.2.18.0_rails5_mysql2.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails5_mysql2.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres_redis.gemfile +42 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres_redis.gemfile.lock +275 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres_redis_activesupport.gemfile +42 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres_redis_activesupport.gemfile.lock +275 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/jruby_9.2.18.0_rails5_postgres_sidekiq.gemfile.lock +281 -0
- data/gemfiles/jruby_9.2.18.0_rails5_semantic_logger.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails5_semantic_logger.gemfile.lock +272 -0
- data/gemfiles/jruby_9.2.18.0_rails61_mysql2.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails61_mysql2.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.18.0_rails61_postgres.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails61_postgres.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.18.0_rails61_postgres_redis.gemfile +42 -0
- data/gemfiles/jruby_9.2.18.0_rails61_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/jruby_9.2.18.0_rails61_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.18.0_rails61_postgres_sidekiq.gemfile.lock +299 -0
- data/gemfiles/jruby_9.2.18.0_rails61_semantic_logger.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails61_semantic_logger.gemfile.lock +291 -0
- data/gemfiles/jruby_9.2.18.0_rails6_mysql2.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails6_mysql2.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres_redis.gemfile +42 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres_redis.gemfile.lock +291 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres_redis_activesupport.gemfile +42 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres_redis_activesupport.gemfile.lock +291 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/jruby_9.2.18.0_rails6_postgres_sidekiq.gemfile.lock +297 -0
- data/gemfiles/jruby_9.2.18.0_rails6_semantic_logger.gemfile +41 -0
- data/gemfiles/jruby_9.2.18.0_rails6_semantic_logger.gemfile.lock +288 -0
- data/gemfiles/jruby_9.2.18.0_resque2_redis3.gemfile +37 -0
- data/gemfiles/jruby_9.2.18.0_resque2_redis3.gemfile.lock +182 -0
- data/gemfiles/jruby_9.2.18.0_resque2_redis4.gemfile +37 -0
- data/gemfiles/jruby_9.2.18.0_resque2_redis4.gemfile.lock +182 -0
- data/gemfiles/ruby_2.1.10_contrib_old.gemfile +68 -0
- data/gemfiles/ruby_2.1.10_contrib_old.gemfile.lock +310 -0
- data/gemfiles/ruby_2.1.10_core_old.gemfile +34 -0
- data/gemfiles/ruby_2.1.10_core_old.gemfile.lock +120 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile.lock +193 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile.lock +202 -0
- data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile.lock +212 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile.lock +201 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile.lock +220 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile.lock +210 -0
- data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile.lock +220 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile.lock +220 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile.lock +239 -0
- data/gemfiles/ruby_2.1.10_rails4_semantic_logger.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails4_semantic_logger.gemfile.lock +218 -0
- data/gemfiles/ruby_2.2.10_contrib.gemfile +76 -0
- data/gemfiles/ruby_2.2.10_contrib.gemfile.lock +1499 -0
- data/gemfiles/ruby_2.2.10_core_old.gemfile +34 -0
- data/gemfiles/ruby_2.2.10_core_old.gemfile.lock +120 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile.lock +193 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile.lock +202 -0
- data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile.lock +209 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile.lock +201 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile.lock +220 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile.lock +210 -0
- data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile.lock +220 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile.lock +220 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile.lock +239 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile.lock +231 -0
- data/gemfiles/ruby_2.2.10_rails4_semantic_logger.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails4_semantic_logger.gemfile.lock +218 -0
- data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile.lock +236 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile.lock +236 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile.lock +238 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile.lock +238 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile.lock +247 -0
- data/gemfiles/ruby_2.2.10_rails5_semantic_logger.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails5_semantic_logger.gemfile.lock +234 -0
- data/gemfiles/ruby_2.3.8_contrib.gemfile +75 -0
- data/gemfiles/ruby_2.3.8_contrib.gemfile.lock +1508 -0
- data/gemfiles/ruby_2.3.8_contrib_old.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_contrib_old.gemfile.lock +123 -0
- data/gemfiles/ruby_2.3.8_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.3.8_core_old.gemfile.lock +119 -0
- data/gemfiles/ruby_2.3.8_cucumber3.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_cucumber3.gemfile.lock +140 -0
- data/gemfiles/ruby_2.3.8_cucumber4.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_cucumber4.gemfile.lock +170 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile.lock +192 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile.lock +201 -0
- data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile.lock +208 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile.lock +200 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile.lock +219 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile.lock +209 -0
- data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile.lock +219 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile.lock +219 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile.lock +238 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile.lock +230 -0
- data/gemfiles/ruby_2.3.8_rails4_semantic_logger.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails4_semantic_logger.gemfile.lock +218 -0
- data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile +37 -0
- data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile.lock +230 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile +37 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile.lock +230 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile.lock +232 -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 +232 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile.lock +241 -0
- data/gemfiles/ruby_2.3.8_rails5_semantic_logger.gemfile +37 -0
- data/gemfiles/ruby_2.3.8_rails5_semantic_logger.gemfile.lock +229 -0
- data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile +35 -0
- data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile.lock +146 -0
- data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile +35 -0
- data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile.lock +146 -0
- data/gemfiles/ruby_2.4.10_contrib.gemfile +81 -0
- data/gemfiles/ruby_2.4.10_contrib.gemfile.lock +1596 -0
- data/gemfiles/ruby_2.4.10_contrib_old.gemfile +39 -0
- data/gemfiles/ruby_2.4.10_contrib_old.gemfile.lock +157 -0
- data/gemfiles/ruby_2.4.10_core_old.gemfile +38 -0
- data/gemfiles/ruby_2.4.10_core_old.gemfile.lock +153 -0
- data/gemfiles/ruby_2.4.10_cucumber3.gemfile +39 -0
- data/gemfiles/ruby_2.4.10_cucumber3.gemfile.lock +174 -0
- data/gemfiles/ruby_2.4.10_cucumber4.gemfile +39 -0
- data/gemfiles/ruby_2.4.10_cucumber4.gemfile.lock +204 -0
- data/gemfiles/ruby_2.4.10_rails5_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.4.10_rails5_mysql2.gemfile.lock +264 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres.gemfile.lock +264 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres_redis.gemfile.lock +266 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres_redis_activesupport.gemfile +43 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres_redis_activesupport.gemfile.lock +266 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.4.10_rails5_postgres_sidekiq.gemfile.lock +275 -0
- data/gemfiles/ruby_2.4.10_rails5_semantic_logger.gemfile +42 -0
- data/gemfiles/ruby_2.4.10_rails5_semantic_logger.gemfile.lock +263 -0
- data/gemfiles/ruby_2.4.10_resque2_redis3.gemfile +40 -0
- data/gemfiles/ruby_2.4.10_resque2_redis3.gemfile.lock +180 -0
- data/gemfiles/ruby_2.4.10_resque2_redis4.gemfile +40 -0
- data/gemfiles/ruby_2.4.10_resque2_redis4.gemfile.lock +180 -0
- data/gemfiles/ruby_2.5.9_contrib.gemfile +86 -0
- data/gemfiles/ruby_2.5.9_contrib.gemfile.lock +1608 -0
- data/gemfiles/ruby_2.5.9_contrib_old.gemfile +40 -0
- data/gemfiles/ruby_2.5.9_contrib_old.gemfile.lock +167 -0
- data/gemfiles/ruby_2.5.9_core_old.gemfile +39 -0
- data/gemfiles/ruby_2.5.9_core_old.gemfile.lock +163 -0
- data/gemfiles/ruby_2.5.9_cucumber3.gemfile +40 -0
- data/gemfiles/ruby_2.5.9_cucumber3.gemfile.lock +184 -0
- data/gemfiles/ruby_2.5.9_cucumber4.gemfile +40 -0
- data/gemfiles/ruby_2.5.9_cucumber4.gemfile.lock +216 -0
- data/gemfiles/ruby_2.5.9_cucumber5.gemfile +40 -0
- data/gemfiles/ruby_2.5.9_cucumber5.gemfile.lock +216 -0
- data/gemfiles/ruby_2.5.9_rails5_mysql2.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres_redis.gemfile +46 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres_redis.gemfile.lock +278 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres_redis_activesupport.gemfile +46 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres_sidekiq.gemfile +47 -0
- data/gemfiles/ruby_2.5.9_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.5.9_rails5_semantic_logger.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails5_semantic_logger.gemfile.lock +275 -0
- data/gemfiles/ruby_2.5.9_rails61_mysql2.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.5.9_rails61_postgres.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.5.9_rails61_postgres_redis.gemfile +46 -0
- data/gemfiles/ruby_2.5.9_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.5.9_rails61_postgres_sidekiq.gemfile +46 -0
- data/gemfiles/ruby_2.5.9_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.5.9_rails61_semantic_logger.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails61_semantic_logger.gemfile.lock +294 -0
- data/gemfiles/ruby_2.5.9_rails6_mysql2.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres_redis.gemfile +46 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres_redis_activesupport.gemfile +46 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres_sidekiq.gemfile +47 -0
- data/gemfiles/ruby_2.5.9_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.5.9_rails6_semantic_logger.gemfile +45 -0
- data/gemfiles/ruby_2.5.9_rails6_semantic_logger.gemfile.lock +291 -0
- data/gemfiles/ruby_2.5.9_resque2_redis3.gemfile +41 -0
- data/gemfiles/ruby_2.5.9_resque2_redis3.gemfile.lock +190 -0
- data/gemfiles/ruby_2.5.9_resque2_redis4.gemfile +41 -0
- data/gemfiles/ruby_2.5.9_resque2_redis4.gemfile.lock +190 -0
- data/gemfiles/ruby_2.6.7_contrib.gemfile +82 -0
- data/gemfiles/ruby_2.6.7_contrib.gemfile.lock +1606 -0
- data/gemfiles/ruby_2.6.7_contrib_old.gemfile +40 -0
- data/gemfiles/ruby_2.6.7_contrib_old.gemfile.lock +169 -0
- data/gemfiles/ruby_2.6.7_core_old.gemfile +39 -0
- data/gemfiles/ruby_2.6.7_core_old.gemfile.lock +165 -0
- data/gemfiles/ruby_2.6.7_cucumber3.gemfile +40 -0
- data/gemfiles/ruby_2.6.7_cucumber3.gemfile.lock +186 -0
- data/gemfiles/ruby_2.6.7_cucumber4.gemfile +40 -0
- data/gemfiles/ruby_2.6.7_cucumber4.gemfile.lock +218 -0
- data/gemfiles/ruby_2.6.7_cucumber5.gemfile +40 -0
- data/gemfiles/ruby_2.6.7_cucumber5.gemfile.lock +218 -0
- data/gemfiles/ruby_2.6.7_rails5_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres_redis.gemfile.lock +278 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres_redis_activesupport.gemfile +44 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres_sidekiq.gemfile +45 -0
- data/gemfiles/ruby_2.6.7_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.6.7_rails5_semantic_logger.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails5_semantic_logger.gemfile.lock +275 -0
- data/gemfiles/ruby_2.6.7_rails61_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.6.7_rails61_postgres.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.6.7_rails61_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.6.7_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.6.7_rails61_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.6.7_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.6.7_rails61_semantic_logger.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails61_semantic_logger.gemfile.lock +294 -0
- data/gemfiles/ruby_2.6.7_rails6_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres_redis_activesupport.gemfile +44 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres_sidekiq.gemfile +45 -0
- data/gemfiles/ruby_2.6.7_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.6.7_rails6_semantic_logger.gemfile +43 -0
- data/gemfiles/ruby_2.6.7_rails6_semantic_logger.gemfile.lock +291 -0
- data/gemfiles/ruby_2.6.7_resque2_redis3.gemfile +41 -0
- data/gemfiles/ruby_2.6.7_resque2_redis3.gemfile.lock +192 -0
- data/gemfiles/ruby_2.6.7_resque2_redis4.gemfile +41 -0
- data/gemfiles/ruby_2.6.7_resque2_redis4.gemfile.lock +192 -0
- data/gemfiles/ruby_2.7.3_contrib.gemfile +81 -0
- data/gemfiles/ruby_2.7.3_contrib.gemfile.lock +1580 -0
- data/gemfiles/ruby_2.7.3_contrib_old.gemfile +40 -0
- data/gemfiles/ruby_2.7.3_contrib_old.gemfile.lock +169 -0
- data/gemfiles/ruby_2.7.3_core_old.gemfile +39 -0
- data/gemfiles/ruby_2.7.3_core_old.gemfile.lock +165 -0
- data/gemfiles/ruby_2.7.3_cucumber3.gemfile +40 -0
- data/gemfiles/ruby_2.7.3_cucumber3.gemfile.lock +186 -0
- data/gemfiles/ruby_2.7.3_cucumber4.gemfile +40 -0
- data/gemfiles/ruby_2.7.3_cucumber4.gemfile.lock +218 -0
- data/gemfiles/ruby_2.7.3_cucumber5.gemfile +40 -0
- data/gemfiles/ruby_2.7.3_cucumber5.gemfile.lock +218 -0
- data/gemfiles/ruby_2.7.3_rails5_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails5_mysql2.gemfile.lock +278 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres.gemfile.lock +278 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres_redis_activesupport.gemfile +45 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres_redis_activesupport.gemfile.lock +297 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres_sidekiq.gemfile +45 -0
- data/gemfiles/ruby_2.7.3_rails5_postgres_sidekiq.gemfile.lock +286 -0
- data/gemfiles/ruby_2.7.3_rails5_semantic_logger.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails5_semantic_logger.gemfile.lock +277 -0
- data/gemfiles/ruby_2.7.3_rails61_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails61_mysql2.gemfile.lock +297 -0
- data/gemfiles/ruby_2.7.3_rails61_postgres.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails61_postgres.gemfile.lock +297 -0
- data/gemfiles/ruby_2.7.3_rails61_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.7.3_rails61_postgres_redis.gemfile.lock +299 -0
- data/gemfiles/ruby_2.7.3_rails61_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.7.3_rails61_postgres_sidekiq.gemfile.lock +304 -0
- data/gemfiles/ruby_2.7.3_rails61_semantic_logger.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails61_semantic_logger.gemfile.lock +296 -0
- data/gemfiles/ruby_2.7.3_rails6_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails6_mysql2.gemfile.lock +294 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres.gemfile.lock +294 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres_redis.gemfile.lock +313 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres_redis_activesupport.gemfile +45 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres_redis_activesupport.gemfile.lock +313 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres_sidekiq.gemfile +45 -0
- data/gemfiles/ruby_2.7.3_rails6_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.7.3_rails6_semantic_logger.gemfile +43 -0
- data/gemfiles/ruby_2.7.3_rails6_semantic_logger.gemfile.lock +293 -0
- data/gemfiles/ruby_2.7.3_resque2_redis3.gemfile +41 -0
- data/gemfiles/ruby_2.7.3_resque2_redis3.gemfile.lock +192 -0
- data/gemfiles/ruby_2.7.3_resque2_redis4.gemfile +41 -0
- data/gemfiles/ruby_2.7.3_resque2_redis4.gemfile.lock +192 -0
- data/gemfiles/ruby_3.0.1_contrib.gemfile +80 -0
- data/gemfiles/ruby_3.0.1_contrib.gemfile.lock +1583 -0
- data/gemfiles/ruby_3.0.1_core_old.gemfile +40 -0
- data/gemfiles/ruby_3.0.1_core_old.gemfile.lock +167 -0
- data/gemfiles/ruby_3.0.1_cucumber3.gemfile +41 -0
- data/gemfiles/ruby_3.0.1_cucumber3.gemfile.lock +188 -0
- data/gemfiles/ruby_3.0.1_cucumber4.gemfile +41 -0
- data/gemfiles/ruby_3.0.1_cucumber4.gemfile.lock +220 -0
- data/gemfiles/ruby_3.0.1_cucumber5.gemfile +41 -0
- data/gemfiles/ruby_3.0.1_cucumber5.gemfile.lock +220 -0
- data/gemfiles/ruby_3.0.1_rails61_mysql2.gemfile +44 -0
- data/gemfiles/ruby_3.0.1_rails61_mysql2.gemfile.lock +297 -0
- data/gemfiles/ruby_3.0.1_rails61_postgres.gemfile +44 -0
- data/gemfiles/ruby_3.0.1_rails61_postgres.gemfile.lock +297 -0
- data/gemfiles/ruby_3.0.1_rails61_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_3.0.1_rails61_postgres_redis.gemfile.lock +299 -0
- data/gemfiles/ruby_3.0.1_rails61_postgres_sidekiq.gemfile +46 -0
- data/gemfiles/ruby_3.0.1_rails61_postgres_sidekiq.gemfile.lock +311 -0
- data/gemfiles/ruby_3.0.1_rails61_semantic_logger.gemfile +44 -0
- data/gemfiles/ruby_3.0.1_rails61_semantic_logger.gemfile.lock +296 -0
- data/gemfiles/ruby_3.0.1_resque2_redis3.gemfile +42 -0
- data/gemfiles/ruby_3.0.1_resque2_redis3.gemfile.lock +194 -0
- data/gemfiles/ruby_3.0.1_resque2_redis4.gemfile +42 -0
- data/gemfiles/ruby_3.0.1_resque2_redis4.gemfile.lock +194 -0
- data/integration/README.md +1 -2
- data/integration/apps/rack/Dockerfile +3 -0
- data/integration/apps/rack/README.md +2 -2
- data/integration/apps/rack/script/build-images +1 -1
- data/integration/apps/rack/script/ci +3 -2
- data/integration/apps/rails-five/README.md +2 -2
- data/integration/apps/rails-five/script/build-images +1 -1
- data/integration/apps/rails-five/script/ci +3 -2
- 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 +23 -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 +64 -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/README.md +2 -2
- data/integration/apps/ruby/script/build-images +1 -1
- data/integration/apps/ruby/script/ci +3 -2
- data/integration/images/include/datadog/demo_env.rb +15 -14
- data/integration/images/include/http-health-check +1 -1
- data/integration/images/wrk/scripts/entrypoint.sh +1 -1
- data/integration/script/build-images +1 -1
- 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 +438 -0
- data/lib/datadog/ci/ext/settings.rb +10 -0
- data/lib/datadog/ci/ext/test.rb +34 -0
- data/lib/datadog/ci/extensions.rb +17 -0
- data/lib/datadog/ci/test.rb +76 -0
- data/lib/datadog/core/environment/cgroup.rb +49 -0
- data/lib/datadog/core/environment/class_count.rb +19 -0
- data/lib/datadog/core/environment/container.rb +88 -0
- data/lib/datadog/core/environment/ext.rb +26 -0
- data/lib/datadog/core/environment/gc.rb +18 -0
- data/lib/datadog/core/environment/identity.rb +50 -0
- data/lib/datadog/core/environment/object_space.rb +22 -0
- data/lib/datadog/core/environment/socket.rb +16 -0
- data/lib/datadog/core/environment/thread_count.rb +18 -0
- data/lib/datadog/core/environment/variable_helpers.rb +39 -0
- data/lib/ddtrace.rb +3 -2
- data/lib/ddtrace/auto_instrument.rb +1 -0
- data/lib/ddtrace/buffer.rb +2 -2
- data/lib/ddtrace/configuration.rb +98 -25
- data/lib/ddtrace/configuration/agent_settings_resolver.rb +230 -0
- data/lib/ddtrace/configuration/base.rb +7 -10
- data/lib/ddtrace/configuration/components.rb +150 -23
- data/lib/ddtrace/configuration/options.rb +4 -6
- data/lib/ddtrace/configuration/settings.rb +104 -7
- data/lib/ddtrace/context.rb +17 -14
- data/lib/ddtrace/context_flush.rb +14 -2
- data/lib/ddtrace/context_provider.rb +0 -2
- data/lib/ddtrace/contrib/action_cable/event.rb +4 -4
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +1 -1
- data/lib/ddtrace/contrib/action_pack/utils.rb +1 -1
- data/lib/ddtrace/contrib/action_view/event.rb +2 -2
- data/lib/ddtrace/contrib/action_view/patcher.rb +4 -4
- 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 +103 -26
- data/lib/ddtrace/contrib/active_record/event.rb +2 -2
- data/lib/ddtrace/contrib/active_record/utils.rb +2 -2
- data/lib/ddtrace/contrib/active_support/cache/patcher.rb +7 -7
- data/lib/ddtrace/contrib/active_support/cache/redis.rb +1 -5
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +2 -2
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +1 -1
- data/lib/ddtrace/contrib/auto_instrument.rb +1 -2
- data/lib/ddtrace/contrib/aws/instrumentation.rb +29 -0
- data/lib/ddtrace/contrib/aws/patcher.rb +4 -0
- data/lib/ddtrace/contrib/aws/services.rb +1 -0
- data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +1 -1
- data/lib/ddtrace/contrib/configurable.rb +64 -40
- data/lib/ddtrace/contrib/configuration/resolver.rb +70 -5
- data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +19 -17
- data/lib/ddtrace/contrib/configuration/settings.rb +7 -6
- data/lib/ddtrace/contrib/dalli/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/dalli/patcher.rb +1 -1
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -0
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +1 -1
- data/lib/ddtrace/contrib/ethon/multi_patch.rb +1 -1
- data/lib/ddtrace/contrib/ethon/patcher.rb +2 -2
- data/lib/ddtrace/contrib/extensions.rb +29 -6
- data/lib/ddtrace/contrib/faraday/patcher.rb +2 -2
- data/lib/ddtrace/contrib/grape/instrumentation.rb +2 -2
- data/lib/ddtrace/contrib/grape/patcher.rb +1 -1
- data/lib/ddtrace/contrib/grpc/patcher.rb +1 -1
- data/lib/ddtrace/contrib/http/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/http/patcher.rb +1 -1
- data/lib/ddtrace/contrib/httpclient/instrumentation.rb +13 -17
- data/lib/ddtrace/contrib/httpclient/patcher.rb +6 -3
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +13 -18
- data/lib/ddtrace/contrib/httprb/patcher.rb +6 -3
- data/lib/ddtrace/contrib/integration.rb +3 -3
- data/lib/ddtrace/contrib/kafka/event.rb +2 -2
- data/lib/ddtrace/contrib/lograge/configuration/settings.rb +18 -0
- data/lib/ddtrace/contrib/lograge/ext.rb +10 -0
- data/lib/ddtrace/contrib/lograge/instrumentation.rb +38 -0
- data/lib/ddtrace/contrib/lograge/integration.rb +45 -0
- data/lib/ddtrace/contrib/{rspec → lograge}/patcher.rb +6 -4
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +2 -2
- data/lib/ddtrace/contrib/mongodb/patcher.rb +2 -2
- data/lib/ddtrace/contrib/mysql2/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/mysql2/patcher.rb +1 -1
- data/lib/ddtrace/contrib/patchable.rb +2 -2
- data/lib/ddtrace/contrib/patcher.rb +10 -7
- data/lib/ddtrace/contrib/presto/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/presto/patcher.rb +6 -3
- data/lib/ddtrace/contrib/qless/patcher.rb +3 -5
- data/lib/ddtrace/contrib/racecar/event.rb +2 -2
- data/lib/ddtrace/contrib/rack/middlewares.rb +1 -1
- data/lib/ddtrace/contrib/rails/framework.rb +25 -1
- data/lib/ddtrace/contrib/rails/log_injection.rb +0 -40
- data/lib/ddtrace/contrib/rails/patcher.rb +17 -11
- data/lib/ddtrace/contrib/rake/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/rake/patcher.rb +1 -1
- data/lib/ddtrace/contrib/redis/configuration/resolver.rb +11 -4
- data/lib/ddtrace/contrib/registerable.rb +2 -2
- data/lib/ddtrace/contrib/resque/configuration/settings.rb +17 -1
- data/lib/ddtrace/contrib/resque/integration.rb +1 -1
- data/lib/ddtrace/contrib/resque/patcher.rb +4 -4
- data/lib/ddtrace/contrib/resque/resque_job.rb +22 -1
- data/lib/ddtrace/contrib/rest_client/patcher.rb +1 -1
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +1 -1
- data/lib/ddtrace/contrib/semantic_logger/configuration/settings.rb +18 -0
- data/lib/ddtrace/contrib/semantic_logger/ext.rb +10 -0
- data/lib/ddtrace/contrib/semantic_logger/instrumentation.rb +42 -0
- data/lib/ddtrace/contrib/semantic_logger/integration.rb +47 -0
- data/lib/ddtrace/contrib/semantic_logger/patcher.rb +25 -0
- data/lib/ddtrace/contrib/sequel/database.rb +1 -1
- data/lib/ddtrace/contrib/sequel/dataset.rb +1 -1
- data/lib/ddtrace/contrib/sequel/patcher.rb +2 -2
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/shoryuken/tracer.rb +7 -3
- data/lib/ddtrace/contrib/sinatra/patcher.rb +1 -1
- 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 -1
- data/lib/ddtrace/diagnostics/environment_logger.rb +5 -5
- data/lib/ddtrace/error.rb +77 -8
- data/lib/ddtrace/ext/app_types.rb +0 -1
- data/lib/ddtrace/ext/environment.rb +7 -0
- data/lib/ddtrace/ext/git.rb +9 -1
- data/lib/ddtrace/ext/profiling.rb +53 -0
- data/lib/ddtrace/ext/runtime.rb +0 -7
- data/lib/ddtrace/ext/test.rb +2 -18
- data/lib/ddtrace/ext/transport.rb +2 -0
- data/lib/ddtrace/metrics.rb +68 -13
- data/lib/ddtrace/opentelemetry/extensions.rb +1 -1
- data/lib/ddtrace/opentracer.rb +20 -39
- data/lib/ddtrace/patcher.rb +25 -3
- data/lib/ddtrace/pin.rb +5 -9
- 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 +67 -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/runtime/metrics.rb +20 -14
- data/lib/ddtrace/sampling/rule_sampler.rb +3 -9
- data/lib/ddtrace/span.rb +17 -6
- data/lib/ddtrace/sync_writer.rb +9 -5
- data/lib/ddtrace/tasks/exec.rb +48 -0
- data/lib/ddtrace/tasks/help.rb +14 -0
- data/lib/ddtrace/tracer.rb +46 -48
- data/lib/ddtrace/transport/http.rb +47 -35
- data/lib/ddtrace/transport/http/adapters/net.rb +18 -4
- data/lib/ddtrace/transport/http/builder.rb +5 -1
- data/lib/ddtrace/transport/http/env.rb +8 -0
- data/lib/ddtrace/transport/http/statistics.rb +2 -2
- data/lib/ddtrace/transport/http/traces.rb +3 -3
- 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 +15 -1
- data/lib/ddtrace/utils/compression.rb +27 -0
- data/lib/ddtrace/utils/forking.rb +1 -1
- data/lib/ddtrace/utils/object_set.rb +39 -0
- data/lib/ddtrace/utils/only_once.rb +40 -0
- data/lib/ddtrace/utils/sequence.rb +17 -0
- data/lib/ddtrace/utils/string_table.rb +45 -0
- data/lib/ddtrace/utils/time.rb +8 -3
- 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 +1 -1
- data/lib/ddtrace/workers/async.rb +5 -4
- data/lib/ddtrace/workers/loop.rb +28 -5
- data/lib/ddtrace/workers/polling.rb +11 -5
- data/lib/ddtrace/workers/queue.rb +2 -1
- data/lib/ddtrace/workers/runtime_metrics.rb +14 -1
- data/lib/ddtrace/workers/trace_writer.rb +4 -6
- data/lib/ddtrace/writer.rb +10 -4
- data/tasks/update_appraisal_gemfiles.rake +36 -0
- metadata +576 -38
- data/.circleci/images/primary/Dockerfile-2.0.0 +0 -73
- data/integration/images/ruby/2.0/Dockerfile +0 -54
- data/lib/ddtrace/contrib/cucumber/configuration/settings.rb +0 -28
- data/lib/ddtrace/contrib/cucumber/ext.rb +0 -17
- data/lib/ddtrace/contrib/cucumber/formatter.rb +0 -98
- data/lib/ddtrace/contrib/cucumber/instrumentation.rb +0 -24
- data/lib/ddtrace/contrib/cucumber/integration.rb +0 -45
- data/lib/ddtrace/contrib/cucumber/patcher.rb +0 -23
- data/lib/ddtrace/contrib/rspec/configuration/settings.rb +0 -28
- data/lib/ddtrace/contrib/rspec/example.rb +0 -75
- data/lib/ddtrace/contrib/rspec/ext.rb +0 -16
- data/lib/ddtrace/contrib/rspec/integration.rb +0 -46
- data/lib/ddtrace/environment.rb +0 -41
- data/lib/ddtrace/ext/ci.rb +0 -297
- data/lib/ddtrace/runtime/cgroup.rb +0 -44
- data/lib/ddtrace/runtime/class_count.rb +0 -17
- data/lib/ddtrace/runtime/container.rb +0 -73
- data/lib/ddtrace/runtime/gc.rb +0 -16
- data/lib/ddtrace/runtime/identity.rb +0 -40
- data/lib/ddtrace/runtime/object_space.rb +0 -19
- data/lib/ddtrace/runtime/socket.rb +0 -14
- data/lib/ddtrace/runtime/thread_count.rb +0 -16
Binary file
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'benchmark/ips'
|
2
|
+
require 'ddtrace'
|
3
|
+
require 'pry'
|
4
|
+
|
5
|
+
# This benchmark measures the performance of the main stack sampling loop of the profiler
|
6
|
+
|
7
|
+
class ProfilerSampleLoopBenchmark
|
8
|
+
def create_profiler
|
9
|
+
Datadog.configure do |c|
|
10
|
+
# c.diagnostics.debug = true
|
11
|
+
c.profiling.enabled = true
|
12
|
+
c.tracer.transport_options = proc { |t| t.adapter :test }
|
13
|
+
end
|
14
|
+
|
15
|
+
# Stop background threads
|
16
|
+
Datadog.profiler.shutdown!
|
17
|
+
|
18
|
+
# Call collection directly
|
19
|
+
@stack_collector = Datadog.profiler.collectors.first
|
20
|
+
@recorder = @stack_collector.recorder
|
21
|
+
end
|
22
|
+
|
23
|
+
def thread_with_very_deep_stack(depth: 500)
|
24
|
+
deep_stack = proc do |n|
|
25
|
+
if n > 0
|
26
|
+
deep_stack.call(n - 1)
|
27
|
+
else
|
28
|
+
sleep
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Thread.new { deep_stack.call(depth) }.tap { |t| t.name = "Deep stack #{depth}" }
|
33
|
+
end
|
34
|
+
|
35
|
+
def run_benchmark
|
36
|
+
Benchmark.ips do |x|
|
37
|
+
x.config(time: 10, warmup: 2)
|
38
|
+
|
39
|
+
x.report("stack collector #{ENV['CONFIG']}") do
|
40
|
+
@stack_collector.collect_and_wait
|
41
|
+
end
|
42
|
+
|
43
|
+
x.save! 'profiler-sample-loop-results'
|
44
|
+
x.compare!
|
45
|
+
end
|
46
|
+
|
47
|
+
@recorder.flush
|
48
|
+
end
|
49
|
+
|
50
|
+
def run_forever
|
51
|
+
while true
|
52
|
+
1000.times { @stack_collector.collect_and_wait }
|
53
|
+
@recorder.flush
|
54
|
+
print '.'
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
puts "Current pid is #{Process.pid}"
|
60
|
+
|
61
|
+
ProfilerSampleLoopBenchmark.new.instance_exec do
|
62
|
+
create_profiler
|
63
|
+
4.times { thread_with_very_deep_stack }
|
64
|
+
if ARGV.include?('--forever')
|
65
|
+
run_forever
|
66
|
+
else
|
67
|
+
run_benchmark
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'benchmark/ips'
|
2
|
+
require 'ddtrace'
|
3
|
+
require 'pry'
|
4
|
+
|
5
|
+
# This benchmark measures the performance of encoding pprofs and trying to submit them
|
6
|
+
#
|
7
|
+
# The FLUSH_DUMP_FILE (by default benchmarks/data/profiler-submission-marshal.gz, gathered from benchmarking using
|
8
|
+
# the discourse forum rails app) can be generated by changing the scheduler.rb#flush_events to dump the contents of
|
9
|
+
# "flush" to a file during a benchmark execution:
|
10
|
+
#
|
11
|
+
# dump_file = "marshal-#{Time.now.utc.to_i}.dump"
|
12
|
+
# File.open(dump_file, "w") { |f| Marshal.dump(flush, f) }
|
13
|
+
# Datadog.logger.info("Dumped to #{dump_file}")
|
14
|
+
#
|
15
|
+
# And then gzipping the result. (This can probably be automated a bit by adding an extra exporter, but the above worked
|
16
|
+
# for me).
|
17
|
+
|
18
|
+
class ProfilerSubmission
|
19
|
+
def create_profiler
|
20
|
+
@adapter_buffer = []
|
21
|
+
|
22
|
+
Datadog.configure do |c|
|
23
|
+
# c.diagnostics.debug = true
|
24
|
+
c.profiling.enabled = true
|
25
|
+
c.tracer.transport_options = proc { |t| t.adapter :test, @adapter_buffer }
|
26
|
+
end
|
27
|
+
|
28
|
+
# Stop background threads
|
29
|
+
Datadog.profiler.shutdown!
|
30
|
+
|
31
|
+
# Call exporter directly
|
32
|
+
@exporter = Datadog.profiler.scheduler.exporters.first
|
33
|
+
@flush = Marshal.load(
|
34
|
+
Zlib::GzipReader.new(File.open(ENV['FLUSH_DUMP_FILE'] || 'benchmarks/data/profiler-submission-marshal.gz'))
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
def check_valid_pprof
|
39
|
+
output_pprof = @adapter_buffer.last[:form]["data[0]"].io
|
40
|
+
|
41
|
+
expected_hashes = [
|
42
|
+
"75c65dec2d5d750faca3e905486c39ba44219636ac1bea15d5d624b741d4b62a",
|
43
|
+
"6780c47b3e271f2abe0346fd40ac358f6a34270b3a8f5743aacd1970bbbbc6f5"
|
44
|
+
]
|
45
|
+
current_hash = Digest::SHA256.hexdigest(Zlib::GzipReader.new(output_pprof).read)
|
46
|
+
|
47
|
+
if expected_hashes.include?(current_hash)
|
48
|
+
puts "Output hash #{current_hash} matches known signature"
|
49
|
+
else
|
50
|
+
puts "WARNING: Unexpected pprof output -- unknown hash. Hashes seem to differ due to some of our dependencies changing, " \
|
51
|
+
"but it can also indicate that encoding output has become corrupted."
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def run_benchmark
|
56
|
+
Benchmark.ips do |x|
|
57
|
+
x.config(time: 10, warmup: 2)
|
58
|
+
|
59
|
+
x.report("exporter #{ENV['CONFIG']}") do
|
60
|
+
run_once
|
61
|
+
end
|
62
|
+
|
63
|
+
x.save! 'profiler-submission-results.json'
|
64
|
+
x.compare!
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def run_forever
|
69
|
+
while true
|
70
|
+
run_once
|
71
|
+
print '.'
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def run_once
|
76
|
+
@adapter_buffer.clear
|
77
|
+
@exporter.export(@flush)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
puts "Current pid is #{Process.pid}"
|
82
|
+
|
83
|
+
ProfilerSubmission.new.instance_exec do
|
84
|
+
create_profiler
|
85
|
+
run_once
|
86
|
+
check_valid_pprof
|
87
|
+
|
88
|
+
if ARGV.include?('--forever')
|
89
|
+
run_forever
|
90
|
+
else
|
91
|
+
run_benchmark
|
92
|
+
end
|
93
|
+
end
|
data/bin/ddtracerb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'ddtrace/tasks/exec'
|
3
|
+
require 'ddtrace/tasks/help'
|
4
|
+
|
5
|
+
command = ARGV.shift
|
6
|
+
|
7
|
+
case command
|
8
|
+
when 'exec'
|
9
|
+
Datadog::Tasks::Exec.new(ARGV).run
|
10
|
+
when 'help', '--help'
|
11
|
+
Datadog::Tasks::Help.new.run
|
12
|
+
else
|
13
|
+
puts "Command '#{command}' is not valid for ddtrace."
|
14
|
+
Datadog::Tasks::Help.new.run
|
15
|
+
end
|
data/ddtrace.gemspec
CHANGED
@@ -7,7 +7,7 @@ require 'ddtrace/version'
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'ddtrace'
|
9
9
|
spec.version = Datadog::VERSION::STRING
|
10
|
-
spec.required_ruby_version = ">= #{Datadog::VERSION::MINIMUM_RUBY_VERSION}"
|
10
|
+
spec.required_ruby_version = [">= #{Datadog::VERSION::MINIMUM_RUBY_VERSION}", "< #{Datadog::VERSION::MAXIMUM_RUBY_VERSION}"]
|
11
11
|
spec.required_rubygems_version = '>= 2.0.0'
|
12
12
|
spec.authors = ['Datadog, Inc.']
|
13
13
|
spec.email = ['dev@datadoghq.com']
|
@@ -29,14 +29,16 @@ Gem::Specification.new do |spec|
|
|
29
29
|
end
|
30
30
|
|
31
31
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
32
|
-
spec.
|
33
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.executables = ['ddtracerb']
|
34
33
|
spec.require_paths = ['lib']
|
35
34
|
|
36
35
|
if RUBY_VERSION >= '2.2.0'
|
37
36
|
spec.add_dependency 'msgpack'
|
38
37
|
else
|
39
|
-
# msgpack 1.4 fails for Ruby 2.
|
38
|
+
# msgpack 1.4 fails for Ruby 2.1: https://github.com/msgpack/msgpack-ruby/issues/205
|
40
39
|
spec.add_dependency 'msgpack', '< 1.4'
|
41
40
|
end
|
41
|
+
|
42
|
+
# Used by the profiler
|
43
|
+
spec.add_dependency 'ffi', '~> 1.0'
|
42
44
|
end
|
data/docker-compose.yml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
version: '3.2'
|
2
2
|
services:
|
3
3
|
# MRI
|
4
|
-
tracer-2.
|
5
|
-
image:
|
4
|
+
tracer-2.1:
|
5
|
+
image: ivoanjo/docker-library:ddtrace_rb_2_1_10
|
6
6
|
command: /bin/bash
|
7
7
|
depends_on:
|
8
8
|
- ddagent
|
@@ -24,15 +24,15 @@ services:
|
|
24
24
|
- TEST_MYSQL_HOST=mysql
|
25
25
|
- TEST_POSTGRES_HOST=postgres
|
26
26
|
- TEST_PRESTO_HOST=presto
|
27
|
+
- TEST_PRESTO_PORT=8080
|
27
28
|
- TEST_REDIS_HOST=redis
|
28
29
|
stdin_open: true
|
29
30
|
tty: true
|
30
31
|
volumes:
|
31
32
|
- .:/app
|
32
|
-
- bundle-2.
|
33
|
-
|
34
|
-
|
35
|
-
image: palazzem/docker-library:ddtrace_rb_2_1_10
|
33
|
+
- bundle-2.1:/usr/local/bundle
|
34
|
+
tracer-2.2:
|
35
|
+
image: ivoanjo/docker-library:ddtrace_rb_2_2_10
|
36
36
|
command: /bin/bash
|
37
37
|
depends_on:
|
38
38
|
- ddagent
|
@@ -60,10 +60,9 @@ services:
|
|
60
60
|
tty: true
|
61
61
|
volumes:
|
62
62
|
- .:/app
|
63
|
-
- bundle-2.
|
64
|
-
|
65
|
-
|
66
|
-
image: palazzem/docker-library:ddtrace_rb_2_2_10
|
63
|
+
- bundle-2.2:/usr/local/bundle
|
64
|
+
tracer-2.3:
|
65
|
+
image: ivoanjo/docker-library:ddtrace_rb_2_3_8
|
67
66
|
command: /bin/bash
|
68
67
|
depends_on:
|
69
68
|
- ddagent
|
@@ -91,10 +90,9 @@ services:
|
|
91
90
|
tty: true
|
92
91
|
volumes:
|
93
92
|
- .:/app
|
94
|
-
- bundle-2.
|
95
|
-
|
96
|
-
|
97
|
-
image: palazzem/docker-library:ddtrace_rb_2_3_8
|
93
|
+
- bundle-2.3:/usr/local/bundle
|
94
|
+
tracer-2.4:
|
95
|
+
image: ivoanjo/docker-library:ddtrace_rb_2_4_10
|
98
96
|
command: /bin/bash
|
99
97
|
depends_on:
|
100
98
|
- ddagent
|
@@ -122,10 +120,9 @@ services:
|
|
122
120
|
tty: true
|
123
121
|
volumes:
|
124
122
|
- .:/app
|
125
|
-
- bundle-2.
|
126
|
-
|
127
|
-
|
128
|
-
image: palazzem/docker-library:ddtrace_rb_2_4_6
|
123
|
+
- bundle-2.4:/usr/local/bundle
|
124
|
+
tracer-2.5:
|
125
|
+
image: ivoanjo/docker-library:ddtrace_rb_2_5_9
|
129
126
|
command: /bin/bash
|
130
127
|
depends_on:
|
131
128
|
- ddagent
|
@@ -153,10 +150,9 @@ services:
|
|
153
150
|
tty: true
|
154
151
|
volumes:
|
155
152
|
- .:/app
|
156
|
-
- bundle-2.
|
157
|
-
|
158
|
-
|
159
|
-
image: marcotc/docker-library:ddtrace_rb_2_5_6
|
153
|
+
- bundle-2.5:/usr/local/bundle
|
154
|
+
tracer-2.6:
|
155
|
+
image: ivoanjo/docker-library:ddtrace_rb_2_6_7
|
160
156
|
command: /bin/bash
|
161
157
|
depends_on:
|
162
158
|
- ddagent
|
@@ -184,10 +180,9 @@ services:
|
|
184
180
|
tty: true
|
185
181
|
volumes:
|
186
182
|
- .:/app
|
187
|
-
- bundle-2.
|
188
|
-
|
189
|
-
|
190
|
-
image: marcotc/docker-library:ddtrace_rb_2_6_4
|
183
|
+
- bundle-2.6:/usr/local/bundle
|
184
|
+
tracer-2.7:
|
185
|
+
image: ivoanjo/docker-library:ddtrace_rb_2_7_3
|
191
186
|
command: /bin/bash
|
192
187
|
depends_on:
|
193
188
|
- ddagent
|
@@ -215,10 +210,37 @@ services:
|
|
215
210
|
tty: true
|
216
211
|
volumes:
|
217
212
|
- .:/app
|
218
|
-
- bundle-2.
|
219
|
-
|
220
|
-
|
221
|
-
|
213
|
+
- bundle-2.7:/usr/local/bundle
|
214
|
+
tracer-3.0:
|
215
|
+
image: ivoanjo/docker-library:ddtrace_rb_3_0_1
|
216
|
+
command: /bin/bash
|
217
|
+
depends_on:
|
218
|
+
- ddagent
|
219
|
+
- elasticsearch
|
220
|
+
- memcached
|
221
|
+
- mongodb
|
222
|
+
- mysql
|
223
|
+
- postgres
|
224
|
+
- redis
|
225
|
+
env_file: ./.env
|
226
|
+
environment:
|
227
|
+
- BUNDLE_GEMFILE=/app/Gemfile
|
228
|
+
- DD_AGENT_HOST=ddagent
|
229
|
+
- TEST_DATADOG_INTEGRATION=1
|
230
|
+
- TEST_ELASTICSEARCH_HOST=elasticsearch
|
231
|
+
- TEST_MEMCACHED_HOST=memcached
|
232
|
+
- TEST_MONGODB_HOST=mongodb
|
233
|
+
- TEST_MYSQL_HOST=mysql
|
234
|
+
- TEST_POSTGRES_HOST=postgres
|
235
|
+
- TEST_REDIS_HOST=redis
|
236
|
+
stdin_open: true
|
237
|
+
tty: true
|
238
|
+
volumes:
|
239
|
+
- .:/app
|
240
|
+
- bundle-3.0:/usr/local/bundle
|
241
|
+
# JRuby
|
242
|
+
tracer-jruby-9.2.0.0:
|
243
|
+
image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_0_0
|
222
244
|
command: /bin/bash
|
223
245
|
depends_on:
|
224
246
|
- ddagent
|
@@ -246,10 +268,9 @@ services:
|
|
246
268
|
tty: true
|
247
269
|
volumes:
|
248
270
|
- .:/app
|
249
|
-
- bundle-2.
|
250
|
-
|
251
|
-
|
252
|
-
image: marcotc/docker-library:ddtrace_rb_3.0.0
|
271
|
+
- bundle-jruby-9.2.0.0:/usr/local/bundle
|
272
|
+
tracer-jruby-9.2-latest:
|
273
|
+
image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_18_0
|
253
274
|
command: /bin/bash
|
254
275
|
depends_on:
|
255
276
|
- ddagent
|
@@ -258,6 +279,7 @@ services:
|
|
258
279
|
- mongodb
|
259
280
|
- mysql
|
260
281
|
- postgres
|
282
|
+
- presto
|
261
283
|
- redis
|
262
284
|
env_file: ./.env
|
263
285
|
environment:
|
@@ -269,16 +291,17 @@ services:
|
|
269
291
|
- TEST_MONGODB_HOST=mongodb
|
270
292
|
- TEST_MYSQL_HOST=mysql
|
271
293
|
- TEST_POSTGRES_HOST=postgres
|
294
|
+
- TEST_PRESTO_HOST=presto
|
295
|
+
- TEST_PRESTO_PORT=8080
|
272
296
|
- TEST_REDIS_HOST=redis
|
273
297
|
stdin_open: true
|
274
298
|
tty: true
|
275
299
|
volumes:
|
276
300
|
- .:/app
|
277
|
-
- bundle-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
image: marcotc/docker-library:ddtrace_rb_jruby_9_2
|
301
|
+
- bundle-jruby-9.2-latest:/usr/local/bundle
|
302
|
+
# TruffleRuby
|
303
|
+
tracer-truffleruby-21.1.0:
|
304
|
+
image: ivoanjo/docker-library:ddtrace_rb_truffleruby_21_1_0
|
282
305
|
command: /bin/bash
|
283
306
|
depends_on:
|
284
307
|
- ddagent
|
@@ -306,8 +329,7 @@ services:
|
|
306
329
|
tty: true
|
307
330
|
volumes:
|
308
331
|
- .:/app
|
309
|
-
- bundle-
|
310
|
-
- gemfiles-jruby-9.2:/app/gemfiles
|
332
|
+
- bundle-truffleruby-21.1.0:/usr/local/bundle
|
311
333
|
ddagent:
|
312
334
|
image: datadog/agent
|
313
335
|
environment:
|
@@ -366,7 +388,8 @@ services:
|
|
366
388
|
ports:
|
367
389
|
- "${TEST_POSTGRES_PORT}:5432"
|
368
390
|
presto:
|
369
|
-
|
391
|
+
# Move to trinodb/trino after https://github.com/treasure-data/presto-client-ruby/issues/64 is resolved.
|
392
|
+
image: starburstdata/presto:332-e.9
|
370
393
|
expose:
|
371
394
|
- "8080"
|
372
395
|
ports:
|
@@ -378,7 +401,6 @@ services:
|
|
378
401
|
ports:
|
379
402
|
- "${TEST_REDIS_PORT}:6379"
|
380
403
|
volumes:
|
381
|
-
bundle-2.0:
|
382
404
|
bundle-2.1:
|
383
405
|
bundle-2.2:
|
384
406
|
bundle-2.3:
|
@@ -387,14 +409,6 @@ volumes:
|
|
387
409
|
bundle-2.6:
|
388
410
|
bundle-2.7:
|
389
411
|
bundle-3.0:
|
390
|
-
bundle-jruby-9.2:
|
391
|
-
|
392
|
-
|
393
|
-
gemfiles-2.2:
|
394
|
-
gemfiles-2.3:
|
395
|
-
gemfiles-2.4:
|
396
|
-
gemfiles-2.5:
|
397
|
-
gemfiles-2.6:
|
398
|
-
gemfiles-2.7:
|
399
|
-
gemfiles-3.0:
|
400
|
-
gemfiles-jruby-9.2:
|
412
|
+
bundle-jruby-9.2.0.0:
|
413
|
+
bundle-jruby-9.2-latest:
|
414
|
+
bundle-truffleruby-21.1.0:
|
data/docs/GettingStarted.md
CHANGED
@@ -46,6 +46,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
46
46
|
- [gRPC](#grpc)
|
47
47
|
- [http.rb](#http-rb)
|
48
48
|
- [httpclient](#httpclient)
|
49
|
+
- [httpx](#httpx)
|
49
50
|
- [MongoDB](#mongodb)
|
50
51
|
- [MySQL2](#mysql2)
|
51
52
|
- [Net/HTTP](#net-http)
|
@@ -70,7 +71,9 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
70
71
|
- [Tracer settings](#tracer-settings)
|
71
72
|
- [Custom logging](#custom-logging)
|
72
73
|
- [Environment and tags](#environment-and-tags)
|
74
|
+
- [Environment variables](#environment-variables)
|
73
75
|
- [Sampling](#sampling)
|
76
|
+
- [Application-side sampling](#application-side-sampling)
|
74
77
|
- [Priority sampling](#priority-sampling)
|
75
78
|
- [Distributed tracing](#distributed-tracing)
|
76
79
|
- [HTTP request queuing](#http-request-queuing)
|
@@ -82,6 +85,10 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
82
85
|
- [Metrics](#metrics)
|
83
86
|
- [For application runtime](#for-application-runtime)
|
84
87
|
- [OpenTracing](#opentracing)
|
88
|
+
- [Profiling](#profiling)
|
89
|
+
- [Known issues and suggested configurations](#known-issues-and-suggested-configurations)
|
90
|
+
- [Payload too large](#payload-too-large)
|
91
|
+
- [Stack level too deep](#stack-level-too-deep)
|
85
92
|
|
86
93
|
## Compatibility
|
87
94
|
|
@@ -97,7 +104,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
97
104
|
| | | 2.3 | Full | Latest |
|
98
105
|
| | | 2.2 | Full | Latest |
|
99
106
|
| | | 2.1 | Full | Latest |
|
100
|
-
| | | 2.0 |
|
107
|
+
| | | 2.0 | EOL since June 7th, 2021 | < 0.50.0 |
|
101
108
|
| | | 1.9.3 | EOL since August 6th, 2020 | < 0.27.0 |
|
102
109
|
| | | 1.9.1 | EOL since August 6th, 2020 | < 0.27.0 |
|
103
110
|
| JRuby | https://www.jruby.org | 9.2 | Full | Latest |
|
@@ -398,7 +405,9 @@ For a list of available integrations, and their configuration options, please re
|
|
398
405
|
| gRPC | `grpc` | `>= 1.7` | *gem not available* | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
|
399
406
|
| http.rb | `httprb` | `>= 2.0` | `>= 2.0` | *[Link](#http-rb)* | *[Link](https://github.com/httprb/http)* |
|
400
407
|
| httpclient | `httpclient` | `>= 2.2` | `>= 2.2` | *[Link](#httpclient)* | *[Link](https://github.com/nahi/httpclient)* |
|
408
|
+
| httpx | `httpx` | `>= 0.11` | `>= 0.11` | *[Link](#httpx)* | *[Link](https://gitlab.com/honeyryderchuck/httpx)* |
|
401
409
|
| Kafka | `ruby-kafka` | `>= 0.7.10` | `>= 0.7.10` | *[Link](#kafka)* | *[Link](https://github.com/zendesk/ruby-kafka)* |
|
410
|
+
| Makara (through Active Record) | `makara` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#active-record)* | *[Link](https://github.com/instacart/makara)* |
|
402
411
|
| MongoDB | `mongo` | `>= 2.1` | `>= 2.1` | *[Link](#mongodb)* | *[Link](https://github.com/mongodb/mongo-ruby-driver)* |
|
403
412
|
| MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
|
404
413
|
| Net/HTTP | `http` | *(Any supported Ruby)* | *(Any supported Ruby)* | *[Link](#nethttp)* | *[Link](https://ruby-doc.org/stdlib-2.4.0/libdoc/net/http/rdoc/Net/HTTP.html)* |
|
@@ -438,7 +447,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
438
447
|
|
439
448
|
| Key | Description | Default |
|
440
449
|
| --- | ----------- | ------- |
|
441
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
442
450
|
| `service_name` | Service name used for `action_cable` instrumentation | `'action_cable'` |
|
443
451
|
|
444
452
|
### Action View
|
@@ -458,7 +466,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
458
466
|
|
459
467
|
| Key | Description | Default |
|
460
468
|
| ---| --- | --- |
|
461
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
462
469
|
| `service_name` | Service name used for rendering instrumentation. | `action_view` |
|
463
470
|
| `template_base_path` | Used when the template name is parsed. If you don't store your templates in the `views/` folder, you may need to change this value | `'views/'` |
|
464
471
|
|
@@ -480,7 +487,6 @@ ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
|
|
480
487
|
|
481
488
|
| Key | Description | Default |
|
482
489
|
| --- | ----------- | ------- |
|
483
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
484
490
|
| `service_name` | Service name used for `active_model_serializers` instrumentation. | `'active_model_serializers'` |
|
485
491
|
|
486
492
|
### Action Pack
|
@@ -500,7 +506,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
500
506
|
|
501
507
|
| Key | Description | Default |
|
502
508
|
| ---| --- | --- |
|
503
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
504
509
|
| `service_name` | Service name used for rendering instrumentation. | `action_pack` |
|
505
510
|
|
506
511
|
### Active Record
|
@@ -528,7 +533,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
528
533
|
|
529
534
|
| Key | Description | Default |
|
530
535
|
| ---| --- | --- |
|
531
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
532
536
|
| `orm_service_name` | Service name used for the mapping portion of query results to ActiveRecord objects. Inherits service name from parent by default. | _parent.service_name_ (e.g. `'mysql2'`) |
|
533
537
|
| `service_name` | Service name used for database portion of `active_record` instrumentation. | Name of database adapter (e.g. `'mysql2'`) |
|
534
538
|
|
@@ -547,16 +551,19 @@ Datadog.configure do |c|
|
|
547
551
|
# Only available if you are using Rails with ActiveRecord.
|
548
552
|
c.use :active_record, describes: :secondary_database, service_name: 'secondary-db'
|
549
553
|
|
554
|
+
# Block configuration pattern.
|
550
555
|
c.use :active_record, describes: :secondary_database do |second_db|
|
551
556
|
second_db.service_name = 'secondary-db'
|
552
557
|
end
|
553
558
|
|
554
559
|
# Connection string with the following connection settings:
|
555
|
-
#
|
560
|
+
# adapter, username, host, port, database
|
561
|
+
# Other fields are ignored.
|
556
562
|
c.use :active_record, describes: 'mysql2://root@127.0.0.1:3306/mysql', service_name: 'secondary-db'
|
557
563
|
|
558
|
-
# Hash with following connection settings
|
559
|
-
#
|
564
|
+
# Hash with following connection settings:
|
565
|
+
# adapter, username, host, port, database
|
566
|
+
# Other fields are ignored.
|
560
567
|
c.use :active_record, describes: {
|
561
568
|
adapter: 'mysql2',
|
562
569
|
host: '127.0.0.1',
|
@@ -565,9 +572,34 @@ Datadog.configure do |c|
|
|
565
572
|
username: 'root'
|
566
573
|
},
|
567
574
|
service_name: 'secondary-db'
|
575
|
+
|
576
|
+
# If using the `makara` gem, it's possible to match on connection `role`:
|
577
|
+
c.use :active_record, describes: { makara_role: 'primary' }, service_name: 'primary-db'
|
578
|
+
c.use :active_record, describes: { makara_role: 'replica' }, service_name: 'secondary-db'
|
579
|
+
end
|
580
|
+
```
|
581
|
+
|
582
|
+
You can also create configurations based on partial matching of database connection fields:
|
583
|
+
|
584
|
+
```ruby
|
585
|
+
Datadog.configure do |c|
|
586
|
+
# Matches any connection on host `127.0.0.1`.
|
587
|
+
c.use :active_record, describes: { host: '127.0.0.1' }, service_name: 'local-db'
|
588
|
+
|
589
|
+
# Matches any `mysql2` connection.
|
590
|
+
c.use :active_record, describes: { adapter: 'mysql2'}, service_name: 'mysql-db'
|
591
|
+
|
592
|
+
# Matches any `mysql2` connection to the `reports` database.
|
593
|
+
#
|
594
|
+
# In case of multiple matching `describe` configurations, the latest one applies.
|
595
|
+
# In this case a connection with both adapter `mysql` and database `reports`
|
596
|
+
# will be configured `service_name: 'reports-db'`, not `service_name: 'mysql-db'`.
|
597
|
+
c.use :active_record, describes: { adapter: 'mysql2', database: 'reports'}, service_name: 'reports-db'
|
568
598
|
end
|
569
599
|
```
|
570
600
|
|
601
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
602
|
+
|
571
603
|
If ActiveRecord traces an event that uses a connection that matches a key defined by `describes`, it will use the trace settings assigned to that connection. If the connection does not match any of the described connections, it will use default settings defined by `c.use :active_record` instead.
|
572
604
|
|
573
605
|
### Active Support
|
@@ -590,7 +622,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
590
622
|
|
591
623
|
| Key | Description | Default |
|
592
624
|
| ---| --- | --- |
|
593
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
594
625
|
| `cache_service` | Service name used for caching with `active_support` instrumentation. | `active_support-cache` |
|
595
626
|
|
596
627
|
### AWS
|
@@ -613,7 +644,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
613
644
|
|
614
645
|
| Key | Description | Default |
|
615
646
|
| --- | ----------- | ------- |
|
616
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
617
647
|
| `service_name` | Service name used for `aws` instrumentation | `'aws'` |
|
618
648
|
|
619
649
|
### Concurrent Ruby
|
@@ -699,7 +729,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
699
729
|
|
700
730
|
| Key | Description | Default |
|
701
731
|
| --- | ----------- | ------- |
|
702
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
703
732
|
| `service_name` | Service name used for `dalli` instrumentation | `'memcached'` |
|
704
733
|
|
705
734
|
### DelayedJob
|
@@ -720,7 +749,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
720
749
|
|
721
750
|
| Key | Description | Default |
|
722
751
|
| --- | ----------- | ------- |
|
723
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
724
752
|
| `service_name` | Service name used for `DelayedJob` instrumentation | `'delayed_job'` |
|
725
753
|
| `client_service_name` | Service name used for client-side `DelayedJob` instrumentation | `'delayed_job-client'` |
|
726
754
|
| `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? }` |
|
@@ -746,7 +774,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
746
774
|
|
747
775
|
| Key | Description | Default |
|
748
776
|
| --- | ----------- | ------- |
|
749
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
750
777
|
| `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. | `{}` |
|
751
778
|
| `service_name` | Service name used for `elasticsearch` instrumentation | `'elasticsearch'` |
|
752
779
|
|
@@ -772,7 +799,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
772
799
|
|
773
800
|
| Key | Description | Default |
|
774
801
|
| --- | ----------- | ------- |
|
775
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
776
802
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
777
803
|
| `service_name` | Service name for `ethon` instrumentation. | `'ethon'` |
|
778
804
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -804,7 +830,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
804
830
|
|
805
831
|
| Key | Description | Default |
|
806
832
|
| --- | ----------- | ------- |
|
807
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
808
833
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
809
834
|
| `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` |
|
810
835
|
| `service_name` | Service name for Excon instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'excon'` |
|
@@ -867,7 +892,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
867
892
|
|
868
893
|
| Key | Description | Default |
|
869
894
|
| --- | ----------- | ------- |
|
870
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
871
895
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
872
896
|
| `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` |
|
873
897
|
| `service_name` | Service name for Faraday instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'faraday'` |
|
@@ -901,7 +925,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
901
925
|
|
902
926
|
| Key | Description | Default |
|
903
927
|
| --- | ----------- | ------- |
|
904
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
905
928
|
| `enabled` | Defines whether Grape should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
906
929
|
| `service_name` | Service name used for `grape` instrumentation | `'grape'` |
|
907
930
|
| `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` |
|
@@ -926,7 +949,6 @@ The `use :graphql` method accepts the following parameters. Additional options c
|
|
926
949
|
|
927
950
|
| Key | Description | Default |
|
928
951
|
| --- | ----------- | ------- |
|
929
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
930
952
|
| `service_name` | Service name used for `graphql` instrumentation | `'ruby-graphql'` |
|
931
953
|
| `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. | `[]` |
|
932
954
|
|
@@ -1005,7 +1027,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1005
1027
|
|
1006
1028
|
| Key | Description | Default |
|
1007
1029
|
| --- | ----------- | ------- |
|
1008
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1009
1030
|
| `service_name` | Service name used for `grpc` instrumentation | `'grpc'` |
|
1010
1031
|
|
1011
1032
|
**Configuring clients to use different settings**
|
@@ -1047,7 +1068,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1047
1068
|
|
1048
1069
|
| Key | Description | Default |
|
1049
1070
|
| --- | ----------- | ------- |
|
1050
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1051
1071
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1052
1072
|
| `service_name` | Service name for `httprb` instrumentation. | `'httprb'` |
|
1053
1073
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -1073,11 +1093,29 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1073
1093
|
|
1074
1094
|
| Key | Description | Default |
|
1075
1095
|
| --- | ----------- | ------- |
|
1076
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1077
1096
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1078
1097
|
| `service_name` | Service name for `httpclient` instrumentation. | `'httpclient'` |
|
1079
1098
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
1080
1099
|
|
1100
|
+
### httpx
|
1101
|
+
|
1102
|
+
`httpx` maintains its [own integration with `ddtrace`](https://honeyryderchuck.gitlab.io/httpx/wiki/Datadog-Adapter):
|
1103
|
+
|
1104
|
+
```ruby
|
1105
|
+
require "ddtrace"
|
1106
|
+
require "httpx/adapters/datadog"
|
1107
|
+
|
1108
|
+
Datadog.configure do |c|
|
1109
|
+
c.use :httpx
|
1110
|
+
|
1111
|
+
# optionally, specify a different service name for hostnames matching a regex
|
1112
|
+
c.use :httpx, describes: /user-[^.]+\.example\.com/ do |http|
|
1113
|
+
http.service_name = 'user.example.com'
|
1114
|
+
http.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1115
|
+
end
|
1116
|
+
end
|
1117
|
+
```
|
1118
|
+
|
1081
1119
|
### Kafka
|
1082
1120
|
|
1083
1121
|
The Kafka integration provides tracing of the `ruby-kafka` gem:
|
@@ -1098,7 +1136,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1098
1136
|
|
1099
1137
|
| Key | Description | Default |
|
1100
1138
|
| --- | ----------- | ------- |
|
1101
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1102
1139
|
| `service_name` | Service name used for `kafka` instrumentation | `'kafka'` |
|
1103
1140
|
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1104
1141
|
|
@@ -1127,7 +1164,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1127
1164
|
|
1128
1165
|
| Key | Description | Default |
|
1129
1166
|
| --- | ----------- | ------- |
|
1130
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1131
1167
|
| `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] }` |
|
1132
1168
|
| `service_name` | Service name used for `mongo` instrumentation | `'mongodb'` |
|
1133
1169
|
|
@@ -1151,7 +1187,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1151
1187
|
|
1152
1188
|
| Key | Description | Default |
|
1153
1189
|
| --- | ----------- | ------- |
|
1154
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1155
1190
|
| `service_name` | Service name used for `mysql2` instrumentation | `'mysql2'` |
|
1156
1191
|
|
1157
1192
|
### Net/HTTP
|
@@ -1184,7 +1219,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1184
1219
|
|
1185
1220
|
| Key | Description | Default |
|
1186
1221
|
| --- | ----------- | ------- |
|
1187
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1188
1222
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1189
1223
|
| `service_name` | Service name used for `http` instrumentation | `'net/http'` |
|
1190
1224
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
@@ -1225,7 +1259,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1225
1259
|
|
1226
1260
|
| Key | Description | Default |
|
1227
1261
|
| --- | ----------- | ------- |
|
1228
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1229
1262
|
| `service_name` | Service name used for `presto` instrumentation | `'presto'` |
|
1230
1263
|
|
1231
1264
|
### Qless
|
@@ -1246,7 +1279,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1246
1279
|
|
1247
1280
|
| Key | Description | Default |
|
1248
1281
|
| --- | ----------- | ------- |
|
1249
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1250
1282
|
| `service_name` | Service name used for `qless` instrumentation | `'qless'` |
|
1251
1283
|
| `tag_job_data` | Enable tagging with job arguments. true for on, false for off. | `false` |
|
1252
1284
|
| `tag_job_tags` | Enable tagging with job tags. true for on, false for off. | `false` |
|
@@ -1269,7 +1301,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1269
1301
|
|
1270
1302
|
| Key | Description | Default |
|
1271
1303
|
| --- | ----------- | ------- |
|
1272
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1273
1304
|
| `enabled` | Defines whether Que should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1274
1305
|
| `service_name` | Service name used for `que` instrumentation | `'que'` |
|
1275
1306
|
| `tag_args` | Enable tagging of a job's args field. `true` for on, `false` for off. | `false` |
|
@@ -1294,7 +1325,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1294
1325
|
|
1295
1326
|
| Key | Description | Default |
|
1296
1327
|
| --- | ----------- | ------- |
|
1297
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1298
1328
|
| `service_name` | Service name used for `racecar` instrumentation | `'racecar'` |
|
1299
1329
|
|
1300
1330
|
### Rack
|
@@ -1324,7 +1354,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1324
1354
|
|
1325
1355
|
| Key | Description | Default |
|
1326
1356
|
| --- | ----------- | ------- |
|
1327
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1328
1357
|
| `application` | Your Rack application. Required for `middleware_names`. | `nil` |
|
1329
1358
|
| `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` |
|
1330
1359
|
| `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'] }` |
|
@@ -1387,7 +1416,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1387
1416
|
|
1388
1417
|
| Key | Description | Default |
|
1389
1418
|
| --- | ----------- | ------- |
|
1390
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `nil` |
|
1391
1419
|
| `cache_service` | Cache service name used when tracing cache activity | `'<app_name>-cache'` |
|
1392
1420
|
| `controller_service` | Service name used when tracing a Rails action controller | `'<app_name>'` |
|
1393
1421
|
| `database_service` | Database service name used when tracing database activity | `'<app_name>-<adapter_name>'` |
|
@@ -1437,7 +1465,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1437
1465
|
|
1438
1466
|
| Key | Description | Default |
|
1439
1467
|
| --- | ----------- | ------- |
|
1440
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1441
1468
|
| `enabled` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1442
1469
|
| `quantize` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` |
|
1443
1470
|
| `service_name` | Service name used for `rake` instrumentation | `'rake'` |
|
@@ -1497,7 +1524,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1497
1524
|
|
1498
1525
|
| Key | Description | Default |
|
1499
1526
|
| --- | ----------- | ------- |
|
1500
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1501
1527
|
| `service_name` | Service name used for `redis` instrumentation | `'redis'` |
|
1502
1528
|
| `command_args` | Show the command arguments (e.g. `key` in `GET key`) as resource name and tag | true |
|
1503
1529
|
|
@@ -1537,12 +1563,17 @@ Datadog.configure do |c|
|
|
1537
1563
|
# The default configuration for any redis client
|
1538
1564
|
c.use :redis, service_name: 'redis-default'
|
1539
1565
|
|
1540
|
-
# The configuration matching a given unix socket
|
1566
|
+
# The configuration matching a given unix socket.
|
1541
1567
|
c.use :redis, describes: { url: 'unix://path/to/file' }, service_name: 'redis-unix'
|
1542
1568
|
|
1543
|
-
#
|
1544
|
-
|
1545
|
-
#
|
1569
|
+
# For network connections, only these fields are considered during matching:
|
1570
|
+
# scheme, host, port, db
|
1571
|
+
# Other fields are ignored.
|
1572
|
+
|
1573
|
+
# Network connection string
|
1574
|
+
c.use :redis, describes: 'redis://127.0.0.1:6379/0', service_name: 'redis-connection-string'
|
1575
|
+
c.use :redis, describes: { url: 'redis://127.0.0.1:6379/1' }, service_name: 'redis-connection-url'
|
1576
|
+
# Network client hash
|
1546
1577
|
c.use :redis, describes: { host: 'my-host.com', port: 6379, db: 1, scheme: 'redis' }, service_name: 'redis-connection-hash'
|
1547
1578
|
# Only a subset of the connection hash
|
1548
1579
|
c.use :redis, describes: { host: ENV['APP_CACHE_HOST'], port: ENV['APP_CACHE_PORT'] }, service_name: 'redis-cache'
|
@@ -1550,6 +1581,8 @@ Datadog.configure do |c|
|
|
1550
1581
|
end
|
1551
1582
|
```
|
1552
1583
|
|
1584
|
+
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
1585
|
+
|
1553
1586
|
### Resque
|
1554
1587
|
|
1555
1588
|
The Resque integration uses Resque hooks that wraps the `perform` method.
|
@@ -1557,16 +1590,11 @@ The Resque integration uses Resque hooks that wraps the `perform` method.
|
|
1557
1590
|
To add tracing to a Resque job:
|
1558
1591
|
|
1559
1592
|
```ruby
|
1593
|
+
require 'resque'
|
1560
1594
|
require 'ddtrace'
|
1561
1595
|
|
1562
|
-
class MyJob
|
1563
|
-
def self.perform(*args)
|
1564
|
-
# do_something
|
1565
|
-
end
|
1566
|
-
end
|
1567
|
-
|
1568
1596
|
Datadog.configure do |c|
|
1569
|
-
c.use :resque, options
|
1597
|
+
c.use :resque, **options
|
1570
1598
|
end
|
1571
1599
|
```
|
1572
1600
|
|
@@ -1574,10 +1602,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1574
1602
|
|
1575
1603
|
| Key | Description | Default |
|
1576
1604
|
| --- | ----------- | ------- |
|
1577
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1578
1605
|
| `service_name` | Service name used for `resque` instrumentation | `'resque'` |
|
1579
|
-
| `workers` | An array including all worker classes you want to trace (e.g. `[MyJob]`) | `[]` |
|
1580
1606
|
| `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? }` |
|
1607
|
+
| `workers` | **[DEPRECATED]** Limits instrumented worker classes to only the ones specified in an array (e.g. `[MyJob]`). If not provided, instruments all workers. | `nil` |
|
1581
1608
|
|
1582
1609
|
### Rest Client
|
1583
1610
|
|
@@ -1596,7 +1623,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1596
1623
|
|
1597
1624
|
| Key | Description | Default |
|
1598
1625
|
| --- | ----------- | ------- |
|
1599
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1600
1626
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1601
1627
|
| `service_name` | Service name for `rest_client` instrumentation. | `'rest_client'` |
|
1602
1628
|
|
@@ -1654,11 +1680,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1654
1680
|
|
1655
1681
|
| Key | Description | Default |
|
1656
1682
|
| --- | ----------- | ------- |
|
1657
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1658
1683
|
| `service_name` | Service name for `sequel` instrumentation | Name of database adapter (e.g. `'mysql2'`) |
|
1659
1684
|
|
1660
|
-
Only Ruby 2.0+ is supported.
|
1661
|
-
|
1662
1685
|
**Configuring databases to use different settings**
|
1663
1686
|
|
1664
1687
|
If you use multiple databases with Sequel, you can give each of them different settings by configuring their respective `Sequel::Database` objects:
|
@@ -1690,8 +1713,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1690
1713
|
|
1691
1714
|
| Key | Description | Default |
|
1692
1715
|
| --- | ----------- | ------- |
|
1693
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1694
1716
|
| `service_name` | Service name used for `shoryuken` instrumentation | `'shoryuken'` |
|
1717
|
+
| `tag_body` | Tag spans with the SQS message body `true` or `false` | `false` |
|
1695
1718
|
| `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? }` |
|
1696
1719
|
|
1697
1720
|
### Sidekiq
|
@@ -1712,7 +1735,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1712
1735
|
|
1713
1736
|
| Key | Description | Default |
|
1714
1737
|
| --- | ----------- | ------- |
|
1715
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1716
1738
|
| `client_service_name` | Service name used for client-side `sidekiq` instrumentation | `'sidekiq-client'` |
|
1717
1739
|
| `service_name` | Service name used for server-side `sidekiq` instrumentation | `'sidekiq'` |
|
1718
1740
|
| `tag_args` | Enable tagging of job arguments. `true` for on, `false` for off. | `false` |
|
@@ -1776,7 +1798,6 @@ Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before y
|
|
1776
1798
|
|
1777
1799
|
| Key | Description | Default |
|
1778
1800
|
| --- | ----------- | ------- |
|
1779
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
1780
1801
|
| `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` |
|
1781
1802
|
| `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'] }` |
|
1782
1803
|
| `resource_script_names` | Prepend resource names with script name | `false` |
|
@@ -1800,7 +1821,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1800
1821
|
|
1801
1822
|
| Key | Description | Default |
|
1802
1823
|
| --- | ----------- | ------- |
|
1803
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1804
1824
|
| `enabled` | Defines whether Sneakers should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1805
1825
|
| `service_name` | Service name used for `sneakers` instrumentation | `'sneakers'` |
|
1806
1826
|
| `tag_body` | Enable tagging of job message. `true` for on, `false` for off. | `false` |
|
@@ -1825,7 +1845,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1825
1845
|
|
1826
1846
|
| Key | Description | Default |
|
1827
1847
|
| --- | ----------- | ------- |
|
1828
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1829
1848
|
| `service_name` | Service name used for `sucker_punch` instrumentation | `'sucker_punch'` |
|
1830
1849
|
|
1831
1850
|
## Advanced configuration
|
@@ -1841,13 +1860,20 @@ Datadog.configure do |c|
|
|
1841
1860
|
c.tracer.enabled = true
|
1842
1861
|
c.tracer.hostname = 'my-agent'
|
1843
1862
|
c.tracer.port = 8126
|
1844
|
-
|
1863
|
+
|
1864
|
+
# Ensure all traces are ingested by Datadog
|
1865
|
+
c.sampling.default_rate = 1.0 # Recommended
|
1866
|
+
c.sampling.rate_limit = 200
|
1867
|
+
# or provide a custom implementation (overrides c.sampling settings)
|
1845
1868
|
c.tracer.sampler = Datadog::AllSampler.new
|
1846
1869
|
|
1847
|
-
#
|
1870
|
+
# Breaks down very large traces into smaller batches
|
1871
|
+
c.tracer.partial_flush.enabled = false
|
1872
|
+
|
1873
|
+
# You can specify your own tracer
|
1848
1874
|
c.tracer.instance = Datadog::Tracer.new
|
1849
1875
|
|
1850
|
-
# To enable debug mode
|
1876
|
+
# To enable debug mode
|
1851
1877
|
c.diagnostics.debug = true
|
1852
1878
|
end
|
1853
1879
|
```
|
@@ -1859,6 +1885,8 @@ Available options are:
|
|
1859
1885
|
- `instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
|
1860
1886
|
- `partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
|
1861
1887
|
- `port`: set the port the trace agent is listening on.
|
1888
|
+
- `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.
|
1889
|
+
- `sampling.rate_limit`: maximum number of traces per second to sample. Defaults to 100 per second.
|
1862
1890
|
- `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
1863
1891
|
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
1864
1892
|
- `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
|
@@ -1916,13 +1944,22 @@ Other Environment Variables:
|
|
1916
1944
|
|
1917
1945
|
- `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`.
|
1918
1946
|
- `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.
|
1919
|
-
- `
|
1920
|
-
- `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`.
|
1947
|
+
- `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.
|
1921
1948
|
- `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`.
|
1922
1949
|
|
1923
1950
|
### Sampling
|
1924
1951
|
|
1925
|
-
|
1952
|
+
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/).
|
1953
|
+
|
1954
|
+
We recommend setting the environment variable `DD_TRACE_SAMPLE_RATE=1.0` in all new applications using `ddtrace`.
|
1955
|
+
|
1956
|
+
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/).
|
1957
|
+
|
1958
|
+
#### Application-side sampling
|
1959
|
+
|
1960
|
+
While the trace agent can sample traces to reduce bandwidth usage, application-side sampling reduces the performance overhead.
|
1961
|
+
|
1962
|
+
This will **reduce visibility and is not recommended**. See [DD_TRACE_SAMPLE_RATE](#environment-variables) for the recommended sampling approach.
|
1926
1963
|
|
1927
1964
|
`Datadog::RateSampler` samples a ratio of the traces. For example:
|
1928
1965
|
|
@@ -2080,13 +2117,14 @@ For more details on how to activate distributed tracing for integrations, see th
|
|
2080
2117
|
|
2081
2118
|
- [Excon](#excon)
|
2082
2119
|
- [Faraday](#faraday)
|
2083
|
-
- [Rest Client](#
|
2120
|
+
- [Rest Client](#rest-client)
|
2084
2121
|
- [Net/HTTP](#nethttp)
|
2085
2122
|
- [Rack](#rack)
|
2086
2123
|
- [Rails](#rails)
|
2087
2124
|
- [Sinatra](#sinatra)
|
2088
2125
|
- [http.rb](#http-rb)
|
2089
2126
|
- [httpclient](#httpclient)
|
2127
|
+
- [httpx](#httpx)
|
2090
2128
|
|
2091
2129
|
**Using the HTTP propagator**
|
2092
2130
|
|
@@ -2202,7 +2240,7 @@ In many cases, such as logging, it may be useful to correlate trace IDs to other
|
|
2202
2240
|
|
2203
2241
|
##### Automatic
|
2204
2242
|
|
2205
|
-
For Rails applications using the default logger (`ActiveSupport::TaggedLogging`) or `lograge`, you can automatically enable trace correlation injection by setting the `rails` instrumentation configuration option `log_injection` to `true` or by setting environment variable `DD_LOGS_INJECTION=true`:
|
2243
|
+
For Rails applications using the default logger (`ActiveSupport::TaggedLogging`), `semantic_logger`, or `lograge`, you can automatically enable trace correlation injection by setting the `rails` instrumentation configuration option `log_injection` to `true` or by setting environment variable `DD_LOGS_INJECTION=true`:
|
2206
2244
|
|
2207
2245
|
```ruby
|
2208
2246
|
# config/initializers/datadog.rb
|
@@ -2213,8 +2251,6 @@ Datadog.configure do |c|
|
|
2213
2251
|
end
|
2214
2252
|
```
|
2215
2253
|
|
2216
|
-
_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.
|
2217
|
-
|
2218
2254
|
##### Manual (Lograge)
|
2219
2255
|
|
2220
2256
|
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.
|
@@ -2374,7 +2410,7 @@ The tracer and its integrations can produce some additional metrics that can pro
|
|
2374
2410
|
To configure your application for metrics collection:
|
2375
2411
|
|
2376
2412
|
1. [Configure your Datadog agent for StatsD](https://docs.datadoghq.com/developers/dogstatsd/#setup)
|
2377
|
-
2. Add `gem 'dogstatsd-ruby'` to your Gemfile
|
2413
|
+
2. Add `gem 'dogstatsd-ruby', '~> 5.2'` to your Gemfile
|
2378
2414
|
|
2379
2415
|
#### For application runtime
|
2380
2416
|
|
@@ -2444,3 +2480,49 @@ However, additional instrumentation provided by Datadog can be activated alongsi
|
|
2444
2480
|
| `OpenTracing::FORMAT_TEXT_MAP` | Yes | |
|
2445
2481
|
| `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. |
|
2446
2482
|
| `OpenTracing::FORMAT_BINARY` | No | |
|
2483
|
+
|
2484
|
+
### Profiling
|
2485
|
+
|
2486
|
+
*Currently available as BETA feature.*
|
2487
|
+
|
2488
|
+
`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.
|
2489
|
+
|
2490
|
+
**Setup**
|
2491
|
+
|
2492
|
+
To get started with profiling, follow the [Profiler Getting Started Guide](https://docs.datadoghq.com/tracing/profiler/getting_started/?code-lang=ruby).
|
2493
|
+
|
2494
|
+
#### Profiling Resque jobs
|
2495
|
+
|
2496
|
+
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.
|
2497
|
+
|
2498
|
+
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.
|
2499
|
+
|
2500
|
+
## Known issues and suggested configurations
|
2501
|
+
|
2502
|
+
### Payload too large
|
2503
|
+
|
2504
|
+
By default, Datadog limits the size of trace payloads to prevent memory overhead within instrumented applications. As a result, traces containing thousands of operations may not be sent to Datadog.
|
2505
|
+
|
2506
|
+
If traces are missing, enable [debug mode](#tracer-settings) to check if messages containing `"Dropping trace. Payload too large"` are logged.
|
2507
|
+
|
2508
|
+
Since debug mode is verbose, Datadog does not recommend leaving this enabled or enabling this in production. Disable it after confirming. You can inspect the [Datadog Agent logs](https://docs.datadoghq.com/agent/guide/agent-log-files/) for similar messages.
|
2509
|
+
|
2510
|
+
If you have confirmed that traces are dropped due to large payloads, then enable the [partial_flush](#tracer-settings) setting to break down large traces into smaller chunks.
|
2511
|
+
|
2512
|
+
### Stack level too deep
|
2513
|
+
|
2514
|
+
Datadog tracing collects trace data by adding instrumentation into other common libraries (e.g. Rails, Rack, etc.) Some libraries provide APIs to add this instrumentation, but some do not. In order to add instrumentation into libraries lacking an instrumentation API, Datadog uses a technique called "monkey-patching" to modify the code of that library.
|
2515
|
+
|
2516
|
+
In Ruby version 1.9.3 and earlier, "monkey-patching" often involved the use of [`alias_method`](https://ruby-doc.org/core-3.0.0/Module.html#method-i-alias_method), also known as *method rewriting*, to destructively replace existing Ruby methods. However, this practice would often create conflicts & errors if two libraries attempted to "rewrite" the same method. (e.g. two different APM packages trying to instrument the same method.)
|
2517
|
+
|
2518
|
+
In Ruby 2.0, the [`Module#prepend`](https://ruby-doc.org/core-3.0.0/Module.html#method-i-prepend) feature was introduced. This feature avoids destructive method rewriting and allows multiple "monkey patches" on the same method. Consequently, it has become the safest, preferred means to "monkey patch" code.
|
2519
|
+
|
2520
|
+
Datadog instrumentation almost exclusively uses the `Module#prepend` feature to add instrumentation non-destructively. However, some libraries (typically those supporting Ruby < 2.0) still use `alias_method` which can create conflicts with Datadog instrumentation, often resulting in `SystemStackError` or `stack level too deep` errors.
|
2521
|
+
|
2522
|
+
As the implementation of `alias_method` exists within those libraries, Datadog generally cannot fix them. However, some libraries have known workarounds:
|
2523
|
+
|
2524
|
+
* `rack-mini-profiler`: [Net::HTTP stack level too deep errors](https://github.com/MiniProfiler/rack-mini-profiler#nethttp-stack-level-too-deep-errors).
|
2525
|
+
|
2526
|
+
For libraries without a known workaround, consider removing the library using `alias` or `Module#alias_method` or separating libraries into different environments for testing.
|
2527
|
+
|
2528
|
+
For any further questions or to report an occurence of this issue, please [reach out to Datadog support](https://docs.datadoghq.com/help)
|