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
@@ -62,6 +62,10 @@ module Datadog
|
|
62
62
|
Array.new(@sample_type_mappings.length, Datadog::Ext::Profiling::Pprof::SAMPLE_VALUE_NO_VALUE)
|
63
63
|
end
|
64
64
|
|
65
|
+
def debug_statistics
|
66
|
+
# Empty; can be used by subclasses to report a string containing debug statistics to be logged
|
67
|
+
end
|
68
|
+
|
65
69
|
# Represents a grouped event
|
66
70
|
# 'sample' is an example event object from the group.
|
67
71
|
# 'values' is the the summation of the group's sample values
|
@@ -7,6 +7,9 @@ module Datadog
|
|
7
7
|
module Profiling
|
8
8
|
module Pprof
|
9
9
|
# Builds a profile from a StackSample
|
10
|
+
#
|
11
|
+
# NOTE: This class may appear stateless but is in fact stateful; a new instance should be created for every
|
12
|
+
# encoded profile.
|
10
13
|
class StackSample < Converter
|
11
14
|
SAMPLE_TYPES = {
|
12
15
|
cpu_time_ns: [
|
@@ -23,6 +26,13 @@ module Datadog
|
|
23
26
|
SAMPLE_TYPES
|
24
27
|
end
|
25
28
|
|
29
|
+
def initialize(*_)
|
30
|
+
super
|
31
|
+
|
32
|
+
@processed_unique_stacks = 0
|
33
|
+
@processed_with_trace_ids = 0
|
34
|
+
end
|
35
|
+
|
26
36
|
def add_events!(stack_samples)
|
27
37
|
new_samples = build_samples(stack_samples)
|
28
38
|
builder.samples.concat(new_samples)
|
@@ -35,6 +45,7 @@ module Datadog
|
|
35
45
|
def build_samples(stack_samples)
|
36
46
|
groups = group_events(stack_samples, &method(:stack_sample_group_key))
|
37
47
|
groups.collect do |_group_key, group|
|
48
|
+
@processed_unique_stacks += 1
|
38
49
|
build_sample(group.sample, group.values)
|
39
50
|
end
|
40
51
|
end
|
@@ -46,7 +57,7 @@ module Datadog
|
|
46
57
|
)
|
47
58
|
|
48
59
|
Perftools::Profiles::Sample.new(
|
49
|
-
location_id: locations.collect
|
60
|
+
location_id: locations.collect { |location| location['id'.freeze] },
|
50
61
|
value: values,
|
51
62
|
label: build_sample_labels(stack_sample)
|
52
63
|
)
|
@@ -69,6 +80,7 @@ module Datadog
|
|
69
80
|
]
|
70
81
|
|
71
82
|
unless stack_sample.trace_id.nil? || stack_sample.trace_id.zero?
|
83
|
+
@processed_with_trace_ids += 1
|
72
84
|
labels << Perftools::Profiles::Label.new(
|
73
85
|
key: builder.string_table.fetch(Datadog::Ext::Profiling::Pprof::LABEL_KEY_TRACE_ID),
|
74
86
|
str: builder.string_table.fetch(stack_sample.trace_id.to_s)
|
@@ -84,6 +96,10 @@ module Datadog
|
|
84
96
|
|
85
97
|
labels
|
86
98
|
end
|
99
|
+
|
100
|
+
def debug_statistics
|
101
|
+
"unique stacks: #{@processed_unique_stacks}, of which had active traces: #{@processed_with_trace_ids}"
|
102
|
+
end
|
87
103
|
end
|
88
104
|
end
|
89
105
|
end
|
@@ -42,7 +42,18 @@ module Datadog
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def perform
|
45
|
-
|
45
|
+
# A profiling flush may be called while the VM is shutting down, to report the last profile. When we do so,
|
46
|
+
# we impose a strict timeout. This means this last profile may or may not be sent, depending on if the flush can
|
47
|
+
# successfully finish in the strict timeout.
|
48
|
+
# This can be somewhat confusing (why did it not get reported?), so let's at least log what happened.
|
49
|
+
interrupted = true
|
50
|
+
|
51
|
+
begin
|
52
|
+
flush_and_wait
|
53
|
+
interrupted = false
|
54
|
+
ensure
|
55
|
+
Datadog.logger.debug('#flush was interrupted or failed before it could complete') if interrupted
|
56
|
+
end
|
46
57
|
end
|
47
58
|
|
48
59
|
def loop_back_off?
|
@@ -18,7 +18,7 @@ module Datadog
|
|
18
18
|
activate_cpu_extensions
|
19
19
|
setup_at_fork_hooks
|
20
20
|
rescue StandardError, ScriptError => e
|
21
|
-
|
21
|
+
Datadog.logger.warn { "Profiler extensions unavailable. Cause: #{e.message} Location: #{e.backtrace.first}" }
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -29,22 +29,27 @@ module Datadog
|
|
29
29
|
if Ext::Forking.supported?
|
30
30
|
Ext::Forking.apply!
|
31
31
|
elsif Datadog.configuration.profiling.enabled
|
32
|
-
|
33
|
-
log '[DDTRACE] Forking extensions skipped; forking not supported.'
|
32
|
+
Datadog.logger.debug('Profiler forking extensions skipped; forking not supported.')
|
34
33
|
end
|
35
34
|
rescue StandardError, ScriptError => e
|
36
|
-
|
35
|
+
Datadog.logger.warn do
|
36
|
+
"Profiler forking extensions unavailable. Cause: #{e.message} Location: #{e.backtrace.first}"
|
37
|
+
end
|
37
38
|
end
|
38
39
|
|
39
40
|
def activate_cpu_extensions
|
40
41
|
if Ext::CPU.supported?
|
41
42
|
Ext::CPU.apply!
|
42
43
|
elsif Datadog.configuration.profiling.enabled
|
43
|
-
|
44
|
-
|
44
|
+
Datadog.logger.info do
|
45
|
+
'CPU time profiling skipped because native CPU time is not supported: ' \
|
46
|
+
"#{Ext::CPU.unsupported_reason}. Profiles containing Wall time will still be reported."
|
47
|
+
end
|
45
48
|
end
|
46
49
|
rescue StandardError, ScriptError => e
|
47
|
-
|
50
|
+
Datadog.logger.warn do
|
51
|
+
"Profiler CPU profiling extensions unavailable. Cause: #{e.message} Location: #{e.backtrace.first}"
|
52
|
+
end
|
48
53
|
end
|
49
54
|
|
50
55
|
def setup_at_fork_hooks
|
@@ -61,16 +66,11 @@ module Datadog
|
|
61
66
|
# Restart profiler, if enabled
|
62
67
|
Datadog.profiler.start if Datadog.profiler
|
63
68
|
rescue StandardError => e
|
64
|
-
|
69
|
+
Datadog.logger.warn { "Error during post-fork hooks. Cause: #{e.message} Location: #{e.backtrace.first}" }
|
65
70
|
end
|
66
71
|
end
|
67
72
|
end
|
68
73
|
end
|
69
|
-
|
70
|
-
def log(message)
|
71
|
-
# Print to STDOUT for now because logging may not be setup yet...
|
72
|
-
puts message
|
73
|
-
end
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -14,10 +14,15 @@ module Datadog
|
|
14
14
|
class Endpoint < Datadog::Transport::HTTP::API::Endpoint
|
15
15
|
include Datadog::Ext::Profiling::Transport::HTTP
|
16
16
|
|
17
|
+
# These tags are read from the flush object (see below) directly and so we ignore any extra copies that
|
18
|
+
# may come in the tags hash to avoid duplicates.
|
19
|
+
TAGS_TO_IGNORE_IN_TAGS_HASH = %w[service env version].freeze
|
20
|
+
private_constant :TAGS_TO_IGNORE_IN_TAGS_HASH
|
21
|
+
|
17
22
|
attr_reader \
|
18
23
|
:encoder
|
19
24
|
|
20
|
-
def initialize(path, encoder
|
25
|
+
def initialize(path, encoder)
|
21
26
|
super(:post, path)
|
22
27
|
@encoder = encoder
|
23
28
|
end
|
@@ -52,7 +57,11 @@ module Datadog
|
|
52
57
|
"#{FORM_FIELD_TAG_PROFILER_VERSION}:#{flush.profiler_version}",
|
53
58
|
# NOTE: Redundant w/ 'runtime'; may want to remove this later.
|
54
59
|
"#{FORM_FIELD_TAG_LANGUAGE}:#{flush.language}",
|
55
|
-
"#{FORM_FIELD_TAG_HOST}:#{flush.host}"
|
60
|
+
"#{FORM_FIELD_TAG_HOST}:#{flush.host}",
|
61
|
+
*flush
|
62
|
+
.tags
|
63
|
+
.reject { |tag_key| TAGS_TO_IGNORE_IN_TAGS_HASH.include?(tag_key) }
|
64
|
+
.map { |tag_key, tag_value| "#{tag_key}:#{tag_value}" }
|
56
65
|
],
|
57
66
|
FORM_FIELD_DATA => pprof_file,
|
58
67
|
FORM_FIELD_RUNTIME => flush.language,
|
@@ -58,11 +58,9 @@ module Datadog
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def gc_metrics
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
65
|
-
]
|
61
|
+
GC.stat.flat_map do |k, v|
|
62
|
+
nested_gc_metric(Ext::Runtime::Metrics::METRIC_GC_PREFIX, k, v)
|
63
|
+
end.to_h
|
66
64
|
end
|
67
65
|
|
68
66
|
def try_flush
|
data/lib/ddtrace/sync_writer.rb
CHANGED
@@ -20,7 +20,8 @@ module Datadog
|
|
20
20
|
def initialize(options = {})
|
21
21
|
@transport = options.fetch(:transport) do
|
22
22
|
transport_options = options.fetch(:transport_options, {})
|
23
|
-
|
23
|
+
transport_options[:agent_settings] = options[:agent_settings] if options.key?(:agent_settings)
|
24
|
+
Transport::HTTP.default(**transport_options)
|
24
25
|
end
|
25
26
|
|
26
27
|
@priority_sampler = options.fetch(:priority_sampler, nil)
|
data/lib/ddtrace/tracer.rb
CHANGED
@@ -74,7 +74,9 @@ module Datadog
|
|
74
74
|
# by default.
|
75
75
|
def initialize(options = {})
|
76
76
|
# Configurable options
|
77
|
-
@context_flush = if options[:
|
77
|
+
@context_flush = if options[:context_flush]
|
78
|
+
options[:context_flush]
|
79
|
+
elsif options[:partial_flush]
|
78
80
|
Datadog::ContextFlush::Partial.new(options)
|
79
81
|
else
|
80
82
|
Datadog::ContextFlush::Finished.new
|
@@ -118,8 +120,10 @@ module Datadog
|
|
118
120
|
|
119
121
|
configure_writer(options)
|
120
122
|
|
121
|
-
if options.key?(:partial_flush)
|
122
|
-
@context_flush = if options[:
|
123
|
+
if options.key?(:context_flush) || options.key?(:partial_flush)
|
124
|
+
@context_flush = if options[:context_flush]
|
125
|
+
options[:context_flush]
|
126
|
+
elsif options[:partial_flush]
|
123
127
|
Datadog::ContextFlush::Partial.new(options)
|
124
128
|
else
|
125
129
|
Datadog::ContextFlush::Finished.new
|
@@ -162,7 +166,7 @@ module Datadog
|
|
162
166
|
#
|
163
167
|
# tracer.set_tags('env' => 'prod', 'component' => 'core')
|
164
168
|
def set_tags(tags)
|
165
|
-
string_tags =
|
169
|
+
string_tags = tags.collect { |k, v| [k.to_s, v] }.to_h
|
166
170
|
@tags = @tags.merge(string_tags)
|
167
171
|
end
|
168
172
|
|
@@ -6,8 +6,8 @@ module Datadog
|
|
6
6
|
# Tracks statistics for HTTP transports
|
7
7
|
module Statistics
|
8
8
|
def self.included(base)
|
9
|
-
base.
|
10
|
-
base.
|
9
|
+
base.include(Datadog::Transport::Statistics)
|
10
|
+
base.include(InstanceMethods)
|
11
11
|
end
|
12
12
|
|
13
13
|
# Instance methods for HTTP statistics
|
@@ -133,9 +133,9 @@ module Datadog
|
|
133
133
|
end
|
134
134
|
|
135
135
|
# Add traces behavior to transport components
|
136
|
-
HTTP::Client.
|
137
|
-
HTTP::API::Spec.
|
138
|
-
HTTP::API::Instance.
|
136
|
+
HTTP::Client.include(Traces::Client)
|
137
|
+
HTTP::API::Spec.include(Traces::API::Spec)
|
138
|
+
HTTP::API::Instance.include(Traces::API::Instance)
|
139
139
|
end
|
140
140
|
end
|
141
141
|
end
|
@@ -16,12 +16,10 @@ module Datadog
|
|
16
16
|
# If they match an existing message, it will return the
|
17
17
|
# matching object. If it doesn't match, it will yield to
|
18
18
|
# the block with the next ID & args given.
|
19
|
-
def fetch(*args
|
19
|
+
def fetch(*args)
|
20
|
+
# TODO: Array hashing is **really** expensive, we probably want to get rid of it in the future
|
20
21
|
key = @key_block ? @key_block.call(*args) : args.hash
|
21
|
-
|
22
|
-
# rubocop:disable Performance/RedundantBlockCall
|
23
|
-
@items[key] ||= block.call(@sequence.next, *args)
|
24
|
-
# rubocop:enable Performance/RedundantBlockCall
|
22
|
+
@items[key] ||= yield(@sequence.next, *args)
|
25
23
|
end
|
26
24
|
|
27
25
|
def length
|
data/lib/ddtrace/utils/time.rb
CHANGED
@@ -2,8 +2,6 @@ module Datadog
|
|
2
2
|
module Utils
|
3
3
|
# Common database-related utility functions.
|
4
4
|
module Time
|
5
|
-
PROCESS_TIME_SUPPORTED = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1.0')
|
6
|
-
|
7
5
|
module_function
|
8
6
|
|
9
7
|
# Current monotonic time.
|
@@ -12,7 +10,7 @@ module Datadog
|
|
12
10
|
#
|
13
11
|
# @return [Float] in seconds, since some unspecified starting point
|
14
12
|
def get_time
|
15
|
-
|
13
|
+
Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
16
14
|
end
|
17
15
|
|
18
16
|
# Current wall time.
|
data/lib/ddtrace/version.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
module Datadog
|
2
2
|
module VERSION
|
3
3
|
MAJOR = 0
|
4
|
-
MINOR =
|
4
|
+
MINOR = 50
|
5
5
|
PATCH = 0
|
6
6
|
PRE = nil
|
7
7
|
|
8
8
|
STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
9
9
|
|
10
|
-
|
11
|
-
# Support will be dropped in the near future.
|
12
|
-
MINIMUM_RUBY_VERSION = '2.0.0'.freeze
|
10
|
+
MINIMUM_RUBY_VERSION = '2.1.0'.freeze
|
13
11
|
|
14
12
|
# Ruby 3.2 is not supported: Ruby 3.x support as implemented using *args
|
15
13
|
# needs ruby2_keywords to continue working, yet the scheduled removal of
|
data/lib/ddtrace/workers.rb
CHANGED
@@ -69,7 +69,7 @@ module Datadog
|
|
69
69
|
return if @run
|
70
70
|
|
71
71
|
@run = true
|
72
|
-
Datadog.logger.debug
|
72
|
+
Datadog.logger.debug { "Starting thread for: #{self}" }
|
73
73
|
@worker = Thread.new { perform }
|
74
74
|
@worker.name = self.class.name unless Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3')
|
75
75
|
|
@@ -12,7 +12,7 @@ module Datadog
|
|
12
12
|
SHUTDOWN_TIMEOUT = 1
|
13
13
|
|
14
14
|
def self.included(base)
|
15
|
-
base.
|
15
|
+
base.prepend(PrependedMethods)
|
16
16
|
end
|
17
17
|
|
18
18
|
# Methods that must be prepended
|
@@ -39,6 +39,7 @@ module Datadog
|
|
39
39
|
return false unless running?
|
40
40
|
|
41
41
|
@run_async = false
|
42
|
+
Datadog.logger.debug { "Forcibly terminating worker thread for: #{self}" }
|
42
43
|
worker.terminate
|
43
44
|
true
|
44
45
|
end
|
@@ -126,7 +127,7 @@ module Datadog
|
|
126
127
|
@run_async = true
|
127
128
|
@pid = Process.pid
|
128
129
|
@error = nil
|
129
|
-
Datadog.logger.debug
|
130
|
+
Datadog.logger.debug { "Starting thread for: #{self}" }
|
130
131
|
|
131
132
|
@worker = ::Thread.new do
|
132
133
|
begin
|
data/lib/ddtrace/workers/loop.rb
CHANGED
@@ -8,9 +8,9 @@ module Datadog
|
|
8
8
|
SHUTDOWN_TIMEOUT = 1
|
9
9
|
|
10
10
|
def self.included(base)
|
11
|
-
base.
|
12
|
-
base.
|
13
|
-
base.
|
11
|
+
base.include(Workers::IntervalLoop)
|
12
|
+
base.include(Workers::Async::Thread)
|
13
|
+
base.prepend(PrependedMethods)
|
14
14
|
end
|
15
15
|
|
16
16
|
# Methods that must be prepended
|
@@ -26,8 +26,14 @@ module Datadog
|
|
26
26
|
stop_loop
|
27
27
|
graceful = join(timeout)
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
if !graceful && force_stop
|
30
|
+
Datadog.logger.debug do
|
31
|
+
"Timeout while waiting for worker to finish gracefully, forcing termination for: #{self}"
|
32
|
+
end
|
33
|
+
terminate
|
34
|
+
else
|
35
|
+
graceful
|
36
|
+
end
|
31
37
|
else
|
32
38
|
false
|
33
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddtrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.50.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -50,7 +50,6 @@ extensions: []
|
|
50
50
|
extra_rdoc_files: []
|
51
51
|
files:
|
52
52
|
- ".circleci/config.yml"
|
53
|
-
- ".circleci/images/primary/Dockerfile-2.0.0"
|
54
53
|
- ".circleci/images/primary/Dockerfile-2.1.10"
|
55
54
|
- ".circleci/images/primary/Dockerfile-2.2.10"
|
56
55
|
- ".circleci/images/primary/Dockerfile-2.3.8"
|
@@ -61,7 +60,7 @@ files:
|
|
61
60
|
- ".circleci/images/primary/Dockerfile-3.0.0"
|
62
61
|
- ".circleci/images/primary/Dockerfile-jruby-9.2-latest"
|
63
62
|
- ".circleci/images/primary/Dockerfile-jruby-9.2.0.0"
|
64
|
-
- ".circleci/images/primary/Dockerfile-truffleruby-21.
|
63
|
+
- ".circleci/images/primary/Dockerfile-truffleruby-21.1.0"
|
65
64
|
- ".dockerignore"
|
66
65
|
- ".env"
|
67
66
|
- ".github/CODEOWNERS"
|
@@ -85,8 +84,10 @@ files:
|
|
85
84
|
- NOTICE
|
86
85
|
- README.md
|
87
86
|
- Rakefile
|
87
|
+
- benchmarks/data/profiler-submission-marshal.gz
|
88
88
|
- benchmarks/postgres_database.yml
|
89
89
|
- benchmarks/profiler_sample_loop.rb
|
90
|
+
- benchmarks/profiler_submission.rb
|
90
91
|
- benchmarks/sidekiq_test.rb
|
91
92
|
- bin/ddtracerb
|
92
93
|
- ddtrace.gemspec
|
@@ -182,22 +183,6 @@ files:
|
|
182
183
|
- gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile.lock
|
183
184
|
- gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile
|
184
185
|
- gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile.lock
|
185
|
-
- gemfiles/ruby_2.0.0_contrib_old.gemfile
|
186
|
-
- gemfiles/ruby_2.0.0_contrib_old.gemfile.lock
|
187
|
-
- gemfiles/ruby_2.0.0_core_old.gemfile
|
188
|
-
- gemfiles/ruby_2.0.0_core_old.gemfile.lock
|
189
|
-
- gemfiles/ruby_2.0.0_rails30_postgres.gemfile
|
190
|
-
- gemfiles/ruby_2.0.0_rails30_postgres.gemfile.lock
|
191
|
-
- gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile
|
192
|
-
- gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile.lock
|
193
|
-
- gemfiles/ruby_2.0.0_rails32_mysql2.gemfile
|
194
|
-
- gemfiles/ruby_2.0.0_rails32_mysql2.gemfile.lock
|
195
|
-
- gemfiles/ruby_2.0.0_rails32_postgres.gemfile
|
196
|
-
- gemfiles/ruby_2.0.0_rails32_postgres.gemfile.lock
|
197
|
-
- gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile
|
198
|
-
- gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile.lock
|
199
|
-
- gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile
|
200
|
-
- gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile.lock
|
201
186
|
- gemfiles/ruby_2.1.10_contrib_old.gemfile
|
202
187
|
- gemfiles/ruby_2.1.10_contrib_old.gemfile.lock
|
203
188
|
- gemfiles/ruby_2.1.10_core_old.gemfile
|
@@ -568,6 +553,27 @@ files:
|
|
568
553
|
- integration/apps/rails-five/storage/.keep
|
569
554
|
- integration/apps/rails-five/tmp/.keep
|
570
555
|
- integration/apps/rails-five/vendor/.keep
|
556
|
+
- integration/apps/rspec/.dockerignore
|
557
|
+
- integration/apps/rspec/.envrc.sample
|
558
|
+
- integration/apps/rspec/.gitignore
|
559
|
+
- integration/apps/rspec/.rspec
|
560
|
+
- integration/apps/rspec/Dockerfile
|
561
|
+
- integration/apps/rspec/Dockerfile-ci
|
562
|
+
- integration/apps/rspec/Gemfile
|
563
|
+
- integration/apps/rspec/README.md
|
564
|
+
- integration/apps/rspec/agent.yaml
|
565
|
+
- integration/apps/rspec/app/datadog.rb
|
566
|
+
- integration/apps/rspec/app/fibonacci.rb
|
567
|
+
- integration/apps/rspec/bin/run
|
568
|
+
- integration/apps/rspec/bin/setup
|
569
|
+
- integration/apps/rspec/bin/test
|
570
|
+
- integration/apps/rspec/docker-compose.ci.yml
|
571
|
+
- integration/apps/rspec/docker-compose.yml
|
572
|
+
- integration/apps/rspec/script/build-images
|
573
|
+
- integration/apps/rspec/script/ci
|
574
|
+
- integration/apps/rspec/spec/fibonacci_spec.rb
|
575
|
+
- integration/apps/rspec/spec/rspec_spec.rb
|
576
|
+
- integration/apps/rspec/spec/spec_helper.rb
|
571
577
|
- integration/apps/ruby/.dockerignore
|
572
578
|
- integration/apps/ruby/.envrc.sample
|
573
579
|
- integration/apps/ruby/.gitignore
|
@@ -590,7 +596,6 @@ files:
|
|
590
596
|
- integration/images/include/datadog/analyzer.rb
|
591
597
|
- integration/images/include/datadog/demo_env.rb
|
592
598
|
- integration/images/include/http-health-check
|
593
|
-
- integration/images/ruby/2.0/Dockerfile
|
594
599
|
- integration/images/ruby/2.1/Dockerfile
|
595
600
|
- integration/images/ruby/2.2/Dockerfile
|
596
601
|
- integration/images/ruby/2.3/Dockerfile
|
@@ -604,6 +609,27 @@ files:
|
|
604
609
|
- integration/images/wrk/scripts/scenarios/basic/default.lua
|
605
610
|
- integration/images/wrk/scripts/scenarios/basic/fibonacci.lua
|
606
611
|
- integration/script/build-images
|
612
|
+
- lib/datadog/ci.rb
|
613
|
+
- lib/datadog/ci/configuration/components.rb
|
614
|
+
- lib/datadog/ci/configuration/settings.rb
|
615
|
+
- lib/datadog/ci/context_flush.rb
|
616
|
+
- lib/datadog/ci/contrib/cucumber/configuration/settings.rb
|
617
|
+
- lib/datadog/ci/contrib/cucumber/ext.rb
|
618
|
+
- lib/datadog/ci/contrib/cucumber/formatter.rb
|
619
|
+
- lib/datadog/ci/contrib/cucumber/instrumentation.rb
|
620
|
+
- lib/datadog/ci/contrib/cucumber/integration.rb
|
621
|
+
- lib/datadog/ci/contrib/cucumber/patcher.rb
|
622
|
+
- lib/datadog/ci/contrib/rspec/configuration/settings.rb
|
623
|
+
- lib/datadog/ci/contrib/rspec/example.rb
|
624
|
+
- lib/datadog/ci/contrib/rspec/ext.rb
|
625
|
+
- lib/datadog/ci/contrib/rspec/integration.rb
|
626
|
+
- lib/datadog/ci/contrib/rspec/patcher.rb
|
627
|
+
- lib/datadog/ci/ext/app_types.rb
|
628
|
+
- lib/datadog/ci/ext/environment.rb
|
629
|
+
- lib/datadog/ci/ext/settings.rb
|
630
|
+
- lib/datadog/ci/ext/test.rb
|
631
|
+
- lib/datadog/ci/extensions.rb
|
632
|
+
- lib/datadog/ci/test.rb
|
607
633
|
- lib/ddtrace.rb
|
608
634
|
- lib/ddtrace/analytics.rb
|
609
635
|
- lib/ddtrace/auto_instrument.rb
|
@@ -701,12 +727,6 @@ files:
|
|
701
727
|
- lib/ddtrace/contrib/configuration/resolver.rb
|
702
728
|
- lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb
|
703
729
|
- lib/ddtrace/contrib/configuration/settings.rb
|
704
|
-
- lib/ddtrace/contrib/cucumber/configuration/settings.rb
|
705
|
-
- lib/ddtrace/contrib/cucumber/ext.rb
|
706
|
-
- lib/ddtrace/contrib/cucumber/formatter.rb
|
707
|
-
- lib/ddtrace/contrib/cucumber/instrumentation.rb
|
708
|
-
- lib/ddtrace/contrib/cucumber/integration.rb
|
709
|
-
- lib/ddtrace/contrib/cucumber/patcher.rb
|
710
730
|
- lib/ddtrace/contrib/dalli/configuration/settings.rb
|
711
731
|
- lib/ddtrace/contrib/dalli/ext.rb
|
712
732
|
- lib/ddtrace/contrib/dalli/instrumentation.rb
|
@@ -876,11 +896,6 @@ files:
|
|
876
896
|
- lib/ddtrace/contrib/rest_client/integration.rb
|
877
897
|
- lib/ddtrace/contrib/rest_client/patcher.rb
|
878
898
|
- lib/ddtrace/contrib/rest_client/request_patch.rb
|
879
|
-
- lib/ddtrace/contrib/rspec/configuration/settings.rb
|
880
|
-
- lib/ddtrace/contrib/rspec/example.rb
|
881
|
-
- lib/ddtrace/contrib/rspec/ext.rb
|
882
|
-
- lib/ddtrace/contrib/rspec/integration.rb
|
883
|
-
- lib/ddtrace/contrib/rspec/patcher.rb
|
884
899
|
- lib/ddtrace/contrib/sequel/configuration/settings.rb
|
885
900
|
- lib/ddtrace/contrib/sequel/database.rb
|
886
901
|
- lib/ddtrace/contrib/sequel/dataset.rb
|
@@ -934,7 +949,6 @@ files:
|
|
934
949
|
- lib/ddtrace/event.rb
|
935
950
|
- lib/ddtrace/ext/analytics.rb
|
936
951
|
- lib/ddtrace/ext/app_types.rb
|
937
|
-
- lib/ddtrace/ext/ci.rb
|
938
952
|
- lib/ddtrace/ext/correlation.rb
|
939
953
|
- lib/ddtrace/ext/diagnostics.rb
|
940
954
|
- lib/ddtrace/ext/distributed.rb
|
@@ -1114,7 +1128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1114
1128
|
requirements:
|
1115
1129
|
- - ">="
|
1116
1130
|
- !ruby/object:Gem::Version
|
1117
|
-
version: 2.
|
1131
|
+
version: 2.1.0
|
1118
1132
|
- - "<"
|
1119
1133
|
- !ruby/object:Gem::Version
|
1120
1134
|
version: '3.2'
|