ddtrace 0.48.0 → 0.49.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +209 -2
- data/.dockerignore +0 -1
- data/.gitignore +2 -1
- data/.rubocop.yml +13 -1
- data/Appraisals +10 -0
- data/CHANGELOG.md +32 -0
- data/Rakefile +10 -0
- data/benchmarks/profiler_sample_loop.rb +69 -0
- data/ddtrace.gemspec +1 -1
- data/docker-compose.yml +0 -24
- data/docs/GettingStarted.md +1 -1
- data/gemfiles/jruby_9.2.0.0_contrib.gemfile +79 -0
- data/gemfiles/jruby_9.2.0.0_contrib.gemfile.lock +1518 -0
- data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile.lock +157 -0
- data/gemfiles/jruby_9.2.0.0_core_old.gemfile +34 -0
- data/gemfiles/jruby_9.2.0.0_core_old.gemfile.lock +153 -0
- data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile.lock +174 -0
- data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile +35 -0
- data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile.lock +279 -0
- data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile.lock +297 -0
- data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile.lock +295 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile.lock +180 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile +36 -0
- data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile.lock +180 -0
- data/gemfiles/jruby_9.2.11.1_contrib.gemfile +79 -0
- data/gemfiles/jruby_9.2.11.1_contrib.gemfile.lock +1518 -0
- data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile.lock +157 -0
- data/gemfiles/jruby_9.2.11.1_core_old.gemfile +34 -0
- data/gemfiles/jruby_9.2.11.1_core_old.gemfile.lock +153 -0
- data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile.lock +174 -0
- data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile +35 -0
- data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile.lock +206 -0
- data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile.lock +271 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile.lock +273 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile.lock +279 -0
- data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile.lock +290 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile.lock +292 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile.lock +297 -0
- data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile +40 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile.lock +287 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile +41 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile.lock +289 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile +42 -0
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile.lock +295 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile +36 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile.lock +180 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile +36 -0
- data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile.lock +180 -0
- data/gemfiles/ruby_2.0.0_contrib_old.gemfile +64 -0
- data/gemfiles/ruby_2.0.0_contrib_old.gemfile.lock +290 -0
- data/gemfiles/ruby_2.0.0_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.0.0_core_old.gemfile.lock +118 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile.lock +196 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile.lock +205 -0
- data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile +43 -0
- data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile.lock +217 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile.lock +204 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile.lock +223 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile.lock +213 -0
- data/gemfiles/ruby_2.1.10_contrib_old.gemfile +66 -0
- data/gemfiles/ruby_2.1.10_contrib_old.gemfile.lock +305 -0
- data/gemfiles/ruby_2.1.10_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.1.10_core_old.gemfile.lock +118 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile.lock +196 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile.lock +205 -0
- data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile.lock +215 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile.lock +204 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile.lock +223 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile.lock +213 -0
- data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile.lock +218 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile.lock +218 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile.lock +237 -0
- data/gemfiles/ruby_2.2.10_contrib.gemfile +73 -0
- data/gemfiles/ruby_2.2.10_contrib.gemfile.lock +1450 -0
- data/gemfiles/ruby_2.2.10_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.2.10_core_old.gemfile.lock +118 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile.lock +196 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile.lock +205 -0
- data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile.lock +212 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile.lock +204 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile.lock +223 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile.lock +213 -0
- data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile.lock +218 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile.lock +218 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile.lock +237 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile.lock +229 -0
- data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile.lock +234 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile.lock +234 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile.lock +236 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile +39 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile.lock +236 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile.lock +245 -0
- data/gemfiles/ruby_2.3.8_contrib.gemfile +73 -0
- data/gemfiles/ruby_2.3.8_contrib.gemfile.lock +1459 -0
- data/gemfiles/ruby_2.3.8_contrib_old.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_contrib_old.gemfile.lock +127 -0
- data/gemfiles/ruby_2.3.8_core_old.gemfile +33 -0
- data/gemfiles/ruby_2.3.8_core_old.gemfile.lock +123 -0
- data/gemfiles/ruby_2.3.8_cucumber3.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_cucumber3.gemfile.lock +144 -0
- data/gemfiles/ruby_2.3.8_cucumber4.gemfile +34 -0
- data/gemfiles/ruby_2.3.8_cucumber4.gemfile.lock +174 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile.lock +201 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile.lock +210 -0
- data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile +41 -0
- data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile.lock +217 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile.lock +209 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile +41 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile.lock +228 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile.lock +218 -0
- data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile.lock +223 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile.lock +223 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile.lock +242 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile +40 -0
- data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile.lock +234 -0
- data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile +37 -0
- data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile.lock +234 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile +37 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile.lock +234 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile.lock +236 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile +38 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile.lock +236 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile +39 -0
- data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile.lock +245 -0
- data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile +35 -0
- data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile.lock +150 -0
- data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile +35 -0
- data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile.lock +150 -0
- data/gemfiles/ruby_2.4.6_contrib.gemfile +78 -0
- data/gemfiles/ruby_2.4.6_contrib.gemfile.lock +1513 -0
- data/gemfiles/ruby_2.4.6_contrib_old.gemfile +38 -0
- data/gemfiles/ruby_2.4.6_contrib_old.gemfile.lock +155 -0
- data/gemfiles/ruby_2.4.6_core_old.gemfile +37 -0
- data/gemfiles/ruby_2.4.6_core_old.gemfile.lock +151 -0
- data/gemfiles/ruby_2.4.6_cucumber3.gemfile +38 -0
- data/gemfiles/ruby_2.4.6_cucumber3.gemfile.lock +172 -0
- data/gemfiles/ruby_2.4.6_cucumber4.gemfile +38 -0
- data/gemfiles/ruby_2.4.6_cucumber4.gemfile.lock +202 -0
- data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile +41 -0
- data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile.lock +262 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile +41 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile.lock +262 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile +42 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile.lock +264 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile +42 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile.lock +264 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile.lock +273 -0
- data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile +39 -0
- data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile.lock +178 -0
- data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile +39 -0
- data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile.lock +178 -0
- data/gemfiles/ruby_2.5.6_contrib.gemfile +83 -0
- data/gemfiles/ruby_2.5.6_contrib.gemfile.lock +1526 -0
- data/gemfiles/ruby_2.5.6_contrib_old.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_contrib_old.gemfile.lock +165 -0
- data/gemfiles/ruby_2.5.6_core_old.gemfile +38 -0
- data/gemfiles/ruby_2.5.6_core_old.gemfile.lock +161 -0
- data/gemfiles/ruby_2.5.6_cucumber3.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_cucumber3.gemfile.lock +182 -0
- data/gemfiles/ruby_2.5.6_cucumber4.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_cucumber4.gemfile.lock +214 -0
- data/gemfiles/ruby_2.5.6_cucumber5.gemfile +39 -0
- data/gemfiles/ruby_2.5.6_cucumber5.gemfile.lock +214 -0
- data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile.lock +278 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile +46 -0
- data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile +44 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile +45 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile +46 -0
- data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile +40 -0
- data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile.lock +188 -0
- data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile +40 -0
- data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile.lock +188 -0
- data/gemfiles/ruby_2.6.4_contrib.gemfile +79 -0
- data/gemfiles/ruby_2.6.4_contrib.gemfile.lock +1524 -0
- data/gemfiles/ruby_2.6.4_contrib_old.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_contrib_old.gemfile.lock +167 -0
- data/gemfiles/ruby_2.6.4_core_old.gemfile +38 -0
- data/gemfiles/ruby_2.6.4_core_old.gemfile.lock +163 -0
- data/gemfiles/ruby_2.6.4_cucumber3.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_cucumber3.gemfile.lock +184 -0
- data/gemfiles/ruby_2.6.4_cucumber4.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_cucumber4.gemfile.lock +216 -0
- data/gemfiles/ruby_2.6.4_cucumber5.gemfile +39 -0
- data/gemfiles/ruby_2.6.4_cucumber5.gemfile.lock +216 -0
- data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile.lock +278 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile.lock +294 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile +43 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile +40 -0
- data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile.lock +190 -0
- data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile +40 -0
- data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile.lock +190 -0
- data/gemfiles/ruby_2.7.0_contrib.gemfile +78 -0
- data/gemfiles/ruby_2.7.0_contrib.gemfile.lock +1523 -0
- data/gemfiles/ruby_2.7.0_contrib_old.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_contrib_old.gemfile.lock +167 -0
- data/gemfiles/ruby_2.7.0_core_old.gemfile +38 -0
- data/gemfiles/ruby_2.7.0_core_old.gemfile.lock +163 -0
- data/gemfiles/ruby_2.7.0_cucumber3.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_cucumber3.gemfile.lock +184 -0
- data/gemfiles/ruby_2.7.0_cucumber4.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_cucumber4.gemfile.lock +216 -0
- data/gemfiles/ruby_2.7.0_cucumber5.gemfile +39 -0
- data/gemfiles/ruby_2.7.0_cucumber5.gemfile.lock +216 -0
- data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile.lock +276 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile.lock +276 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile.lock +284 -0
- data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile +43 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile +43 -0
- data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile.lock +292 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile +42 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile.lock +292 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile.lock +311 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile.lock +311 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile.lock +300 -0
- data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile +40 -0
- data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile.lock +190 -0
- data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile +40 -0
- data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile.lock +190 -0
- data/gemfiles/ruby_3.0.0_contrib.gemfile +77 -0
- data/gemfiles/ruby_3.0.0_contrib.gemfile.lock +1534 -0
- data/gemfiles/ruby_3.0.0_core_old.gemfile +39 -0
- data/gemfiles/ruby_3.0.0_core_old.gemfile.lock +165 -0
- data/gemfiles/ruby_3.0.0_cucumber3.gemfile +40 -0
- data/gemfiles/ruby_3.0.0_cucumber3.gemfile.lock +186 -0
- data/gemfiles/ruby_3.0.0_cucumber4.gemfile +40 -0
- data/gemfiles/ruby_3.0.0_cucumber4.gemfile.lock +218 -0
- data/gemfiles/ruby_3.0.0_cucumber5.gemfile +40 -0
- data/gemfiles/ruby_3.0.0_cucumber5.gemfile.lock +218 -0
- data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile +43 -0
- data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile.lock +295 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile +43 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile.lock +295 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile +44 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile.lock +297 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile +44 -0
- data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile.lock +302 -0
- data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile +41 -0
- data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile.lock +192 -0
- data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile +41 -0
- data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile.lock +192 -0
- data/lib/ddtrace/configuration/agent_settings_resolver.rb +241 -0
- data/lib/ddtrace/configuration/components.rb +22 -29
- data/lib/ddtrace/configuration/settings.rb +16 -6
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/action_pack/utils.rb +1 -1
- data/lib/ddtrace/contrib/auto_instrument.rb +0 -1
- data/lib/ddtrace/contrib/sucker_punch/instrumentation.rb +4 -0
- data/lib/ddtrace/error.rb +85 -9
- data/lib/ddtrace/ext/profiling.rb +1 -0
- data/lib/ddtrace/ext/transport.rb +1 -0
- data/lib/ddtrace/profiling.rb +73 -22
- data/lib/ddtrace/profiling/collectors/stack.rb +12 -6
- data/lib/ddtrace/profiling/ext/cpu.rb +0 -2
- data/lib/ddtrace/profiling/ext/cthread.rb +54 -31
- data/lib/ddtrace/profiling/profiler.rb +2 -0
- data/lib/ddtrace/profiling/recorder.rb +8 -0
- data/lib/ddtrace/profiling/scheduler.rb +32 -11
- data/lib/ddtrace/profiling/transport/http.rb +51 -55
- data/lib/ddtrace/profiling/transport/http/api/endpoint.rb +1 -0
- data/lib/ddtrace/runtime/container.rb +16 -8
- data/lib/ddtrace/tracer.rb +7 -28
- data/lib/ddtrace/transport/http.rb +36 -33
- data/lib/ddtrace/version.rb +13 -1
- data/lib/ddtrace/workers/loop.rb +13 -1
- data/lib/ddtrace/workers/trace_writer.rb +2 -5
- data/lib/ddtrace/writer.rb +4 -1
- metadata +393 -6
@@ -0,0 +1,241 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
3
|
+
require 'ddtrace/ext/transport'
|
4
|
+
require 'ddtrace/configuration/settings'
|
5
|
+
|
6
|
+
module Datadog
|
7
|
+
module Configuration
|
8
|
+
# This class unifies all the different ways that users can configure how we talk to the agent.
|
9
|
+
#
|
10
|
+
# It has quite a lot of complexity, but this complexity just reflects the actual complexity we have around our
|
11
|
+
# configuration today. E.g., this is just all of the complexity regarding agent settings gathered together in a
|
12
|
+
# single place. As we deprecate more and more of the different ways that these things can be configured,
|
13
|
+
# this class will reflect that simplification as well.
|
14
|
+
#
|
15
|
+
# Whenever there is a conflict (different configurations are provided in different orders), it MUST warn the users
|
16
|
+
# about it and pick a value based on the following priority: code > environment variable > defaults.
|
17
|
+
#
|
18
|
+
# rubocop:disable Metrics/ClassLength
|
19
|
+
class AgentSettingsResolver
|
20
|
+
AgentSettings = \
|
21
|
+
Struct.new(
|
22
|
+
:ssl,
|
23
|
+
:hostname,
|
24
|
+
:port,
|
25
|
+
:timeout_seconds,
|
26
|
+
:deprecated_for_removal_transport_configuration_proc,
|
27
|
+
:deprecated_for_removal_transport_configuration_options
|
28
|
+
) do
|
29
|
+
def initialize(
|
30
|
+
# Hacky required kw args, we can get rid of this when we drop Ruby 2.0
|
31
|
+
ssl: raise(ArgumentError, 'missing keyword :ssl'),
|
32
|
+
hostname: raise(ArgumentError, 'missing keyword :hostname'),
|
33
|
+
port: raise(ArgumentError, 'missing keyword :port'),
|
34
|
+
timeout_seconds: raise(ArgumentError, 'missing keyword :timeout_seconds'),
|
35
|
+
deprecated_for_removal_transport_configuration_proc: \
|
36
|
+
raise(ArgumentError, 'missing keyword :deprecated_for_removal_transport_configuration_proc'),
|
37
|
+
deprecated_for_removal_transport_configuration_options: \
|
38
|
+
raise(ArgumentError, 'missing keyword :deprecated_for_removal_transport_configuration_options')
|
39
|
+
)
|
40
|
+
super(ssl, hostname, port, timeout_seconds, deprecated_for_removal_transport_configuration_proc, \
|
41
|
+
deprecated_for_removal_transport_configuration_options)
|
42
|
+
freeze
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.call(settings, logger: Datadog.logger)
|
47
|
+
new(settings, logger: logger).send(:call)
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
attr_reader \
|
53
|
+
:logger,
|
54
|
+
:settings
|
55
|
+
|
56
|
+
def initialize(settings, logger: Datadog.logger)
|
57
|
+
@settings = settings
|
58
|
+
@logger = logger
|
59
|
+
end
|
60
|
+
|
61
|
+
def call
|
62
|
+
AgentSettings.new(
|
63
|
+
ssl: ssl?,
|
64
|
+
hostname: hostname,
|
65
|
+
port: port,
|
66
|
+
timeout_seconds: timeout_seconds,
|
67
|
+
# NOTE: When provided, the deprecated_for_removal_transport_configuration_proc can override all
|
68
|
+
# values above (ssl, hostname, port, timeout), or even make them irrelevant (by using an unix socket or
|
69
|
+
# enabling test mode instead).
|
70
|
+
# That is the main reason why it is deprecated -- it's an opaque function that may set a bunch of settings
|
71
|
+
# that we know nothing of until we actually call it.
|
72
|
+
deprecated_for_removal_transport_configuration_proc: deprecated_for_removal_transport_configuration_proc,
|
73
|
+
deprecated_for_removal_transport_configuration_options: deprecated_for_removal_transport_configuration_options
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
def hostname
|
78
|
+
pick_from(
|
79
|
+
configurations_in_priority_order: [
|
80
|
+
DetectedConfiguration.new(
|
81
|
+
friendly_name: "'c.tracer.hostname'",
|
82
|
+
value: settings.tracer.hostname
|
83
|
+
),
|
84
|
+
DetectedConfiguration.new(
|
85
|
+
friendly_name: "#{Datadog::Ext::Transport::HTTP::ENV_DEFAULT_URL} environment variable",
|
86
|
+
value: parsed_url && parsed_url.hostname
|
87
|
+
),
|
88
|
+
DetectedConfiguration.new(
|
89
|
+
friendly_name: "#{Datadog::Ext::Transport::HTTP::ENV_DEFAULT_HOST} environment variable",
|
90
|
+
value: ENV[Datadog::Ext::Transport::HTTP::ENV_DEFAULT_HOST]
|
91
|
+
)
|
92
|
+
],
|
93
|
+
or_use_default: Datadog::Ext::Transport::HTTP::DEFAULT_HOST
|
94
|
+
)
|
95
|
+
end
|
96
|
+
|
97
|
+
def port
|
98
|
+
port_from_env = ENV[Datadog::Ext::Transport::HTTP::ENV_DEFAULT_PORT]
|
99
|
+
parsed_port_from_env =
|
100
|
+
if port_from_env
|
101
|
+
begin
|
102
|
+
Integer(port_from_env)
|
103
|
+
rescue ArgumentError
|
104
|
+
log_warning(
|
105
|
+
"Invalid value for #{Datadog::Ext::Transport::HTTP::ENV_DEFAULT_PORT} environment variable " \
|
106
|
+
"('#{port_from_env}'). Ignoring this configuration."
|
107
|
+
)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
pick_from(
|
112
|
+
configurations_in_priority_order: [
|
113
|
+
DetectedConfiguration.new(
|
114
|
+
friendly_name: '"c.tracer.port"',
|
115
|
+
value: settings.tracer.port
|
116
|
+
),
|
117
|
+
DetectedConfiguration.new(
|
118
|
+
friendly_name: "#{Datadog::Ext::Transport::HTTP::ENV_DEFAULT_URL} environment variable",
|
119
|
+
value: parsed_url && parsed_url.port
|
120
|
+
),
|
121
|
+
DetectedConfiguration.new(
|
122
|
+
friendly_name: "#{Datadog::Ext::Transport::HTTP::ENV_DEFAULT_PORT} environment variable",
|
123
|
+
value: parsed_port_from_env
|
124
|
+
)
|
125
|
+
],
|
126
|
+
or_use_default: Datadog::Ext::Transport::HTTP::DEFAULT_PORT
|
127
|
+
)
|
128
|
+
end
|
129
|
+
|
130
|
+
def ssl?
|
131
|
+
!parsed_url.nil? && parsed_url.scheme == 'https'
|
132
|
+
end
|
133
|
+
|
134
|
+
def timeout_seconds
|
135
|
+
Datadog::Ext::Transport::HTTP::DEFAULT_TIMEOUT_SECONDS
|
136
|
+
end
|
137
|
+
|
138
|
+
def deprecated_for_removal_transport_configuration_proc
|
139
|
+
settings.tracer.transport_options if settings.tracer.transport_options.is_a?(Proc)
|
140
|
+
end
|
141
|
+
|
142
|
+
def deprecated_for_removal_transport_configuration_options
|
143
|
+
options = settings.tracer.transport_options
|
144
|
+
|
145
|
+
if options.is_a?(Hash) && !options.empty?
|
146
|
+
log_warning(
|
147
|
+
'Configuring the tracer via a c.tracer.transport_options hash is deprecated for removal in a future ' \
|
148
|
+
"ddtrace version (c.tracer.transport_options contained '#{options.inspect}')."
|
149
|
+
)
|
150
|
+
|
151
|
+
options
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
def parsed_url
|
156
|
+
return @parsed_url if defined?(@parsed_url)
|
157
|
+
|
158
|
+
@parsed_url =
|
159
|
+
if unparsed_url_from_env
|
160
|
+
parsed = URI.parse(unparsed_url_from_env)
|
161
|
+
|
162
|
+
if %w[http https].include?(parsed.scheme)
|
163
|
+
parsed
|
164
|
+
else
|
165
|
+
log_warning(
|
166
|
+
"Invalid URI scheme '#{parsed.scheme}' for #{Datadog::Ext::Transport::HTTP::ENV_DEFAULT_URL} " \
|
167
|
+
"environment variable ('#{unparsed_url_from_env}'). " \
|
168
|
+
"Ignoring the contents of #{Datadog::Ext::Transport::HTTP::ENV_DEFAULT_URL}."
|
169
|
+
)
|
170
|
+
|
171
|
+
nil
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# NOTE: This should only be used AFTER parsing, via `#parsed_url`. The only other use-case where this can be used
|
177
|
+
# directly without parsing, is when displaying in warning messages, to show users what it actually contains.
|
178
|
+
def unparsed_url_from_env
|
179
|
+
@unparsed_url_from_env ||= ENV[Datadog::Ext::Transport::HTTP::ENV_DEFAULT_URL]
|
180
|
+
end
|
181
|
+
|
182
|
+
def pick_from(
|
183
|
+
# Hacky required kw args, we can get rid of this when we drop Ruby 2.0
|
184
|
+
configurations_in_priority_order: raise(ArgumentError, 'missing keyword :configurations'),
|
185
|
+
or_use_default: raise(ArgumentError, 'missing keyword :or_use_default')
|
186
|
+
)
|
187
|
+
detected_configurations_in_priority_order = configurations_in_priority_order.select(&:value?)
|
188
|
+
|
189
|
+
if detected_configurations_in_priority_order.any?
|
190
|
+
warn_if_configuration_mismatch(detected_configurations_in_priority_order)
|
191
|
+
|
192
|
+
# The configurations are listed in priority, so we only need to look at the first; if there's more than
|
193
|
+
# one, we emit a warning above
|
194
|
+
detected_configurations_in_priority_order.first.value
|
195
|
+
else
|
196
|
+
or_use_default
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
def warn_if_configuration_mismatch(detected_configurations_in_priority_order)
|
201
|
+
return unless detected_configurations_in_priority_order.map(&:value).uniq.size > 1
|
202
|
+
|
203
|
+
log_warning(
|
204
|
+
'Configuration mismatch: values differ between ' \
|
205
|
+
"#{detected_configurations_in_priority_order
|
206
|
+
.map { |config| "#{config.friendly_name} ('#{config.value}')" }.join(' and ')}" \
|
207
|
+
". Using '#{detected_configurations_in_priority_order.first.value}'."
|
208
|
+
)
|
209
|
+
end
|
210
|
+
|
211
|
+
def log_warning(message)
|
212
|
+
logger.warn(message) if logger
|
213
|
+
end
|
214
|
+
|
215
|
+
DetectedConfiguration = Struct.new(:friendly_name, :value) do
|
216
|
+
def initialize(
|
217
|
+
# Hacky required kw args, we can get rid of this when we drop Ruby 2.0
|
218
|
+
friendly_name: raise(ArgumentError, 'missing keyword :friendly_name'),
|
219
|
+
value: raise(ArgumentError, 'missing keyword :value')
|
220
|
+
)
|
221
|
+
super(friendly_name, value)
|
222
|
+
freeze
|
223
|
+
end
|
224
|
+
|
225
|
+
def value?
|
226
|
+
!value.nil?
|
227
|
+
end
|
228
|
+
end
|
229
|
+
private_constant :DetectedConfiguration
|
230
|
+
|
231
|
+
# NOTE: Due to... legacy reasons... Some classes like having an `AgentSettings` instance to fall back to.
|
232
|
+
# Because we generate this instance with an empty instance of `Settings`, the resulting `AgentSettings` below
|
233
|
+
# represents only settings specified via environment variables + the usual defaults.
|
234
|
+
#
|
235
|
+
# YOU DO NOT WANT TO USE THE BELOW INSTANCE ON ANY NEWLY WRITTEN CODE, as it ignores any settings specified
|
236
|
+
# by users via `Datadog.configure`.
|
237
|
+
ENVIRONMENT_AGENT_SETTINGS = call(Settings.new, logger: nil)
|
238
|
+
end
|
239
|
+
# rubocop:enable Metrics/ClassLength
|
240
|
+
end
|
241
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'ddtrace/configuration/agent_settings_resolver'
|
1
2
|
require 'ddtrace/diagnostics/health'
|
2
3
|
require 'ddtrace/logger'
|
3
4
|
require 'ddtrace/profiling'
|
@@ -9,7 +10,6 @@ module Datadog
|
|
9
10
|
module Configuration
|
10
11
|
# Global components for the trace library.
|
11
12
|
# rubocop:disable Layout/LineLength
|
12
|
-
# rubocop:disable Metrics/ClassLength
|
13
13
|
class Components
|
14
14
|
class << self
|
15
15
|
def build_health_metrics(settings)
|
@@ -45,7 +45,7 @@ module Datadog
|
|
45
45
|
Datadog::Workers::RuntimeMetrics.new(options)
|
46
46
|
end
|
47
47
|
|
48
|
-
def build_tracer(settings)
|
48
|
+
def build_tracer(settings, agent_settings)
|
49
49
|
# If a custom tracer has been provided, use it instead.
|
50
50
|
# Ignore all other options (they should already be configured.)
|
51
51
|
tracer = settings.tracer.instance
|
@@ -63,12 +63,12 @@ module Datadog
|
|
63
63
|
# tracer initialization for now. Just reconfigure using the
|
64
64
|
# existing mutable #configure function. Remove when these components
|
65
65
|
# are extracted.
|
66
|
-
tracer.configure(build_tracer_options(settings))
|
66
|
+
tracer.configure(agent_settings: agent_settings, **build_tracer_options(settings))
|
67
67
|
|
68
68
|
tracer
|
69
69
|
end
|
70
70
|
|
71
|
-
def build_profiler(settings)
|
71
|
+
def build_profiler(settings, agent_settings)
|
72
72
|
return unless Datadog::Profiling.supported? && settings.profiling.enabled
|
73
73
|
|
74
74
|
# Load extensions needed to support some of the Profiling features
|
@@ -78,7 +78,7 @@ module Datadog
|
|
78
78
|
|
79
79
|
recorder = build_profiler_recorder(settings)
|
80
80
|
collectors = build_profiler_collectors(settings, recorder)
|
81
|
-
exporters = build_profiler_exporters(settings)
|
81
|
+
exporters = build_profiler_exporters(settings, agent_settings)
|
82
82
|
scheduler = build_profiler_scheduler(settings, recorder, exporters)
|
83
83
|
|
84
84
|
Datadog::Profiler.new(collectors, scheduler)
|
@@ -97,13 +97,10 @@ module Datadog
|
|
97
97
|
settings = settings.tracer
|
98
98
|
|
99
99
|
{}.tap do |opts|
|
100
|
-
opts[:hostname] = settings.hostname unless settings.hostname.nil?
|
101
100
|
opts[:min_spans_before_partial_flush] = settings.partial_flush.min_spans_threshold unless settings.partial_flush.min_spans_threshold.nil?
|
102
101
|
opts[:partial_flush] = settings.partial_flush.enabled unless settings.partial_flush.enabled.nil?
|
103
|
-
opts[:port] = settings.port unless settings.port.nil?
|
104
102
|
opts[:priority_sampling] = settings.priority_sampling unless settings.priority_sampling.nil?
|
105
103
|
opts[:sampler] = settings.sampler unless settings.sampler.nil?
|
106
|
-
opts[:transport_options] = settings.transport_options
|
107
104
|
opts[:writer] = settings.writer unless settings.writer.nil?
|
108
105
|
opts[:writer_options] = settings.writer_options if settings.writer.nil?
|
109
106
|
end
|
@@ -126,22 +123,16 @@ module Datadog
|
|
126
123
|
]
|
127
124
|
end
|
128
125
|
|
129
|
-
def build_profiler_exporters(settings)
|
130
|
-
|
131
|
-
settings.profiling.exporter.
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
transport_options[:timeout] ||= settings.profiling.upload.timeout
|
140
|
-
Datadog::Profiling::Transport::HTTP.default(transport_options)
|
141
|
-
end
|
142
|
-
|
143
|
-
[Datadog::Profiling::Exporter.new(transport)]
|
144
|
-
end
|
126
|
+
def build_profiler_exporters(settings, agent_settings)
|
127
|
+
transport =
|
128
|
+
settings.profiling.exporter.transport || Datadog::Profiling::Transport::HTTP.default(
|
129
|
+
agent_settings: agent_settings,
|
130
|
+
site: settings.site,
|
131
|
+
api_key: settings.api_key,
|
132
|
+
profiling_upload_timeout_seconds: settings.profiling.upload.timeout_seconds
|
133
|
+
)
|
134
|
+
|
135
|
+
[Datadog::Profiling::Exporter.new(transport)]
|
145
136
|
end
|
146
137
|
|
147
138
|
def build_profiler_scheduler(settings, recorder, exporters)
|
@@ -160,11 +151,13 @@ module Datadog
|
|
160
151
|
# Logger
|
161
152
|
@logger = self.class.build_logger(settings)
|
162
153
|
|
154
|
+
agent_settings = AgentSettingsResolver.call(settings, logger: @logger)
|
155
|
+
|
163
156
|
# Tracer
|
164
|
-
@tracer = self.class.build_tracer(settings)
|
157
|
+
@tracer = self.class.build_tracer(settings, agent_settings)
|
165
158
|
|
166
159
|
# Profiler
|
167
|
-
@profiler = self.class.build_profiler(settings)
|
160
|
+
@profiler = self.class.build_profiler(settings, agent_settings)
|
168
161
|
|
169
162
|
# Runtime metrics
|
170
163
|
@runtime_metrics = self.class.build_runtime_metrics_worker(settings)
|
@@ -180,9 +173,9 @@ module Datadog
|
|
180
173
|
@logger.debug('Profiling started')
|
181
174
|
profiler.start
|
182
175
|
else
|
183
|
-
# Display a warning for users who expected profiling to
|
184
|
-
|
185
|
-
logger.warn("Profiling was
|
176
|
+
# Display a warning for users who expected profiling to be enabled
|
177
|
+
unsupported_reason = Datadog::Profiling.unsupported_reason
|
178
|
+
logger.warn("Profiling was requested but is not supported, profiling disabled: #{unsupported_reason}")
|
186
179
|
end
|
187
180
|
else
|
188
181
|
@logger.debug('Profiling is disabled')
|
@@ -14,9 +14,6 @@ module Datadog
|
|
14
14
|
class Settings
|
15
15
|
include Base
|
16
16
|
|
17
|
-
#
|
18
|
-
# Configuration options
|
19
|
-
#
|
20
17
|
settings :analytics do
|
21
18
|
option :enabled do |o|
|
22
19
|
o.default { env_to_bool(Ext::Analytics::ENV_TRACE_ANALYTICS_ENABLED, nil) }
|
@@ -116,9 +113,22 @@ module Datadog
|
|
116
113
|
end
|
117
114
|
|
118
115
|
settings :exporter do
|
119
|
-
option :instances
|
120
116
|
option :transport
|
121
|
-
option :transport_options
|
117
|
+
option :transport_options do |o|
|
118
|
+
o.setter do
|
119
|
+
# NOTE: As of April 2021 there may be a few profiler private beta customers with this setting, but since I'm
|
120
|
+
# marking this as deprecated before public beta, we can remove this for 1.0 without concern.
|
121
|
+
Datadog.logger.warn(
|
122
|
+
'Configuring the profiler c.profiling.exporter.transport_options is no longer needed, as the profiler ' \
|
123
|
+
'will reuse your existing global or tracer configuration. ' \
|
124
|
+
'This setting is deprecated for removal in a future ddtrace version ' \
|
125
|
+
'(1.0 or profiling GA, whichever comes first).'
|
126
|
+
)
|
127
|
+
nil
|
128
|
+
end
|
129
|
+
o.default { nil }
|
130
|
+
o.lazy
|
131
|
+
end
|
122
132
|
end
|
123
133
|
|
124
134
|
option :max_events, default: 32768
|
@@ -131,7 +141,7 @@ module Datadog
|
|
131
141
|
end
|
132
142
|
|
133
143
|
settings :upload do
|
134
|
-
option :
|
144
|
+
option :timeout_seconds do |o|
|
135
145
|
o.setter { |value| value.nil? ? 30.0 : value.to_f }
|
136
146
|
o.default { env_to_float(Ext::Profiling::ENV_UPLOAD_TIMEOUT, 30.0) }
|
137
147
|
o.lazy
|
@@ -61,7 +61,7 @@ module Datadog
|
|
61
61
|
# [christian] in some cases :status is not defined,
|
62
62
|
# rather than firing an error, simply acknowledge we don't know it.
|
63
63
|
status = payload.fetch(:status, '?').to_s
|
64
|
-
span.status = 1 if status.
|
64
|
+
span.status = 1 if status.start_with?('5')
|
65
65
|
elsif Utils.exception_is_error?(exception)
|
66
66
|
span.set_error(exception)
|
67
67
|
end
|
@@ -11,7 +11,7 @@ module Datadog
|
|
11
11
|
# You can add custom errors via `config.action_dispatch.rescue_responses`
|
12
12
|
status = ::ActionDispatch::ExceptionWrapper.status_code_for_exception(exception.class.name)
|
13
13
|
# Only 5XX exceptions are actually errors (e.g. don't flag 404s)
|
14
|
-
status.to_s.
|
14
|
+
status.to_s.start_with?('5')
|
15
15
|
else
|
16
16
|
true
|
17
17
|
end
|
@@ -10,6 +10,7 @@ module Datadog
|
|
10
10
|
module_function
|
11
11
|
|
12
12
|
# rubocop:disable Metrics/MethodLength
|
13
|
+
# rubocop:disable Metrics/AbcSize
|
13
14
|
def patch!
|
14
15
|
# rubocop:disable Metrics/BlockLength
|
15
16
|
::SuckerPunch::Job::ClassMethods.class_eval do
|
@@ -34,6 +35,7 @@ module Datadog
|
|
34
35
|
rescue => e
|
35
36
|
::SuckerPunch.__exception_handler.call(e, self, args)
|
36
37
|
end
|
38
|
+
ruby2_keywords :__run_perform if respond_to?(:ruby2_keywords, true)
|
37
39
|
|
38
40
|
alias_method :__perform_async, :perform_async
|
39
41
|
def perform_async(*args)
|
@@ -46,6 +48,7 @@ module Datadog
|
|
46
48
|
__perform_async(*args)
|
47
49
|
end
|
48
50
|
end
|
51
|
+
ruby2_keywords :perform_async if respond_to?(:ruby2_keywords, true)
|
49
52
|
|
50
53
|
alias_method :__perform_in, :perform_in
|
51
54
|
def perform_in(interval, *args)
|
@@ -59,6 +62,7 @@ module Datadog
|
|
59
62
|
__perform_in(interval, *args)
|
60
63
|
end
|
61
64
|
end
|
65
|
+
ruby2_keywords :perform_in if respond_to?(:ruby2_keywords, true)
|
62
66
|
|
63
67
|
private
|
64
68
|
|