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
@@ -1,54 +0,0 @@
|
|
1
|
-
FROM ruby:2.0
|
2
|
-
|
3
|
-
# Add Jessie repos
|
4
|
-
# Fixes https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease
|
5
|
-
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
|
6
|
-
|
7
|
-
ENV DEBIAN_FRONTEND=noninteractive
|
8
|
-
|
9
|
-
# Install prerequisites
|
10
|
-
RUN set -ex && \
|
11
|
-
echo "===> Installing dependencies" && \
|
12
|
-
apt-get -y update && \
|
13
|
-
apt-get install -y --force-yes --no-install-recommends \
|
14
|
-
curl wget tar gzip gnupg apt-transport-https ca-certificates tzdata locales && \
|
15
|
-
\
|
16
|
-
echo "===> Installing NodeJS" && \
|
17
|
-
apt-get install -y --force-yes --no-install-recommends nodejs && \
|
18
|
-
\
|
19
|
-
echo "===> Installing Yarn" && \
|
20
|
-
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
21
|
-
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
22
|
-
apt-get update && \
|
23
|
-
apt-get install -y --force-yes --no-install-recommends yarn && \
|
24
|
-
\
|
25
|
-
echo "===> Installing database libraries" && \
|
26
|
-
apt-get install -y --force-yes --no-install-recommends \
|
27
|
-
postgresql-client sqlite3 && \
|
28
|
-
\
|
29
|
-
echo "===> Installing dev tools" && \
|
30
|
-
mkdir -p /usr/share/man/man1 && \
|
31
|
-
apt-get install -y --force-yes --no-install-recommends \
|
32
|
-
sudo git openssh-client rsync vim \
|
33
|
-
net-tools netcat parallel unzip zip bzip2 && \
|
34
|
-
\
|
35
|
-
echo "===> Cleaning up" && \
|
36
|
-
rm -rf /var/lib/apt/lists/*;
|
37
|
-
|
38
|
-
# Set timezone to UTC by default
|
39
|
-
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
40
|
-
|
41
|
-
# Set language
|
42
|
-
RUN locale-gen en_US.UTF-8
|
43
|
-
ENV LANG en_US.UTF-8
|
44
|
-
ENV LANGUAGE en_US:en
|
45
|
-
|
46
|
-
# Install RubyGems
|
47
|
-
RUN gem update --system 2.7.9
|
48
|
-
RUN gem install bundler -v '1.17.3'
|
49
|
-
ENV BUNDLE_SILENCE_ROOT_WARNING 1
|
50
|
-
|
51
|
-
# Setup demo environment includes
|
52
|
-
COPY ./include /vendor/dd-demo
|
53
|
-
ENV RUBYLIB /vendor/dd-demo
|
54
|
-
ENV RUBYOPT -rdatadog/demo_env
|
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'ddtrace/contrib/configuration/settings'
|
2
|
-
require 'ddtrace/contrib/cucumber/ext'
|
3
|
-
|
4
|
-
module Datadog
|
5
|
-
module Contrib
|
6
|
-
module Cucumber
|
7
|
-
module Configuration
|
8
|
-
# Custom settings for the Cucumber integration
|
9
|
-
class Settings < Contrib::Configuration::Settings
|
10
|
-
option :enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
-
o.lazy
|
13
|
-
end
|
14
|
-
|
15
|
-
option :service_name do |o|
|
16
|
-
o.default { Datadog.configuration.service || Ext::SERVICE_NAME }
|
17
|
-
o.lazy
|
18
|
-
end
|
19
|
-
|
20
|
-
option :operation_name do |o|
|
21
|
-
o.default { ENV.key?(Ext::ENV_OPERATION_NAME) ? ENV[Ext::ENV_OPERATION_NAME] : Ext::OPERATION_NAME }
|
22
|
-
o.lazy
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module Datadog
|
2
|
-
module Contrib
|
3
|
-
module Cucumber
|
4
|
-
# Cucumber integration constants
|
5
|
-
module Ext
|
6
|
-
APP = 'cucumber'.freeze
|
7
|
-
ENV_ENABLED = 'DD_TRACE_CUCUMBER_ENABLED'.freeze
|
8
|
-
ENV_OPERATION_NAME = 'DD_TRACE_CUCUMBER_OPERATION_NAME'.freeze
|
9
|
-
FRAMEWORK = 'cucumber'.freeze
|
10
|
-
OPERATION_NAME = 'cucumber.test'.freeze
|
11
|
-
SERVICE_NAME = 'cucumber'.freeze
|
12
|
-
STEP_SPAN_TYPE = 'step'.freeze
|
13
|
-
TEST_TYPE = 'test'.freeze
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,98 +0,0 @@
|
|
1
|
-
require 'ddtrace/ext/app_types'
|
2
|
-
require 'ddtrace/ext/ci'
|
3
|
-
require 'ddtrace/ext/test'
|
4
|
-
require 'ddtrace/contrib/analytics'
|
5
|
-
require 'ddtrace/contrib/cucumber/ext'
|
6
|
-
|
7
|
-
module Datadog
|
8
|
-
module Contrib
|
9
|
-
module Cucumber
|
10
|
-
# Defines collection of instrumented Cucumber events
|
11
|
-
class Formatter
|
12
|
-
attr_reader :config, :current_feature_span, :current_step_span
|
13
|
-
private :config
|
14
|
-
private :current_feature_span, :current_step_span
|
15
|
-
|
16
|
-
def initialize(config)
|
17
|
-
@config = config
|
18
|
-
|
19
|
-
bind_events(config)
|
20
|
-
end
|
21
|
-
|
22
|
-
def bind_events(config)
|
23
|
-
config.on_event :test_case_started, &method(:on_test_case_started)
|
24
|
-
config.on_event :test_case_finished, &method(:on_test_case_finished)
|
25
|
-
config.on_event :test_step_started, &method(:on_test_step_started)
|
26
|
-
config.on_event :test_step_finished, &method(:on_test_step_finished)
|
27
|
-
end
|
28
|
-
|
29
|
-
def on_test_case_started(event)
|
30
|
-
trace_options = {
|
31
|
-
app: Ext::APP,
|
32
|
-
resource: event.test_case.name,
|
33
|
-
service: configuration[:service_name],
|
34
|
-
span_type: Datadog::Ext::AppTypes::TEST,
|
35
|
-
tags: tags.merge(Datadog.configuration.tags)
|
36
|
-
}
|
37
|
-
@current_feature_span = tracer.trace(configuration[:operation_name], trace_options)
|
38
|
-
@current_feature_span.set_tag(Datadog::Ext::Test::TAG_FRAMEWORK, Ext::FRAMEWORK)
|
39
|
-
@current_feature_span.set_tag(Datadog::Ext::Test::TAG_NAME, event.test_case.name)
|
40
|
-
@current_feature_span.set_tag(Datadog::Ext::Test::TAG_SUITE, event.test_case.location.file)
|
41
|
-
@current_feature_span.set_tag(Datadog::Ext::Test::TAG_TYPE, Ext::TEST_TYPE)
|
42
|
-
@current_feature_span.set_tag(Datadog::Ext::Test::TAG_SPAN_KIND, Datadog::Ext::AppTypes::TEST)
|
43
|
-
|
44
|
-
# Measure service stats
|
45
|
-
Contrib::Analytics.set_measured(@current_feature_span)
|
46
|
-
end
|
47
|
-
|
48
|
-
def on_test_case_finished(event)
|
49
|
-
return if @current_feature_span.nil?
|
50
|
-
|
51
|
-
@current_feature_span.status = 1 if event.result.failed?
|
52
|
-
@current_feature_span.set_tag(Datadog::Ext::Test::TAG_STATUS, status_from_result(event.result))
|
53
|
-
@current_feature_span.finish
|
54
|
-
end
|
55
|
-
|
56
|
-
def on_test_step_started(event)
|
57
|
-
trace_options = {
|
58
|
-
resource: event.test_step.to_s,
|
59
|
-
span_type: Ext::STEP_SPAN_TYPE
|
60
|
-
}
|
61
|
-
@current_step_span = tracer.trace(Ext::STEP_SPAN_TYPE, trace_options)
|
62
|
-
end
|
63
|
-
|
64
|
-
def on_test_step_finished(event)
|
65
|
-
return if @current_step_span.nil?
|
66
|
-
|
67
|
-
@current_step_span.set_error event.result.exception unless event.result.passed?
|
68
|
-
@current_step_span.set_tag(Datadog::Ext::Test::TAG_STATUS, status_from_result(event.result))
|
69
|
-
@current_step_span.finish
|
70
|
-
end
|
71
|
-
|
72
|
-
private
|
73
|
-
|
74
|
-
def status_from_result(result)
|
75
|
-
if result.skipped?
|
76
|
-
return Datadog::Ext::Test::Status::SKIP
|
77
|
-
elsif result.ok?
|
78
|
-
return Datadog::Ext::Test::Status::PASS
|
79
|
-
end
|
80
|
-
|
81
|
-
Datadog::Ext::Test::Status::FAIL
|
82
|
-
end
|
83
|
-
|
84
|
-
def configuration
|
85
|
-
Datadog.configuration[:cucumber]
|
86
|
-
end
|
87
|
-
|
88
|
-
def tracer
|
89
|
-
configuration[:tracer]
|
90
|
-
end
|
91
|
-
|
92
|
-
def tags
|
93
|
-
@tags ||= Datadog::Ext::CI.tags(ENV)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'ddtrace/contrib/cucumber/formatter'
|
2
|
-
|
3
|
-
module Datadog
|
4
|
-
module Contrib
|
5
|
-
module Cucumber
|
6
|
-
# Instrumentation for Cucumber
|
7
|
-
module Instrumentation
|
8
|
-
def self.included(base)
|
9
|
-
base.send(:prepend, InstanceMethods)
|
10
|
-
end
|
11
|
-
|
12
|
-
# Instance methods for configuration
|
13
|
-
module InstanceMethods
|
14
|
-
attr_reader :datadog_formatter
|
15
|
-
|
16
|
-
def formatters
|
17
|
-
@datadog_formatter ||= Datadog::Contrib::Cucumber::Formatter.new(@configuration)
|
18
|
-
[@datadog_formatter] + super
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'ddtrace/contrib/integration'
|
2
|
-
require 'ddtrace/contrib/cucumber/configuration/settings'
|
3
|
-
require 'ddtrace/contrib/cucumber/patcher'
|
4
|
-
require 'ddtrace/contrib/integration'
|
5
|
-
|
6
|
-
module Datadog
|
7
|
-
module Contrib
|
8
|
-
module Cucumber
|
9
|
-
# Description of Cucumber integration
|
10
|
-
class Integration
|
11
|
-
include Contrib::Integration
|
12
|
-
|
13
|
-
MINIMUM_VERSION = Gem::Version.new('3.0.0')
|
14
|
-
|
15
|
-
register_as :cucumber, auto_patch: true
|
16
|
-
|
17
|
-
def self.version
|
18
|
-
Gem.loaded_specs['cucumber'] \
|
19
|
-
&& Gem.loaded_specs['cucumber'].version
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.loaded?
|
23
|
-
!defined?(::Cucumber).nil? && !defined?(::Cucumber::Runtime).nil?
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.compatible?
|
27
|
-
super && version >= MINIMUM_VERSION
|
28
|
-
end
|
29
|
-
|
30
|
-
# test environments should not auto instrument test libraries
|
31
|
-
def auto_instrument?
|
32
|
-
false
|
33
|
-
end
|
34
|
-
|
35
|
-
def default_configuration
|
36
|
-
Configuration::Settings.new
|
37
|
-
end
|
38
|
-
|
39
|
-
def patcher
|
40
|
-
Patcher
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'ddtrace/contrib/patcher'
|
2
|
-
require 'ddtrace/contrib/cucumber/instrumentation'
|
3
|
-
|
4
|
-
module Datadog
|
5
|
-
module Contrib
|
6
|
-
module Cucumber
|
7
|
-
# Patcher enables patching of 'cucumber' module.
|
8
|
-
module Patcher
|
9
|
-
include Contrib::Patcher
|
10
|
-
|
11
|
-
module_function
|
12
|
-
|
13
|
-
def target_version
|
14
|
-
Integration.version
|
15
|
-
end
|
16
|
-
|
17
|
-
def patch
|
18
|
-
::Cucumber::Runtime.send(:include, Instrumentation)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'ddtrace/contrib/configuration/settings'
|
2
|
-
require 'ddtrace/contrib/rspec/ext'
|
3
|
-
|
4
|
-
module Datadog
|
5
|
-
module Contrib
|
6
|
-
module RSpec
|
7
|
-
module Configuration
|
8
|
-
# Custom settings for the RSpec integration
|
9
|
-
class Settings < Contrib::Configuration::Settings
|
10
|
-
option :enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
-
o.lazy
|
13
|
-
end
|
14
|
-
|
15
|
-
option :service_name do |o|
|
16
|
-
o.default { Datadog.configuration.service || Ext::SERVICE_NAME }
|
17
|
-
o.lazy
|
18
|
-
end
|
19
|
-
|
20
|
-
option :operation_name do |o|
|
21
|
-
o.default { ENV.key?(Ext::ENV_OPERATION_NAME) ? ENV[Ext::ENV_OPERATION_NAME] : Ext::OPERATION_NAME }
|
22
|
-
o.lazy
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,75 +0,0 @@
|
|
1
|
-
module Datadog
|
2
|
-
module Contrib
|
3
|
-
module RSpec
|
4
|
-
# Instrument RSpec::Core::Example
|
5
|
-
module Example
|
6
|
-
def self.included(base)
|
7
|
-
base.send(:prepend, InstanceMethods)
|
8
|
-
end
|
9
|
-
|
10
|
-
# Instance methods for configuration
|
11
|
-
module InstanceMethods
|
12
|
-
def run(example_group_instance, reporter)
|
13
|
-
return super unless configuration[:enabled]
|
14
|
-
|
15
|
-
test_name = full_description.strip
|
16
|
-
if metadata[:description].empty?
|
17
|
-
# for unnamed it blocks this appends something like "example at ./spec/some_spec.rb:10"
|
18
|
-
test_name += " #{description}"
|
19
|
-
end
|
20
|
-
|
21
|
-
trace_options = {
|
22
|
-
app: Ext::APP,
|
23
|
-
resource: test_name,
|
24
|
-
service: configuration[:service_name],
|
25
|
-
span_type: Datadog::Ext::AppTypes::TEST,
|
26
|
-
tags: tags.merge(Datadog.configuration.tags)
|
27
|
-
}
|
28
|
-
|
29
|
-
tracer.trace(configuration[:operation_name], trace_options) do |span|
|
30
|
-
span.set_tag(Datadog::Ext::Test::TAG_FRAMEWORK, Ext::FRAMEWORK)
|
31
|
-
span.set_tag(Datadog::Ext::Test::TAG_NAME, test_name)
|
32
|
-
span.set_tag(Datadog::Ext::Test::TAG_SUITE, file_path)
|
33
|
-
span.set_tag(Datadog::Ext::Test::TAG_TYPE, Ext::TEST_TYPE)
|
34
|
-
span.set_tag(Datadog::Ext::Test::TAG_SPAN_KIND, Datadog::Ext::AppTypes::TEST)
|
35
|
-
|
36
|
-
# Measure service stats
|
37
|
-
Contrib::Analytics.set_measured(span)
|
38
|
-
|
39
|
-
result = super
|
40
|
-
|
41
|
-
case execution_result.status
|
42
|
-
when :passed
|
43
|
-
span.set_tag(Datadog::Ext::Test::TAG_STATUS, Datadog::Ext::Test::Status::PASS)
|
44
|
-
when :failed
|
45
|
-
span.status = 1
|
46
|
-
span.set_tag(Datadog::Ext::Test::TAG_STATUS, Datadog::Ext::Test::Status::FAIL)
|
47
|
-
span.set_error(execution_result.exception)
|
48
|
-
else
|
49
|
-
if execution_result.example_skipped?
|
50
|
-
span.set_tag(Datadog::Ext::Test::TAG_STATUS, Datadog::Ext::Test::Status::SKIP)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
result
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
private
|
59
|
-
|
60
|
-
def configuration
|
61
|
-
Datadog.configuration[:rspec]
|
62
|
-
end
|
63
|
-
|
64
|
-
def tracer
|
65
|
-
configuration[:tracer]
|
66
|
-
end
|
67
|
-
|
68
|
-
def tags
|
69
|
-
@tags ||= Datadog::Ext::CI.tags(ENV)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Datadog
|
2
|
-
module Contrib
|
3
|
-
module RSpec
|
4
|
-
# RSpec integration constants
|
5
|
-
module Ext
|
6
|
-
APP = 'rspec'.freeze
|
7
|
-
ENV_ENABLED = 'DD_TRACE_RSPEC_ENABLED'.freeze
|
8
|
-
ENV_OPERATION_NAME = 'DD_TRACE_RSPEC_OPERATION_NAME'.freeze
|
9
|
-
FRAMEWORK = 'rspec'.freeze
|
10
|
-
OPERATION_NAME = 'rspec.example'.freeze
|
11
|
-
SERVICE_NAME = 'rspec'.freeze
|
12
|
-
TEST_TYPE = 'test'.freeze
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'ddtrace/contrib/integration'
|
2
|
-
require 'ddtrace/contrib/rspec/configuration/settings'
|
3
|
-
require 'ddtrace/contrib/rspec/patcher'
|
4
|
-
require 'ddtrace/contrib/integration'
|
5
|
-
|
6
|
-
module Datadog
|
7
|
-
module Contrib
|
8
|
-
module RSpec
|
9
|
-
# Description of RSpec integration
|
10
|
-
class Integration
|
11
|
-
include Contrib::Integration
|
12
|
-
|
13
|
-
MINIMUM_VERSION = Gem::Version.new('3.0.0')
|
14
|
-
|
15
|
-
register_as :rspec, auto_patch: true
|
16
|
-
|
17
|
-
def self.version
|
18
|
-
Gem.loaded_specs['rspec'] \
|
19
|
-
&& Gem.loaded_specs['rspec'].version
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.loaded?
|
23
|
-
!defined?(::RSpec).nil? && !defined?(::RSpec::Core).nil? && \
|
24
|
-
!defined?(::RSpec::Core::Example).nil?
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.compatible?
|
28
|
-
super && version >= MINIMUM_VERSION
|
29
|
-
end
|
30
|
-
|
31
|
-
# test environments should not auto instrument test libraries
|
32
|
-
def auto_instrument?
|
33
|
-
false
|
34
|
-
end
|
35
|
-
|
36
|
-
def default_configuration
|
37
|
-
Configuration::Settings.new
|
38
|
-
end
|
39
|
-
|
40
|
-
def patcher
|
41
|
-
Patcher
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|