ddtrace 0.49.0 → 0.50.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +49 -73
- data/.circleci/images/primary/{Dockerfile-truffleruby-21.0.0 → Dockerfile-truffleruby-21.1.0} +1 -1
- data/.gitignore +0 -2
- data/.rubocop.yml +0 -8
- data/.rubocop_todo.yml +7 -7
- data/Appraisals +1 -107
- data/CHANGELOG.md +47 -0
- data/Rakefile +278 -333
- data/benchmarks/data/profiler-submission-marshal.gz +0 -0
- data/benchmarks/profiler_submission.rb +93 -0
- data/ddtrace.gemspec +1 -1
- data/docker-compose.yml +4 -34
- data/docs/GettingStarted.md +24 -9
- data/gemfiles/jruby_9.2.0.0_contrib.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_core_old.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_contrib.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_core_old.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_contrib_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_contrib.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_contrib.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_contrib_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_cucumber3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_cucumber4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_contrib.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_contrib_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_cucumber3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_cucumber4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_contrib.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_contrib_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_cucumber3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_cucumber4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_cucumber5.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_contrib.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_contrib_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_cucumber3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_cucumber4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_cucumber5.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_contrib.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_contrib_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_cucumber3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_cucumber4.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_cucumber5.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_contrib.gemfile +1 -0
- data/gemfiles/ruby_3.0.0_contrib.gemfile.lock +7 -1
- data/gemfiles/ruby_3.0.0_core_old.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_cucumber3.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_cucumber4.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_cucumber5.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile.lock +1 -1
- data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile.lock +1 -1
- data/integration/apps/rack/README.md +2 -2
- data/integration/apps/rack/script/ci +2 -1
- data/integration/apps/rails-five/README.md +2 -2
- data/integration/apps/rails-five/script/ci +2 -1
- data/integration/apps/rspec/.dockerignore +1 -0
- data/integration/apps/rspec/.envrc.sample +1 -0
- data/integration/apps/rspec/.gitignore +2 -0
- data/integration/apps/rspec/.rspec +1 -0
- data/integration/apps/rspec/Dockerfile +25 -0
- data/integration/apps/rspec/Dockerfile-ci +11 -0
- data/integration/apps/rspec/Gemfile +14 -0
- data/integration/apps/rspec/README.md +70 -0
- data/integration/apps/rspec/agent.yaml +3 -0
- data/integration/apps/rspec/app/datadog.rb +13 -0
- data/integration/apps/rspec/app/fibonacci.rb +30 -0
- data/integration/apps/rspec/bin/run +20 -0
- data/integration/apps/rspec/bin/setup +17 -0
- data/integration/apps/rspec/bin/test +21 -0
- data/integration/apps/rspec/docker-compose.ci.yml +51 -0
- data/integration/apps/rspec/docker-compose.yml +63 -0
- data/integration/apps/rspec/script/build-images +37 -0
- data/integration/apps/rspec/script/ci +53 -0
- data/integration/apps/rspec/spec/fibonacci_spec.rb +16 -0
- data/integration/apps/rspec/spec/rspec_spec.rb +58 -0
- data/integration/apps/rspec/spec/spec_helper.rb +24 -0
- data/integration/apps/ruby/README.md +2 -2
- data/integration/apps/ruby/script/ci +2 -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 +303 -0
- data/lib/datadog/ci/ext/settings.rb +10 -0
- data/lib/datadog/ci/ext/test.rb +28 -0
- data/lib/datadog/ci/extensions.rb +17 -0
- data/lib/datadog/ci/test.rb +63 -0
- data/lib/ddtrace.rb +0 -2
- data/lib/ddtrace/configuration.rb +1 -23
- data/lib/ddtrace/configuration/agent_settings_resolver.rb +8 -19
- data/lib/ddtrace/configuration/base.rb +6 -9
- data/lib/ddtrace/configuration/components.rb +33 -10
- data/lib/ddtrace/configuration/options.rb +2 -2
- data/lib/ddtrace/configuration/settings.rb +49 -1
- data/lib/ddtrace/context.rb +17 -14
- data/lib/ddtrace/context_flush.rb +14 -2
- data/lib/ddtrace/contrib/action_cable/event.rb +4 -4
- data/lib/ddtrace/contrib/action_pack/action_controller/patcher.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/event.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 -1
- data/lib/ddtrace/contrib/aws/instrumentation.rb +29 -0
- data/lib/ddtrace/contrib/aws/patcher.rb +4 -0
- data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +1 -1
- data/lib/ddtrace/contrib/configurable.rb +1 -1
- data/lib/ddtrace/contrib/dalli/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/dalli/patcher.rb +1 -1
- 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 +3 -3
- 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 +1 -1
- data/lib/ddtrace/contrib/httpclient/patcher.rb +1 -1
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/httprb/patcher.rb +1 -1
- data/lib/ddtrace/contrib/integration.rb +3 -3
- data/lib/ddtrace/contrib/kafka/event.rb +2 -2
- 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 +2 -2
- data/lib/ddtrace/contrib/presto/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/presto/patcher.rb +1 -1
- data/lib/ddtrace/contrib/qless/patcher.rb +3 -5
- data/lib/ddtrace/contrib/racecar/event.rb +2 -2
- data/lib/ddtrace/contrib/rake/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/rake/patcher.rb +1 -1
- data/lib/ddtrace/contrib/registerable.rb +2 -2
- data/lib/ddtrace/contrib/resque/patcher.rb +1 -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/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/sinatra/patcher.rb +1 -1
- data/lib/ddtrace/contrib/sucker_punch/exception_handler.rb +4 -6
- data/lib/ddtrace/diagnostics/environment_logger.rb +2 -2
- data/lib/ddtrace/error.rb +52 -61
- data/lib/ddtrace/ext/app_types.rb +0 -1
- data/lib/ddtrace/ext/test.rb +2 -18
- data/lib/ddtrace/metrics.rb +28 -3
- data/lib/ddtrace/opentelemetry/extensions.rb +1 -1
- data/lib/ddtrace/opentracer.rb +20 -39
- data/lib/ddtrace/patcher.rb +2 -2
- data/lib/ddtrace/profiling.rb +11 -9
- data/lib/ddtrace/profiling/collectors/stack.rb +5 -2
- data/lib/ddtrace/profiling/encoding/profile.rb +6 -0
- data/lib/ddtrace/profiling/ext/cpu.rb +2 -2
- data/lib/ddtrace/profiling/ext/cthread.rb +9 -11
- data/lib/ddtrace/profiling/ext/forking.rb +7 -7
- data/lib/ddtrace/profiling/flush.rb +3 -1
- data/lib/ddtrace/profiling/pprof/builder.rb +26 -28
- data/lib/ddtrace/profiling/pprof/converter.rb +4 -0
- data/lib/ddtrace/profiling/pprof/stack_sample.rb +17 -1
- data/lib/ddtrace/profiling/pprof/template.rb +4 -0
- data/lib/ddtrace/profiling/scheduler.rb +12 -1
- data/lib/ddtrace/profiling/tasks/setup.rb +13 -13
- data/lib/ddtrace/profiling/transport/http/api/endpoint.rb +11 -2
- data/lib/ddtrace/runtime/metrics.rb +3 -5
- data/lib/ddtrace/sync_writer.rb +2 -1
- data/lib/ddtrace/tracer.rb +8 -4
- data/lib/ddtrace/transport/http/statistics.rb +2 -2
- data/lib/ddtrace/transport/http/traces.rb +3 -3
- data/lib/ddtrace/transport/io/traces.rb +1 -1
- data/lib/ddtrace/utils/forking.rb +1 -1
- data/lib/ddtrace/utils/object_set.rb +3 -5
- data/lib/ddtrace/utils/time.rb +1 -3
- data/lib/ddtrace/version.rb +2 -4
- data/lib/ddtrace/workers.rb +1 -1
- data/lib/ddtrace/workers/async.rb +3 -2
- data/lib/ddtrace/workers/loop.rb +1 -1
- data/lib/ddtrace/workers/polling.rb +11 -5
- data/lib/ddtrace/workers/queue.rb +1 -1
- metadata +48 -34
- data/.circleci/images/primary/Dockerfile-2.0.0 +0 -83
- data/gemfiles/ruby_2.0.0_contrib_old.gemfile +0 -64
- data/gemfiles/ruby_2.0.0_contrib_old.gemfile.lock +0 -290
- data/gemfiles/ruby_2.0.0_core_old.gemfile +0 -33
- data/gemfiles/ruby_2.0.0_core_old.gemfile.lock +0 -118
- data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile +0 -39
- data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile.lock +0 -196
- data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile +0 -40
- data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile.lock +0 -205
- data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile +0 -43
- data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile.lock +0 -217
- data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile +0 -39
- data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile.lock +0 -204
- data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile +0 -41
- data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile.lock +0 -223
- data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile +0 -40
- data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile.lock +0 -213
- 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/contrib/rspec/patcher.rb +0 -23
- data/lib/ddtrace/ext/ci.rb +0 -297
data/lib/ddtrace/context.rb
CHANGED
@@ -189,6 +189,9 @@ module Datadog
|
|
189
189
|
# Root span is finished at this point, we can configure it
|
190
190
|
annotate_for_flush!(@current_root_span)
|
191
191
|
|
192
|
+
# Allow caller to modify trace before context is reset
|
193
|
+
yield(trace) if block_given?
|
194
|
+
|
192
195
|
reset
|
193
196
|
[trace, sampled]
|
194
197
|
end
|
@@ -227,6 +230,20 @@ module Datadog
|
|
227
230
|
attach_origin(span) if @origin
|
228
231
|
end
|
229
232
|
|
233
|
+
def attach_sampling_priority(span)
|
234
|
+
span.set_metric(
|
235
|
+
Ext::DistributedTracing::SAMPLING_PRIORITY_KEY,
|
236
|
+
@sampling_priority
|
237
|
+
)
|
238
|
+
end
|
239
|
+
|
240
|
+
def attach_origin(span)
|
241
|
+
span.set_tag(
|
242
|
+
Ext::DistributedTracing::ORIGIN_KEY,
|
243
|
+
@origin
|
244
|
+
)
|
245
|
+
end
|
246
|
+
|
230
247
|
# Return a string representation of the context.
|
231
248
|
def to_s
|
232
249
|
@mutex.synchronize do
|
@@ -282,20 +299,6 @@ module Datadog
|
|
282
299
|
@finished_spans > 0 && @trace.length == @finished_spans
|
283
300
|
end
|
284
301
|
|
285
|
-
def attach_sampling_priority(span)
|
286
|
-
span.set_metric(
|
287
|
-
Ext::DistributedTracing::SAMPLING_PRIORITY_KEY,
|
288
|
-
@sampling_priority
|
289
|
-
)
|
290
|
-
end
|
291
|
-
|
292
|
-
def attach_origin(span)
|
293
|
-
span.set_tag(
|
294
|
-
Ext::DistributedTracing::ORIGIN_KEY,
|
295
|
-
@origin
|
296
|
-
)
|
297
|
-
end
|
298
|
-
|
299
302
|
# Return the start time of the root span, or nil if there are no spans or this is undefined.
|
300
303
|
def start_time
|
301
304
|
@mutex.synchronize do
|
@@ -9,9 +9,15 @@ module Datadog
|
|
9
9
|
#
|
10
10
|
# @return [Array<Span>] trace to be flushed, or +nil+ if the trace is not finished
|
11
11
|
def consume!(context)
|
12
|
-
trace, sampled = context
|
12
|
+
trace, sampled = get_trace(context)
|
13
13
|
trace if sampled
|
14
14
|
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
def get_trace(context)
|
19
|
+
context.get
|
20
|
+
end
|
15
21
|
end
|
16
22
|
|
17
23
|
# Performs partial trace flushing to avoid large traces residing in memory for too long
|
@@ -34,7 +40,7 @@ module Datadog
|
|
34
40
|
#
|
35
41
|
# @return [Array<Span>] partial or complete trace to be flushed, or +nil+ if no spans are finished
|
36
42
|
def consume!(context)
|
37
|
-
trace, sampled = context
|
43
|
+
trace, sampled = get_trace(context)
|
38
44
|
|
39
45
|
return nil unless sampled
|
40
46
|
return trace if trace && !trace.empty?
|
@@ -42,6 +48,12 @@ module Datadog
|
|
42
48
|
partial_trace(context)
|
43
49
|
end
|
44
50
|
|
51
|
+
protected
|
52
|
+
|
53
|
+
def get_trace(context)
|
54
|
+
context.get
|
55
|
+
end
|
56
|
+
|
45
57
|
private
|
46
58
|
|
47
59
|
def partial_trace(context)
|
@@ -8,8 +8,8 @@ module Datadog
|
|
8
8
|
# Defines basic behaviors for an event.
|
9
9
|
module Event
|
10
10
|
def self.included(base)
|
11
|
-
base.
|
12
|
-
base.
|
11
|
+
base.include(ActiveSupport::Notifications::Event)
|
12
|
+
base.extend(ClassMethods)
|
13
13
|
end
|
14
14
|
|
15
15
|
# Class methods for events.
|
@@ -34,8 +34,8 @@ module Datadog
|
|
34
34
|
# but to start a fresh tracing context.
|
35
35
|
module RootContextEvent
|
36
36
|
def self.included(base)
|
37
|
-
base.
|
38
|
-
base.
|
37
|
+
base.include(ActiveSupport::Notifications::Event)
|
38
|
+
base.extend(ClassMethods)
|
39
39
|
end
|
40
40
|
|
41
41
|
# Class methods for events.
|
@@ -6,8 +6,8 @@ module Datadog
|
|
6
6
|
# Defines basic behavior for an ActionView event.
|
7
7
|
module Event
|
8
8
|
def self.included(base)
|
9
|
-
base.
|
10
|
-
base.
|
9
|
+
base.include(ActiveSupport::Notifications::Event)
|
10
|
+
base.extend(ClassMethods)
|
11
11
|
end
|
12
12
|
|
13
13
|
# Class methods for ActionView events.
|
@@ -31,12 +31,12 @@ module Datadog
|
|
31
31
|
# Rendering events are not nested in this version, creating
|
32
32
|
# render_partial spans outside of the parent render_template span.
|
33
33
|
# We fall back to manual patching instead.
|
34
|
-
::ActionView::TemplateRenderer.
|
35
|
-
::ActionView::PartialRenderer.
|
34
|
+
::ActionView::TemplateRenderer.prepend(Instrumentation::TemplateRenderer::RailsLessThan4)
|
35
|
+
::ActionView::PartialRenderer.prepend(Instrumentation::PartialRenderer::RailsLessThan4)
|
36
36
|
elsif defined?(::ActionView::Rendering) && defined?(::ActionView::Partials::PartialRenderer)
|
37
37
|
# NOTE: Rails < 3.1 compatibility: different classes are used
|
38
|
-
::ActionView::Rendering.
|
39
|
-
::ActionView::Partials::PartialRenderer.
|
38
|
+
::ActionView::Rendering.prepend(Instrumentation::TemplateRenderer::Rails30)
|
39
|
+
::ActionView::Partials::PartialRenderer.prepend(Instrumentation::PartialRenderer::RailsLessThan4)
|
40
40
|
else
|
41
41
|
Datadog.logger.debug('Expected Template/Partial classes not found; template rendering disabled')
|
42
42
|
end
|
@@ -9,8 +9,8 @@ module Datadog
|
|
9
9
|
# Defines basic behaviors for an ActiveModelSerializers event.
|
10
10
|
module Event
|
11
11
|
def self.included(base)
|
12
|
-
base.
|
13
|
-
base.
|
12
|
+
base.include(ActiveSupport::Notifications::Event)
|
13
|
+
base.extend(ClassMethods)
|
14
14
|
end
|
15
15
|
|
16
16
|
# Class methods for ActiveModelSerializers events.
|
@@ -6,8 +6,8 @@ module Datadog
|
|
6
6
|
# Defines basic behaviors for an ActiveRecord event.
|
7
7
|
module Event
|
8
8
|
def self.included(base)
|
9
|
-
base.
|
10
|
-
base.
|
9
|
+
base.include(ActiveSupport::Notifications::Event)
|
10
|
+
base.extend(ClassMethods)
|
11
11
|
end
|
12
12
|
|
13
13
|
# Class methods for ActiveRecord events.
|
@@ -30,37 +30,37 @@ module Datadog
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def patch_cache_store_read
|
33
|
-
cache_store_class(:read).
|
33
|
+
cache_store_class(:read).prepend(Cache::Instrumentation::Read)
|
34
34
|
end
|
35
35
|
|
36
36
|
def patch_cache_store_read_multi
|
37
|
-
cache_store_class(:read_multi).
|
37
|
+
cache_store_class(:read_multi).prepend(Cache::Instrumentation::ReadMulti)
|
38
38
|
end
|
39
39
|
|
40
40
|
def patch_cache_store_fetch
|
41
|
-
cache_store_class(:fetch).
|
41
|
+
cache_store_class(:fetch).prepend(Cache::Instrumentation::Fetch)
|
42
42
|
end
|
43
43
|
|
44
44
|
def patch_cache_store_fetch_multi
|
45
45
|
klass = cache_store_class(:fetch_multi)
|
46
46
|
return unless klass.public_method_defined?(:fetch_multi)
|
47
47
|
|
48
|
-
klass.
|
48
|
+
klass.prepend(Cache::Instrumentation::FetchMulti)
|
49
49
|
end
|
50
50
|
|
51
51
|
def patch_cache_store_write
|
52
|
-
cache_store_class(:write).
|
52
|
+
cache_store_class(:write).prepend(Cache::Instrumentation::Write)
|
53
53
|
end
|
54
54
|
|
55
55
|
def patch_cache_store_write_multi
|
56
56
|
klass = cache_store_class(:write_multi)
|
57
57
|
return unless klass.public_method_defined?(:write_multi)
|
58
58
|
|
59
|
-
klass.
|
59
|
+
klass.prepend(Cache::Instrumentation::WriteMulti)
|
60
60
|
end
|
61
61
|
|
62
62
|
def patch_cache_store_delete
|
63
|
-
cache_store_class(:delete).
|
63
|
+
cache_store_class(:delete).prepend(Cache::Instrumentation::Delete)
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
@@ -10,8 +10,8 @@ module Datadog
|
|
10
10
|
# invoke Event.subscribe! to more easily subscribe to an event.
|
11
11
|
module Event
|
12
12
|
def self.included(base)
|
13
|
-
base.
|
14
|
-
base.
|
13
|
+
base.include(Subscriber)
|
14
|
+
base.extend(ClassMethods)
|
15
15
|
base.send(:on_subscribe) { base.subscribe }
|
16
16
|
end
|
17
17
|
|
@@ -56,6 +56,35 @@ module Datadog
|
|
56
56
|
Datadog.configuration[:aws]
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
# Removes API request instrumentation from S3 Presign URL creation.
|
61
|
+
#
|
62
|
+
# This is necessary because the S3 SDK invokes the same handler
|
63
|
+
# stack for presigning as it does for sending a real requests.
|
64
|
+
# But presigning does not perform a network request.
|
65
|
+
# There's not information available for our Handler plugin to differentiate
|
66
|
+
# these two types of requests.
|
67
|
+
#
|
68
|
+
# DEV: Since aws-sdk-s3 1.94.1, we only need to check if
|
69
|
+
# `context[:presigned_url] == true` in Datadog::Contrib::Aws::Handler#call
|
70
|
+
# and skip the request if that condition is true. Since there's
|
71
|
+
# no strong reason for us not to support older versions of `aws-sdk-s3`,
|
72
|
+
# this {S3Presigner} monkey-patching is still required.
|
73
|
+
module S3Presigner
|
74
|
+
# Exclude our Handler from the current request's handler stack.
|
75
|
+
#
|
76
|
+
# This is the same approach that the AWS SDK takes to prevent
|
77
|
+
# some of its plugins form interfering with the presigning process:
|
78
|
+
# https://github.com/aws/aws-sdk-ruby/blob/a82c8981c95a8296ffb6269c3c06a4f551d87f7d/gems/aws-sdk-s3/lib/aws-sdk-s3/presigner.rb#L194-L196
|
79
|
+
def sign_but_dont_send(*args, &block)
|
80
|
+
if (request = args[0]).is_a?(::Seahorse::Client::Request)
|
81
|
+
request.handlers.remove(Handler)
|
82
|
+
end
|
83
|
+
|
84
|
+
super(*args, &block)
|
85
|
+
end
|
86
|
+
ruby2_keywords :sign_but_dont_send if respond_to?(:ruby2_keywords, true)
|
87
|
+
end
|
59
88
|
end
|
60
89
|
end
|
61
90
|
end
|
@@ -20,6 +20,10 @@ module Datadog
|
|
20
20
|
require 'ddtrace/contrib/aws/services'
|
21
21
|
|
22
22
|
add_plugin(Seahorse::Client::Base, *loaded_constants)
|
23
|
+
|
24
|
+
# Special handling for S3 URL Presigning.
|
25
|
+
# @see {Datadog::Contrib::Aws::S3Presigner}
|
26
|
+
::Aws::S3::Presigner.prepend S3Presigner
|
23
27
|
end
|
24
28
|
|
25
29
|
def add_plugin(*targets)
|
@@ -10,7 +10,7 @@ module Datadog
|
|
10
10
|
# Instruments every interaction with the memcached server
|
11
11
|
module Instrumentation
|
12
12
|
def self.included(base)
|
13
|
-
base.
|
13
|
+
base.prepend(InstanceMethods)
|
14
14
|
end
|
15
15
|
|
16
16
|
# InstanceMethods - implementing instrumentation
|
@@ -11,7 +11,7 @@ module Datadog
|
|
11
11
|
module MultiPatch
|
12
12
|
def self.included(base)
|
13
13
|
# No need to prepend here since add method is included into Multi class
|
14
|
-
base.
|
14
|
+
base.include(InstanceMethods)
|
15
15
|
end
|
16
16
|
|
17
17
|
# InstanceMethods - implementing instrumentation
|
@@ -16,8 +16,8 @@ module Datadog
|
|
16
16
|
require 'ddtrace/contrib/ethon/easy_patch'
|
17
17
|
require 'ddtrace/contrib/ethon/multi_patch'
|
18
18
|
|
19
|
-
::Ethon::Easy.
|
20
|
-
::Ethon::Multi.
|
19
|
+
::Ethon::Easy.include(EasyPatch)
|
20
|
+
::Ethon::Multi.include(MultiPatch)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -7,9 +7,9 @@ module Datadog
|
|
7
7
|
# Adds registry, configuration access for integrations.
|
8
8
|
module Extensions
|
9
9
|
def self.extended(base)
|
10
|
-
Datadog.
|
11
|
-
Datadog.
|
12
|
-
Datadog::Configuration::Settings.
|
10
|
+
Datadog.extend(Helpers)
|
11
|
+
Datadog.extend(Configuration)
|
12
|
+
Datadog::Configuration::Settings.include(Configuration::Settings)
|
13
13
|
end
|
14
14
|
|
15
15
|
# Helper methods for Datadog module.
|
@@ -34,7 +34,7 @@ module Datadog
|
|
34
34
|
::Faraday.default_connection.use(:ddtrace)
|
35
35
|
|
36
36
|
# Patch new connection instances (e.g. +Faraday.new+)
|
37
|
-
::Faraday::Connection.
|
37
|
+
::Faraday::Connection.prepend(Connection)
|
38
38
|
else
|
39
39
|
# Patch the default connection (e.g. +Faraday.get+)
|
40
40
|
#
|
@@ -44,7 +44,7 @@ module Datadog
|
|
44
44
|
::Faraday.default_connection.builder.insert(idx, Middleware)
|
45
45
|
|
46
46
|
# Patch new connection instances (e.g. +Faraday.new+)
|
47
|
-
::Faraday::RackBuilder.
|
47
|
+
::Faraday::RackBuilder.prepend(RackBuilder)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -4,8 +4,8 @@ module Datadog
|
|
4
4
|
# Instrumentation for Grape::Endpoint
|
5
5
|
module Instrumentation
|
6
6
|
def self.included(base)
|
7
|
-
base.singleton_class.
|
8
|
-
base.
|
7
|
+
base.singleton_class.prepend(ClassMethods)
|
8
|
+
base.prepend(InstanceMethods)
|
9
9
|
end
|
10
10
|
|
11
11
|
# ClassMethods - implementing instrumentation
|