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
@@ -16,6 +16,9 @@ module Datadog
|
|
16
16
|
event_classes.each do |event_class|
|
17
17
|
@buffers[event_class] = Profiling::Buffer.new(max_size)
|
18
18
|
end
|
19
|
+
|
20
|
+
# Event classes can only be added ahead of time
|
21
|
+
@buffers.freeze
|
19
22
|
end
|
20
23
|
|
21
24
|
def [](event_class)
|
@@ -59,6 +62,11 @@ module Datadog
|
|
59
62
|
)
|
60
63
|
end
|
61
64
|
|
65
|
+
# NOTE: Remember that if the recorder is being accessed by multiple threads, this is an inherently racy operation.
|
66
|
+
def empty?
|
67
|
+
@buffers.values.all?(&:empty?)
|
68
|
+
end
|
69
|
+
|
62
70
|
# Error when event of an unknown type is used with the Recorder
|
63
71
|
class UnknownEventError < StandardError
|
64
72
|
attr_reader :event_class
|
@@ -5,31 +5,36 @@ require 'ddtrace/workers/polling'
|
|
5
5
|
|
6
6
|
module Datadog
|
7
7
|
module Profiling
|
8
|
-
# Periodically (every
|
8
|
+
# Periodically (every DEFAULT_INTERVAL_SECONDS) takes data from the `Recorder` and pushes them to all configured
|
9
9
|
# `Exporter`s. Runs on its own background thread.
|
10
10
|
class Scheduler < Worker
|
11
11
|
include Workers::Polling
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
DEFAULT_INTERVAL_SECONDS = 60
|
14
|
+
MIN_INTERVAL_SECONDS = 0
|
15
15
|
|
16
16
|
attr_reader \
|
17
17
|
:exporters,
|
18
18
|
:recorder
|
19
19
|
|
20
|
-
def initialize(
|
20
|
+
def initialize(
|
21
|
+
recorder,
|
22
|
+
exporters,
|
23
|
+
fork_policy: Workers::Async::Thread::FORK_POLICY_RESTART, # Restart in forks by default
|
24
|
+
interval: DEFAULT_INTERVAL_SECONDS,
|
25
|
+
enabled: true
|
26
|
+
)
|
21
27
|
@recorder = recorder
|
22
28
|
@exporters = [exporters].flatten
|
23
29
|
|
24
30
|
# Workers::Async::Thread settings
|
25
|
-
|
26
|
-
self.fork_policy = options[:fork_policy] || Workers::Async::Thread::FORK_POLICY_RESTART
|
31
|
+
self.fork_policy = fork_policy
|
27
32
|
|
28
33
|
# Workers::IntervalLoop settings
|
29
|
-
self.loop_base_interval =
|
34
|
+
self.loop_base_interval = interval
|
30
35
|
|
31
36
|
# Workers::Polling settings
|
32
|
-
self.enabled =
|
37
|
+
self.enabled = enabled
|
33
38
|
end
|
34
39
|
|
35
40
|
def start
|
@@ -51,6 +56,21 @@ module Datadog
|
|
51
56
|
recorder.flush
|
52
57
|
end
|
53
58
|
|
59
|
+
# Configure Workers::IntervalLoop to not report immediately when scheduler starts
|
60
|
+
#
|
61
|
+
# When a scheduler gets created (or reset), we don't want it to immediately try to flush; we want it to wait for
|
62
|
+
# the loop wait time first. This avoids an issue where the scheduler reported a mostly-empty profile if the
|
63
|
+
# application just started but this thread took a bit longer so there's already samples in the recorder.
|
64
|
+
def loop_wait_before_first_iteration?
|
65
|
+
true
|
66
|
+
end
|
67
|
+
|
68
|
+
def work_pending?
|
69
|
+
!recorder.empty?
|
70
|
+
end
|
71
|
+
|
72
|
+
private
|
73
|
+
|
54
74
|
def flush_and_wait
|
55
75
|
run_time = Datadog::Utils::Time.measure do
|
56
76
|
flush_events
|
@@ -58,7 +78,7 @@ module Datadog
|
|
58
78
|
|
59
79
|
# Update wait time to try to wake consistently on time.
|
60
80
|
# Don't drop below the minimum interval.
|
61
|
-
self.loop_wait_time = [loop_base_interval - run_time,
|
81
|
+
self.loop_wait_time = [loop_base_interval - run_time, MIN_INTERVAL_SECONDS].max
|
62
82
|
end
|
63
83
|
|
64
84
|
def flush_events
|
@@ -71,8 +91,9 @@ module Datadog
|
|
71
91
|
begin
|
72
92
|
exporter.export(flush)
|
73
93
|
rescue StandardError => e
|
74
|
-
|
75
|
-
|
94
|
+
Datadog.logger.error(
|
95
|
+
"Unable to export #{flush.event_count} profiling events. Cause: #{e} Location: #{e.backtrace.first}"
|
96
|
+
)
|
76
97
|
end
|
77
98
|
end
|
78
99
|
end
|
@@ -13,7 +13,6 @@ require 'ddtrace/transport/http/adapters/unix_socket'
|
|
13
13
|
module Datadog
|
14
14
|
module Profiling
|
15
15
|
module Transport
|
16
|
-
# TODO: Consolidate with Dataog::Transport::HTTP
|
17
16
|
# Namespace for HTTP transport components
|
18
17
|
module HTTP
|
19
18
|
module_function
|
@@ -25,31 +24,32 @@ module Datadog
|
|
25
24
|
|
26
25
|
# Builds a new Transport::HTTP::Client with default settings
|
27
26
|
# Pass a block to override any settings.
|
28
|
-
def default(
|
27
|
+
def default(profiling_upload_timeout_seconds:, agent_settings: nil, site: nil, api_key: nil)
|
29
28
|
new do |transport|
|
30
29
|
transport.headers default_headers
|
31
30
|
|
32
31
|
# Configure adapter & API
|
33
|
-
if
|
34
|
-
configure_for_agentless(
|
32
|
+
if site && api_key
|
33
|
+
configure_for_agentless(
|
34
|
+
transport,
|
35
|
+
profiling_upload_timeout_seconds: profiling_upload_timeout_seconds,
|
36
|
+
site: site,
|
37
|
+
api_key: api_key
|
38
|
+
)
|
35
39
|
else
|
36
|
-
|
40
|
+
unless agent_settings
|
41
|
+
raise(
|
42
|
+
ArgumentError,
|
43
|
+
"Missing configuration for #{self}.default: All of `agent_settings`, `site` and `api_key` are nil"
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
configure_for_agent(
|
48
|
+
transport,
|
49
|
+
profiling_upload_timeout_seconds: profiling_upload_timeout_seconds,
|
50
|
+
agent_settings: agent_settings
|
51
|
+
)
|
37
52
|
end
|
38
|
-
|
39
|
-
# Additional options
|
40
|
-
unless options.empty?
|
41
|
-
# Change default API
|
42
|
-
transport.default_api = options[:api_version] if options.key?(:api_version)
|
43
|
-
|
44
|
-
# Add headers
|
45
|
-
transport.headers options[:headers] if options.key?(:headers)
|
46
|
-
|
47
|
-
# Execute on_build callback
|
48
|
-
options[:on_build].call(transport) if options[:on_build].is_a?(Proc)
|
49
|
-
end
|
50
|
-
|
51
|
-
# Call block to apply any customization, if provided.
|
52
|
-
yield(transport) if block_given?
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -66,56 +66,52 @@ module Datadog
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
def default_adapter
|
69
|
+
private_class_method def default_adapter
|
70
70
|
:net_http
|
71
71
|
end
|
72
72
|
|
73
|
-
def
|
74
|
-
ENV.fetch(Datadog::Ext::Transport::HTTP::ENV_DEFAULT_HOST, Datadog::Ext::Transport::HTTP::DEFAULT_HOST)
|
75
|
-
end
|
76
|
-
|
77
|
-
def default_port
|
78
|
-
ENV.fetch(Datadog::Ext::Transport::HTTP::ENV_DEFAULT_PORT, Datadog::Ext::Transport::HTTP::DEFAULT_PORT).to_i
|
79
|
-
end
|
80
|
-
|
81
|
-
def configure_for_agent(transport, options = {})
|
73
|
+
private_class_method def configure_for_agent(transport, profiling_upload_timeout_seconds:, agent_settings:)
|
82
74
|
apis = API.agent_defaults
|
83
75
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
76
|
+
transport.adapter(
|
77
|
+
default_adapter,
|
78
|
+
agent_settings.hostname,
|
79
|
+
agent_settings.port,
|
80
|
+
# We explictly use profiling_upload_timeout_seconds instead of agent_settings.timeout because profile
|
81
|
+
# uploads are bigger and thus we employ a separate configuration.
|
82
|
+
timeout: profiling_upload_timeout_seconds,
|
83
|
+
ssl: agent_settings.ssl
|
84
|
+
)
|
85
|
+
transport.api(API::V1, apis[API::V1], default: true)
|
86
|
+
|
87
|
+
# NOTE: This proc, when it exists, usually overrides the transport specified above
|
88
|
+
if agent_settings.deprecated_for_removal_transport_configuration_proc
|
89
|
+
agent_settings.deprecated_for_removal_transport_configuration_proc.call(transport)
|
90
|
+
end
|
93
91
|
end
|
94
92
|
|
95
|
-
def configure_for_agentless(transport,
|
93
|
+
private_class_method def configure_for_agentless(transport, profiling_upload_timeout_seconds:, site:, api_key:)
|
96
94
|
apis = API.api_defaults
|
97
95
|
|
98
|
-
site_uri = URI(format(Datadog::Ext::Profiling::Transport::HTTP::URI_TEMPLATE_DD_API,
|
99
|
-
hostname =
|
100
|
-
port =
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
96
|
+
site_uri = URI(format(Datadog::Ext::Profiling::Transport::HTTP::URI_TEMPLATE_DD_API, site))
|
97
|
+
hostname = site_uri.host
|
98
|
+
port = site_uri.port
|
99
|
+
|
100
|
+
transport.adapter(
|
101
|
+
default_adapter,
|
102
|
+
hostname,
|
103
|
+
port,
|
104
|
+
timeout: profiling_upload_timeout_seconds,
|
105
|
+
ssl: site_uri.scheme == 'https'
|
106
|
+
)
|
107
|
+
transport.api(API::V1, apis[API::V1], default: true)
|
108
|
+
transport.headers(Datadog::Ext::Transport::HTTP::HEADER_DD_API_KEY => api_key)
|
109
109
|
end
|
110
110
|
|
111
111
|
# Add adapters to registry
|
112
112
|
Builder::REGISTRY.set(Datadog::Transport::HTTP::Adapters::Net, :net_http)
|
113
113
|
Builder::REGISTRY.set(Datadog::Transport::HTTP::Adapters::Test, :test)
|
114
114
|
Builder::REGISTRY.set(Datadog::Transport::HTTP::Adapters::UnixSocket, :unix)
|
115
|
-
|
116
|
-
private \
|
117
|
-
:configure_for_agent,
|
118
|
-
:configure_for_agentless
|
119
115
|
end
|
120
116
|
end
|
121
117
|
end
|
@@ -48,6 +48,7 @@ module Datadog
|
|
48
48
|
"#{FORM_FIELD_TAG_RUNTIME_ENGINE}:#{flush.runtime_engine}",
|
49
49
|
"#{FORM_FIELD_TAG_RUNTIME_PLATFORM}:#{flush.runtime_platform}",
|
50
50
|
"#{FORM_FIELD_TAG_RUNTIME_VERSION}:#{flush.runtime_version}",
|
51
|
+
"#{FORM_FIELD_TAG_PID}:#{Process.pid}",
|
51
52
|
"#{FORM_FIELD_TAG_PROFILER_VERSION}:#{flush.profiler_version}",
|
52
53
|
# NOTE: Redundant w/ 'runtime'; may want to remove this later.
|
53
54
|
"#{FORM_FIELD_TAG_LANGUAGE}:#{flush.language}",
|
@@ -8,9 +8,10 @@ module Datadog
|
|
8
8
|
UUID_PATTERN = '[0-9a-f]{8}[-_]?[0-9a-f]{4}[-_]?[0-9a-f]{4}[-_]?[0-9a-f]{4}[-_]?[0-9a-f]{12}'.freeze
|
9
9
|
CONTAINER_PATTERN = '[0-9a-f]{64}'.freeze
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
PLATFORM_REGEX = /(?<platform>.*?)(?:.slice)?$/.freeze
|
12
|
+
POD_REGEX = /(?<pod>(pod)?#{UUID_PATTERN})(?:.slice)?$/.freeze
|
13
|
+
CONTAINER_REGEX = /(?<container>#{UUID_PATTERN}|#{CONTAINER_PATTERN})(?:.scope)?$/.freeze
|
14
|
+
FARGATE_14_CONTAINER_REGEX = /(?<container>[0-9a-f]{32}-[0-9]{10})/.freeze
|
14
15
|
|
15
16
|
Descriptor = Struct.new(
|
16
17
|
:platform,
|
@@ -45,16 +46,23 @@ module Datadog
|
|
45
46
|
parts.shift # Remove leading empty part
|
46
47
|
|
47
48
|
# Read info from path
|
48
|
-
|
49
|
+
next if parts.empty?
|
50
|
+
|
51
|
+
platform = parts[0][PLATFORM_REGEX, :platform]
|
49
52
|
container_id, task_uid = nil
|
50
53
|
|
51
54
|
case parts.length
|
55
|
+
when 0..1
|
56
|
+
next
|
52
57
|
when 2
|
53
|
-
container_id = parts[-1][CONTAINER_REGEX]
|
58
|
+
container_id = parts[-1][CONTAINER_REGEX, :container] \
|
59
|
+
|| parts[-1][FARGATE_14_CONTAINER_REGEX, :container]
|
54
60
|
else
|
55
|
-
|
56
|
-
|
57
|
-
|
61
|
+
if (container_id = parts[-1][CONTAINER_REGEX, :container])
|
62
|
+
task_uid = parts[-2][POD_REGEX, :pod]
|
63
|
+
else
|
64
|
+
container_id = parts[-1][FARGATE_14_CONTAINER_REGEX, :container]
|
65
|
+
end
|
58
66
|
end
|
59
67
|
|
60
68
|
# If container ID wasn't found, ignore.
|
data/lib/ddtrace/tracer.rb
CHANGED
@@ -85,7 +85,7 @@ module Datadog
|
|
85
85
|
@provider = options.fetch(:context_provider, Datadog::DefaultContextProvider.new)
|
86
86
|
@sampler = options.fetch(:sampler, Datadog::AllSampler.new)
|
87
87
|
@tags = options.fetch(:tags, {})
|
88
|
-
@writer = options.fetch(:writer
|
88
|
+
@writer = options.fetch(:writer) { Datadog::Writer.new }
|
89
89
|
|
90
90
|
# Instance variables
|
91
91
|
@mutex = Mutex.new
|
@@ -391,20 +391,14 @@ module Datadog
|
|
391
391
|
|
392
392
|
# TODO: Move this kind of configuration building out of the tracer.
|
393
393
|
# Tracer should not have this kind of knowledge of writer.
|
394
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
395
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
396
|
-
# rubocop:disable Metrics/MethodLength
|
397
394
|
def configure_writer(options = {})
|
398
|
-
hostname = options.fetch(:hostname, nil)
|
399
|
-
port = options.fetch(:port, nil)
|
400
395
|
sampler = options.fetch(:sampler, nil)
|
401
396
|
priority_sampling = options.fetch(:priority_sampling, nil)
|
402
397
|
writer = options.fetch(:writer, nil)
|
403
|
-
|
398
|
+
agent_settings = options.fetch(:agent_settings, nil)
|
404
399
|
|
405
400
|
# Compile writer options
|
406
401
|
writer_options = options.fetch(:writer_options, {}).dup
|
407
|
-
rebuild_writer = !writer_options.empty?
|
408
402
|
|
409
403
|
# Re-build the sampler and writer if priority sampling is enabled,
|
410
404
|
# but neither are configured. Verify the sampler isn't already a
|
@@ -417,35 +411,20 @@ module Datadog
|
|
417
411
|
end
|
418
412
|
elsif priority_sampling != false && !@sampler.is_a?(PrioritySampler)
|
419
413
|
writer_options[:priority_sampler] = activate_priority_sampling!(@sampler)
|
420
|
-
rebuild_writer = true
|
421
414
|
elsif priority_sampling == false
|
422
415
|
deactivate_priority_sampling!(sampler)
|
423
|
-
rebuild_writer = true
|
424
416
|
elsif @sampler.is_a?(PrioritySampler)
|
425
417
|
# Make sure to add sampler to options if transport is rebuilt.
|
426
418
|
writer_options[:priority_sampler] = @sampler
|
427
419
|
end
|
428
420
|
|
429
|
-
|
430
|
-
if transport_options.is_a?(Proc)
|
431
|
-
transport_options = { on_build: transport_options }
|
432
|
-
rebuild_writer = true
|
433
|
-
end
|
434
|
-
|
435
|
-
if hostname || port
|
436
|
-
transport_options[:hostname] = hostname unless hostname.nil?
|
437
|
-
transport_options[:port] = port unless port.nil?
|
438
|
-
rebuild_writer = true
|
439
|
-
end
|
421
|
+
writer_options[:agent_settings] = agent_settings if agent_settings
|
440
422
|
|
441
|
-
|
423
|
+
# Make sure old writer is shut down before throwing away.
|
424
|
+
# Don't want additional threads running...
|
425
|
+
@writer.stop unless writer.nil?
|
442
426
|
|
443
|
-
|
444
|
-
# Make sure old writer is shut down before throwing away.
|
445
|
-
# Don't want additional threads running...
|
446
|
-
@writer.stop unless writer.nil?
|
447
|
-
@writer = writer || Writer.new(writer_options)
|
448
|
-
end
|
427
|
+
@writer = writer || Writer.new(writer_options)
|
449
428
|
end
|
450
429
|
|
451
430
|
def activate_priority_sampling!(base_sampler = nil)
|
@@ -25,11 +25,23 @@ module Datadog
|
|
25
25
|
|
26
26
|
# Builds a new Transport::HTTP::Client with default settings
|
27
27
|
# Pass a block to override any settings.
|
28
|
-
def default(
|
28
|
+
def default(agent_settings: Datadog::Configuration::AgentSettingsResolver::ENVIRONMENT_AGENT_SETTINGS, **options)
|
29
29
|
new do |transport|
|
30
|
-
transport.adapter
|
30
|
+
transport.adapter(
|
31
|
+
default_adapter,
|
32
|
+
agent_settings.hostname,
|
33
|
+
agent_settings.port,
|
34
|
+
timeout: agent_settings.timeout_seconds,
|
35
|
+
ssl: agent_settings.ssl
|
36
|
+
)
|
31
37
|
transport.headers default_headers
|
32
38
|
|
39
|
+
if agent_settings.deprecated_for_removal_transport_configuration_options
|
40
|
+
# The deprecated_for_removal_transport_configuration_options take precedence over any options the caller
|
41
|
+
# specifies
|
42
|
+
options = options.merge(**agent_settings.deprecated_for_removal_transport_configuration_options)
|
43
|
+
end
|
44
|
+
|
33
45
|
apis = API.defaults
|
34
46
|
|
35
47
|
transport.api API::V4, apis[API::V4], fallback: API::V3, default: true
|
@@ -38,29 +50,15 @@ module Datadog
|
|
38
50
|
|
39
51
|
# Apply any settings given by options
|
40
52
|
unless options.empty?
|
41
|
-
# Change hostname/port
|
42
|
-
if [:hostname, :port, :timeout, :ssl].any? { |key| options.key?(key) }
|
43
|
-
hostname = options[:hostname] || default_hostname
|
44
|
-
port = options[:port] || default_port
|
45
|
-
|
46
|
-
adapter_options = { timeout: 1 }
|
47
|
-
adapter_options[:timeout] = options[:timeout] if options.key?(:timeout)
|
48
|
-
adapter_options[:ssl] = options[:ssl] if options.key?(:ssl)
|
49
|
-
|
50
|
-
transport.adapter default_adapter, hostname, port, adapter_options
|
51
|
-
end
|
52
|
-
|
53
|
-
# Change default API
|
54
53
|
transport.default_api = options[:api_version] if options.key?(:api_version)
|
55
|
-
|
56
|
-
# Add headers
|
57
54
|
transport.headers options[:headers] if options.key?(:headers)
|
55
|
+
end
|
58
56
|
|
59
|
-
|
60
|
-
|
57
|
+
if agent_settings.deprecated_for_removal_transport_configuration_proc
|
58
|
+
agent_settings.deprecated_for_removal_transport_configuration_proc.call(transport)
|
61
59
|
end
|
62
60
|
|
63
|
-
# Call block to apply any customization, if provided
|
61
|
+
# Call block to apply any customization, if provided
|
64
62
|
yield(transport) if block_given?
|
65
63
|
end
|
66
64
|
end
|
@@ -82,26 +80,31 @@ module Datadog
|
|
82
80
|
:net_http
|
83
81
|
end
|
84
82
|
|
85
|
-
def default_hostname
|
86
|
-
|
83
|
+
def default_hostname(logger: Datadog.logger)
|
84
|
+
logger.warn(
|
85
|
+
'Deprecated for removal: Using #default_hostname for configuration is deprecated and will ' \
|
86
|
+
'be removed on a future ddtrace release.'
|
87
|
+
)
|
87
88
|
|
88
|
-
|
89
|
+
Datadog::Configuration::AgentSettingsResolver::ENVIRONMENT_AGENT_SETTINGS.hostname
|
89
90
|
end
|
90
91
|
|
91
|
-
def default_port
|
92
|
-
|
92
|
+
def default_port(logger: Datadog.logger)
|
93
|
+
logger.warn(
|
94
|
+
'Deprecated for removal: Using #default_hostname for configuration is deprecated and will ' \
|
95
|
+
'be removed on a future ddtrace release.'
|
96
|
+
)
|
93
97
|
|
94
|
-
|
98
|
+
Datadog::Configuration::AgentSettingsResolver::ENVIRONMENT_AGENT_SETTINGS.port
|
95
99
|
end
|
96
100
|
|
97
|
-
def default_url
|
98
|
-
|
101
|
+
def default_url(logger: Datadog.logger)
|
102
|
+
logger.warn(
|
103
|
+
'Deprecated for removal: Using #default_url for configuration is deprecated and will ' \
|
104
|
+
'be removed on a future ddtrace release.'
|
105
|
+
)
|
99
106
|
|
100
|
-
|
101
|
-
uri_parsed = URI.parse(url_env)
|
102
|
-
|
103
|
-
uri_parsed if %w[http https].include?(uri_parsed.scheme)
|
104
|
-
end
|
107
|
+
nil
|
105
108
|
end
|
106
109
|
|
107
110
|
# Add adapters to registry
|