ddtrace 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +79 -0
- data/.rubocop.yml +250 -7
- data/.rubocop_todo.yml +396 -0
- data/Appraisals +15 -0
- data/CHANGELOG.md +68 -1
- data/Gemfile +38 -3
- data/Rakefile +5 -23
- data/ddtrace.gemspec +6 -36
- data/docs/DevelopmentGuide.md +28 -0
- data/docs/GettingStarted.md +8 -9
- data/integration/README.md +68 -0
- data/integration/apps/rack/.dockerignore +1 -0
- data/integration/apps/rack/.envrc.sample +1 -0
- data/integration/apps/rack/.gitignore +4 -0
- data/integration/apps/rack/.rspec +1 -0
- data/integration/apps/rack/Dockerfile +25 -0
- data/integration/apps/rack/Dockerfile-ci +11 -0
- data/integration/apps/rack/Gemfile +24 -0
- data/integration/apps/rack/README.md +93 -0
- data/integration/apps/rack/app/acme.rb +80 -0
- data/integration/apps/rack/app/datadog.rb +17 -0
- data/integration/apps/rack/bin/run +22 -0
- data/integration/apps/rack/bin/setup +17 -0
- data/integration/apps/rack/bin/test +24 -0
- data/integration/apps/rack/config.ru +6 -0
- data/integration/apps/rack/config/puma.rb +14 -0
- data/integration/apps/rack/config/unicorn.rb +23 -0
- data/integration/apps/rack/docker-compose.ci.yml +62 -0
- data/integration/apps/rack/docker-compose.yml +78 -0
- data/integration/apps/rack/script/build-images +38 -0
- data/integration/apps/rack/script/ci +50 -0
- data/integration/apps/rack/spec/integration/basic_spec.rb +10 -0
- data/integration/apps/rack/spec/spec_helper.rb +16 -0
- data/integration/apps/rack/spec/support/integration_helper.rb +22 -0
- data/integration/apps/rails-five/.dockerignore +1 -0
- data/integration/apps/rails-five/.env +3 -0
- data/integration/apps/rails-five/.envrc.sample +1 -0
- data/integration/apps/rails-five/.gitignore +30 -0
- data/integration/apps/rails-five/Dockerfile +25 -0
- data/integration/apps/rails-five/Dockerfile-ci +11 -0
- data/integration/apps/rails-five/Gemfile +104 -0
- data/integration/apps/rails-five/README.md +94 -0
- data/integration/apps/rails-five/Rakefile +6 -0
- data/integration/apps/rails-five/app/channels/application_cable/channel.rb +4 -0
- data/integration/apps/rails-five/app/channels/application_cable/connection.rb +4 -0
- data/integration/apps/rails-five/app/controllers/application_controller.rb +2 -0
- data/integration/apps/rails-five/app/controllers/basic_controller.rb +36 -0
- data/integration/apps/rails-five/app/controllers/concerns/.keep +0 -0
- data/integration/apps/rails-five/app/controllers/health_controller.rb +9 -0
- data/integration/apps/rails-five/app/controllers/jobs_controller.rb +12 -0
- data/integration/apps/rails-five/app/jobs/application_job.rb +2 -0
- data/integration/apps/rails-five/app/jobs/test_job.rb +12 -0
- data/integration/apps/rails-five/app/mailers/application_mailer.rb +4 -0
- data/integration/apps/rails-five/app/models/application_record.rb +3 -0
- data/integration/apps/rails-five/app/models/concerns/.keep +0 -0
- data/integration/apps/rails-five/app/models/test.rb +2 -0
- data/integration/apps/rails-five/app/views/layouts/mailer.html.erb +13 -0
- data/integration/apps/rails-five/app/views/layouts/mailer.text.erb +1 -0
- data/integration/apps/rails-five/bin/bundle +3 -0
- data/integration/apps/rails-five/bin/rails +9 -0
- data/integration/apps/rails-five/bin/rake +9 -0
- data/integration/apps/rails-five/bin/run +24 -0
- data/integration/apps/rails-five/bin/setup +27 -0
- data/integration/apps/rails-five/bin/spring +17 -0
- data/integration/apps/rails-five/bin/test +21 -0
- data/integration/apps/rails-five/bin/update +28 -0
- data/integration/apps/rails-five/config.ru +5 -0
- data/integration/apps/rails-five/config/application.rb +97 -0
- data/integration/apps/rails-five/config/boot.rb +4 -0
- data/integration/apps/rails-five/config/cable.yml +10 -0
- data/integration/apps/rails-five/config/credentials.yml.enc +1 -0
- data/integration/apps/rails-five/config/database.yml +28 -0
- data/integration/apps/rails-five/config/environment.rb +5 -0
- data/integration/apps/rails-five/config/environments/development.rb +51 -0
- data/integration/apps/rails-five/config/environments/production.rb +82 -0
- data/integration/apps/rails-five/config/environments/test.rb +43 -0
- data/integration/apps/rails-five/config/initializers/datadog.rb +18 -0
- data/integration/apps/rails-five/config/initializers/filter_parameter_logging.rb +4 -0
- data/integration/apps/rails-five/config/initializers/resque.rb +4 -0
- data/integration/apps/rails-five/config/initializers/rollbar.rb +5 -0
- data/integration/apps/rails-five/config/initializers/wrap_parameters.rb +14 -0
- data/integration/apps/rails-five/config/locales/en.yml +33 -0
- data/integration/apps/rails-five/config/puma.rb +24 -0
- data/integration/apps/rails-five/config/routes.rb +11 -0
- data/integration/apps/rails-five/config/spring.rb +6 -0
- data/integration/apps/rails-five/config/unicorn.rb +29 -0
- data/integration/apps/rails-five/db/migrate/20190927215052_create_tests.rb +11 -0
- data/integration/apps/rails-five/db/schema.rb +23 -0
- data/integration/apps/rails-five/db/seeds.rb +7 -0
- data/integration/apps/rails-five/docker-compose.ci.yml +98 -0
- data/integration/apps/rails-five/docker-compose.yml +100 -0
- data/integration/apps/rails-five/lib/tasks/.keep +0 -0
- data/integration/apps/rails-five/log/.keep +0 -0
- data/integration/apps/rails-five/public/robots.txt +1 -0
- data/integration/apps/rails-five/script/build-images +35 -0
- data/integration/apps/rails-five/script/ci +50 -0
- data/integration/apps/rails-five/spec/integration/basic_spec.rb +10 -0
- data/integration/apps/rails-five/spec/spec_helper.rb +16 -0
- data/integration/apps/rails-five/spec/support/integration_helper.rb +22 -0
- data/integration/apps/rails-five/storage/.keep +0 -0
- data/integration/apps/rails-five/tmp/.keep +0 -0
- data/integration/apps/rails-five/vendor/.keep +0 -0
- data/integration/apps/ruby/.dockerignore +1 -0
- data/integration/apps/ruby/.envrc.sample +1 -0
- data/integration/apps/ruby/.gitignore +2 -0
- data/integration/apps/ruby/Dockerfile +25 -0
- data/integration/apps/ruby/Dockerfile-ci +11 -0
- data/integration/apps/ruby/Gemfile +11 -0
- data/integration/apps/ruby/README.md +70 -0
- data/integration/apps/ruby/agent.yaml +3 -0
- data/integration/apps/ruby/app/datadog.rb +13 -0
- data/integration/apps/ruby/app/fibonacci.rb +58 -0
- data/integration/apps/ruby/bin/run +20 -0
- data/integration/apps/ruby/bin/setup +17 -0
- data/integration/apps/ruby/bin/test +21 -0
- data/integration/apps/ruby/docker-compose.ci.yml +51 -0
- data/integration/apps/ruby/docker-compose.yml +63 -0
- data/integration/apps/ruby/script/build-images +38 -0
- data/integration/apps/ruby/script/ci +50 -0
- data/integration/images/agent/Dockerfile +2 -0
- data/integration/images/agent/agent.yaml +3 -0
- data/integration/images/include/datadog/analyzer.rb +71 -0
- data/integration/images/include/datadog/demo_env.rb +101 -0
- data/integration/images/include/http-health-check +33 -0
- data/integration/images/ruby/2.0/Dockerfile +54 -0
- data/integration/images/ruby/2.1/Dockerfile +54 -0
- data/integration/images/ruby/2.2/Dockerfile +54 -0
- data/integration/images/ruby/2.3/Dockerfile +70 -0
- data/integration/images/ruby/2.4/Dockerfile +54 -0
- data/integration/images/ruby/2.5/Dockerfile +54 -0
- data/integration/images/ruby/2.6/Dockerfile +54 -0
- data/integration/images/ruby/2.7/Dockerfile +54 -0
- data/integration/images/ruby/3.0/Dockerfile +54 -0
- data/integration/images/wrk/Dockerfile +33 -0
- data/integration/images/wrk/scripts/entrypoint.sh +17 -0
- data/integration/images/wrk/scripts/scenarios/basic/default.lua +1 -0
- data/integration/images/wrk/scripts/scenarios/basic/fibonacci.lua +1 -0
- data/integration/script/build-images +43 -0
- data/lib/ddtrace.rb +0 -5
- data/lib/ddtrace/analytics.rb +2 -0
- data/lib/ddtrace/buffer.rb +4 -4
- data/lib/ddtrace/configuration.rb +1 -1
- data/lib/ddtrace/configuration/base.rb +1 -1
- data/lib/ddtrace/configuration/components.rb +2 -2
- data/lib/ddtrace/configuration/option_definition.rb +1 -3
- data/lib/ddtrace/configuration/options.rb +2 -3
- data/lib/ddtrace/configuration/settings.rb +17 -3
- data/lib/ddtrace/context.rb +5 -6
- data/lib/ddtrace/context_provider.rb +1 -0
- data/lib/ddtrace/contrib/action_cable/event.rb +1 -0
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +1 -3
- data/lib/ddtrace/contrib/action_view/event.rb +1 -1
- data/lib/ddtrace/contrib/action_view/utils.rb +1 -1
- data/lib/ddtrace/contrib/active_record/configuration/resolver.rb +17 -5
- data/lib/ddtrace/contrib/active_record/utils.rb +1 -0
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +2 -1
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +1 -0
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +9 -5
- data/lib/ddtrace/contrib/auto_instrument.rb +1 -0
- data/lib/ddtrace/contrib/aws/patcher.rb +1 -0
- data/lib/ddtrace/contrib/aws/services.rb +1 -0
- data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +1 -4
- data/lib/ddtrace/contrib/cucumber/configuration/settings.rb +0 -10
- data/lib/ddtrace/contrib/cucumber/ext.rb +0 -2
- data/lib/ddtrace/contrib/cucumber/formatter.rb +5 -11
- data/lib/ddtrace/contrib/dalli/patcher.rb +0 -38
- data/lib/ddtrace/contrib/delayed_job/plugin.rb +0 -1
- data/lib/ddtrace/contrib/elasticsearch/quantize.rb +3 -2
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +5 -5
- data/lib/ddtrace/contrib/excon/middleware.rb +2 -6
- data/lib/ddtrace/contrib/extensions.rb +1 -0
- data/lib/ddtrace/contrib/faraday/middleware.rb +1 -3
- data/lib/ddtrace/contrib/faraday/patcher.rb +0 -36
- data/lib/ddtrace/contrib/grape/endpoint.rb +8 -15
- data/lib/ddtrace/contrib/grape/patcher.rb +0 -42
- data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +8 -8
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +1 -0
- data/lib/ddtrace/contrib/grpc/patcher.rb +0 -36
- data/lib/ddtrace/contrib/http/circuit_breaker.rb +1 -3
- data/lib/ddtrace/contrib/http/instrumentation.rb +5 -5
- data/lib/ddtrace/contrib/httpclient/instrumentation.rb +2 -3
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +2 -3
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +2 -0
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +2 -3
- data/lib/ddtrace/contrib/patcher.rb +1 -1
- data/lib/ddtrace/contrib/qless/qless_job.rb +1 -0
- data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +1 -0
- data/lib/ddtrace/contrib/que/ext.rb +19 -19
- data/lib/ddtrace/contrib/que/tracer.rb +1 -1
- data/lib/ddtrace/contrib/racecar/event.rb +1 -0
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +3 -3
- data/lib/ddtrace/contrib/rack/middlewares.rb +5 -10
- data/lib/ddtrace/contrib/rack/patcher.rb +1 -3
- data/lib/ddtrace/contrib/rake/instrumentation.rb +4 -2
- data/lib/ddtrace/contrib/redis/quantize.rb +1 -0
- data/lib/ddtrace/contrib/redis/vendor/LICENSE +20 -0
- data/lib/ddtrace/contrib/redis/vendor/resolver.rb +6 -7
- data/lib/ddtrace/contrib/registry.rb +2 -2
- data/lib/ddtrace/contrib/resque/resque_job.rb +2 -0
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +1 -3
- data/lib/ddtrace/contrib/rspec/configuration/settings.rb +0 -10
- data/lib/ddtrace/contrib/rspec/example.rb +24 -10
- data/lib/ddtrace/contrib/rspec/ext.rb +0 -3
- data/lib/ddtrace/contrib/rspec/integration.rb +1 -1
- data/lib/ddtrace/contrib/rspec/patcher.rb +0 -2
- data/lib/ddtrace/contrib/sequel/utils.rb +5 -6
- data/lib/ddtrace/contrib/shoryuken/tracer.rb +0 -1
- data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +2 -7
- data/lib/ddtrace/contrib/sidekiq/tracing.rb +0 -1
- data/lib/ddtrace/contrib/sinatra/env.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/headers.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/tracer.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +3 -3
- data/lib/ddtrace/contrib/sneakers/ext.rb +11 -11
- data/lib/ddtrace/contrib/sneakers/tracer.rb +2 -4
- data/lib/ddtrace/contrib/status_code_matcher.rb +5 -3
- data/lib/ddtrace/correlation.rb +1 -0
- data/lib/ddtrace/diagnostics/environment_logger.rb +2 -1
- data/lib/ddtrace/distributed_tracing/headers/headers.rb +1 -0
- data/lib/ddtrace/distributed_tracing/headers/helpers.rb +1 -3
- data/lib/ddtrace/ext/ci.rb +2 -2
- data/lib/ddtrace/ext/distributed.rb +1 -1
- data/lib/ddtrace/ext/http.rb +1 -1
- data/lib/ddtrace/ext/runtime.rb +1 -1
- data/lib/ddtrace/forced_tracing.rb +2 -0
- data/lib/ddtrace/logger.rb +1 -1
- data/lib/ddtrace/metrics.rb +10 -6
- data/lib/ddtrace/opentracer/distributed_headers.rb +3 -0
- data/lib/ddtrace/opentracer/span.rb +2 -6
- data/lib/ddtrace/opentracer/thread_local_scope.rb +1 -0
- data/lib/ddtrace/patcher.rb +2 -3
- data/lib/ddtrace/pin.rb +3 -52
- data/lib/ddtrace/pipeline/span_filter.rb +1 -1
- data/lib/ddtrace/propagation/grpc_propagator.rb +1 -0
- data/lib/ddtrace/quantization/http.rb +1 -0
- data/lib/ddtrace/runtime/cgroup.rb +1 -1
- data/lib/ddtrace/runtime/container.rb +2 -2
- data/lib/ddtrace/sampler.rb +1 -1
- data/lib/ddtrace/sampling/rule_sampler.rb +1 -0
- data/lib/ddtrace/span.rb +7 -7
- data/lib/ddtrace/sync_writer.rb +7 -10
- data/lib/ddtrace/tracer.rb +1 -1
- data/lib/ddtrace/transport/http.rb +1 -3
- data/lib/ddtrace/transport/http/adapters/net.rb +9 -4
- data/lib/ddtrace/transport/http/adapters/registry.rb +1 -0
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +2 -4
- data/lib/ddtrace/transport/http/builder.rb +2 -0
- data/lib/ddtrace/transport/http/traces.rb +2 -3
- data/lib/ddtrace/transport/io.rb +1 -1
- data/lib/ddtrace/transport/traces.rb +3 -0
- data/lib/ddtrace/utils/time.rb +25 -1
- data/lib/ddtrace/vendor/active_record/MIT-LICENSE +20 -0
- data/lib/ddtrace/version.rb +1 -1
- data/lib/ddtrace/workers.rb +5 -0
- data/lib/ddtrace/workers/async.rb +8 -0
- data/lib/ddtrace/workers/loop.rb +3 -0
- data/lib/ddtrace/workers/polling.rb +1 -0
- data/lib/ddtrace/workers/trace_writer.rb +9 -10
- data/lib/ddtrace/writer.rb +3 -3
- metadata +133 -400
- data/lib/ddtrace/augmentation.rb +0 -13
- data/lib/ddtrace/augmentation/method_wrapper.rb +0 -20
- data/lib/ddtrace/augmentation/method_wrapping.rb +0 -38
- data/lib/ddtrace/augmentation/shim.rb +0 -102
- data/lib/ddtrace/contrib/rspec/example_group.rb +0 -61
- data/lib/ddtrace/monkey.rb +0 -58
data/Appraisals
CHANGED
|
@@ -731,6 +731,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
731
731
|
gem 'activerecord-jdbcmysql-adapter', platform: :jruby
|
|
732
732
|
gem 'sprockets', '< 4'
|
|
733
733
|
gem 'lograge'
|
|
734
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
734
735
|
end
|
|
735
736
|
|
|
736
737
|
appraise 'rails5-postgres' do
|
|
@@ -739,6 +740,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
739
740
|
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
|
|
740
741
|
gem 'sprockets', '< 4'
|
|
741
742
|
gem 'lograge'
|
|
743
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
742
744
|
end
|
|
743
745
|
|
|
744
746
|
appraise 'rails5-postgres-redis' do
|
|
@@ -748,6 +750,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
748
750
|
gem 'redis', '>= 4.0.1'
|
|
749
751
|
gem 'sprockets', '< 4'
|
|
750
752
|
gem 'lograge'
|
|
753
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
751
754
|
end
|
|
752
755
|
|
|
753
756
|
appraise 'rails5-postgres-redis-activesupport' do
|
|
@@ -757,6 +760,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
757
760
|
gem 'redis', '>= 4.0.1'
|
|
758
761
|
gem 'sprockets', '< 4'
|
|
759
762
|
gem 'lograge'
|
|
763
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
760
764
|
end
|
|
761
765
|
|
|
762
766
|
appraise 'rails5-postgres-sidekiq' do
|
|
@@ -767,6 +771,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
767
771
|
gem 'activejob'
|
|
768
772
|
gem 'sprockets', '< 4'
|
|
769
773
|
gem 'lograge'
|
|
774
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
770
775
|
end
|
|
771
776
|
|
|
772
777
|
appraise 'rails6-mysql2' do
|
|
@@ -775,6 +780,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
775
780
|
gem 'activerecord-jdbcmysql-adapter', '>= 60', platform: :jruby # try remove >= 60
|
|
776
781
|
gem 'sprockets', '< 4'
|
|
777
782
|
gem 'lograge'
|
|
783
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
778
784
|
end
|
|
779
785
|
|
|
780
786
|
appraise 'rails6-postgres' do
|
|
@@ -783,6 +789,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
783
789
|
gem 'activerecord-jdbcpostgresql-adapter', '>= 60', platform: :jruby
|
|
784
790
|
gem 'sprockets', '< 4'
|
|
785
791
|
gem 'lograge'
|
|
792
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
786
793
|
end
|
|
787
794
|
|
|
788
795
|
appraise 'rails6-postgres-redis' do
|
|
@@ -792,6 +799,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
792
799
|
gem 'redis', '>= 4.0.1'
|
|
793
800
|
gem 'sprockets', '< 4'
|
|
794
801
|
gem 'lograge'
|
|
802
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
795
803
|
end
|
|
796
804
|
|
|
797
805
|
appraise 'rails6-postgres-redis-activesupport' do
|
|
@@ -801,6 +809,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
801
809
|
gem 'redis', '>= 4.0.1'
|
|
802
810
|
gem 'sprockets', '< 4'
|
|
803
811
|
gem 'lograge'
|
|
812
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
804
813
|
end
|
|
805
814
|
|
|
806
815
|
appraise 'rails6-postgres-sidekiq' do
|
|
@@ -811,6 +820,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
811
820
|
gem 'activejob'
|
|
812
821
|
gem 'sprockets', '< 4'
|
|
813
822
|
gem 'lograge'
|
|
823
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
814
824
|
end
|
|
815
825
|
|
|
816
826
|
appraise 'rails61-mysql2' do
|
|
@@ -819,6 +829,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
819
829
|
gem 'activerecord-jdbcmysql-adapter', '>= 61', platform: :jruby
|
|
820
830
|
gem 'sprockets', '< 4'
|
|
821
831
|
gem 'lograge', '~> 0.11'
|
|
832
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
822
833
|
end
|
|
823
834
|
|
|
824
835
|
appraise 'rails61-postgres' do
|
|
@@ -827,6 +838,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
827
838
|
gem 'activerecord-jdbcpostgresql-adapter', '>= 61', platform: :jruby
|
|
828
839
|
gem 'sprockets', '< 4'
|
|
829
840
|
gem 'lograge', '~> 0.11'
|
|
841
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
830
842
|
end
|
|
831
843
|
|
|
832
844
|
appraise 'rails61-postgres-redis' do
|
|
@@ -836,6 +848,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
836
848
|
gem 'redis', '>= 4.2.5'
|
|
837
849
|
gem 'sprockets', '< 4'
|
|
838
850
|
gem 'lograge', '~> 0.11'
|
|
851
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
839
852
|
end
|
|
840
853
|
|
|
841
854
|
appraise 'rails61-postgres-sidekiq' do
|
|
@@ -845,6 +858,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
845
858
|
gem 'sidekiq', '>= 6.1.2'
|
|
846
859
|
gem 'sprockets', '< 4'
|
|
847
860
|
gem 'lograge', '~> 0.11'
|
|
861
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
848
862
|
end
|
|
849
863
|
|
|
850
864
|
appraise 'resque2-redis3' do
|
|
@@ -880,6 +894,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
880
894
|
gem 'hiredis'
|
|
881
895
|
gem 'http'
|
|
882
896
|
gem 'httpclient'
|
|
897
|
+
gem 'i18n', '1.8.7', platform: :jruby # Removal pending: https://github.com/ruby-i18n/i18n/issues/555#issuecomment-772112169
|
|
883
898
|
gem 'mongo', '>= 2.8.0'
|
|
884
899
|
gem 'mysql2', '< 1', platform: :ruby
|
|
885
900
|
gem 'activerecord-jdbcmysql-adapter', '>= 60.2', platform: :jruby
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.46.0] - 2021-03-03
|
|
6
|
+
|
|
7
|
+
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.46.0
|
|
8
|
+
|
|
9
|
+
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.45.0...v0.46.0
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Add EventBridge to supported AWS services ([#1368][]) ([@tomgi][])
|
|
14
|
+
- Add `time_now_provider` configuration option ([#1224][])
|
|
15
|
+
- This new option allows the span `start_time` and `end_time` to be configured in environments that change the default time provider, like with *Timecop*. More information in the [official documentation](https://docs.datadoghq.com/tracing/setup_overview/setup/ruby/#tracer-settings).
|
|
16
|
+
- Add name to background threads created by ddtrace ([#1366][])
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Rework RSpec instrumentation as separate traces for each test ([#1381][])
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- ArgumentError: wrong number of arguments (given 2, expected 0) due to concurrent `require` ([#1306][], [#1354][]) ([@EvNomad][])
|
|
25
|
+
- Fix Rails' deprecation warnings ([#1352][])
|
|
26
|
+
- Fully populate Rake span fields on exceptions ([#1377][])
|
|
27
|
+
- Fix a typo in `httpclient` integration ([#1365][]) ([@y-yagi][])
|
|
28
|
+
- Add missing license files for vendor'd code ([#1346][])
|
|
29
|
+
|
|
30
|
+
### Refactored
|
|
31
|
+
|
|
32
|
+
- Improvements to test suite & CI ([#1277][], [#1305][], [#1336][], [#1350][], [#1353][], [#1357][], [#1367][], [#1369][], [#1370][], [#1371][], [#1374][], [#1380][])
|
|
33
|
+
- Improvements to documentation ([#1332][])
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
|
|
37
|
+
- Remove deprecated Datadog::Monkey ([#1341][])
|
|
38
|
+
- Remove deprecated Datadog::DeprecatedPin ([#1342][])
|
|
39
|
+
- Remove unused Shim/MethodWrapper/MethodWrapping ([#1347][])
|
|
40
|
+
- Remove APP_ANALYTICS from tests instrumentation ([#1378][]) ([@AdrianLC][])
|
|
41
|
+
|
|
5
42
|
## [0.45.0] - 2021-01-26
|
|
6
43
|
|
|
7
44
|
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.45.0
|
|
@@ -1546,7 +1583,8 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
|
|
|
1546
1583
|
|
|
1547
1584
|
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
1548
1585
|
|
|
1549
|
-
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.
|
|
1586
|
+
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.46.0...master
|
|
1587
|
+
[0.46.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.45.0...v0.46.0
|
|
1550
1588
|
[0.45.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.44.0...v0.45.0
|
|
1551
1589
|
[0.44.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.43.0...v0.44.0
|
|
1552
1590
|
[0.43.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.42.0...v0.43.0
|
|
@@ -2097,6 +2135,7 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
|
2097
2135
|
[#1217]: https://github.com/DataDog/dd-trace-rb/issues/1217
|
|
2098
2136
|
[#1218]: https://github.com/DataDog/dd-trace-rb/issues/1218
|
|
2099
2137
|
[#1220]: https://github.com/DataDog/dd-trace-rb/issues/1220
|
|
2138
|
+
[#1224]: https://github.com/DataDog/dd-trace-rb/issues/1224
|
|
2100
2139
|
[#1225]: https://github.com/DataDog/dd-trace-rb/issues/1225
|
|
2101
2140
|
[#1226]: https://github.com/DataDog/dd-trace-rb/issues/1226
|
|
2102
2141
|
[#1227]: https://github.com/DataDog/dd-trace-rb/issues/1227
|
|
@@ -2146,6 +2185,8 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
|
2146
2185
|
[#1302]: https://github.com/DataDog/dd-trace-rb/issues/1302
|
|
2147
2186
|
[#1303]: https://github.com/DataDog/dd-trace-rb/issues/1303
|
|
2148
2187
|
[#1304]: https://github.com/DataDog/dd-trace-rb/issues/1304
|
|
2188
|
+
[#1305]: https://github.com/DataDog/dd-trace-rb/issues/1305
|
|
2189
|
+
[#1306]: https://github.com/DataDog/dd-trace-rb/issues/1306
|
|
2149
2190
|
[#1307]: https://github.com/DataDog/dd-trace-rb/issues/1307
|
|
2150
2191
|
[#1309]: https://github.com/DataDog/dd-trace-rb/issues/1309
|
|
2151
2192
|
[#1311]: https://github.com/DataDog/dd-trace-rb/issues/1311
|
|
@@ -2157,10 +2198,35 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
|
2157
2198
|
[#1325]: https://github.com/DataDog/dd-trace-rb/issues/1325
|
|
2158
2199
|
[#1326]: https://github.com/DataDog/dd-trace-rb/issues/1326
|
|
2159
2200
|
[#1331]: https://github.com/DataDog/dd-trace-rb/issues/1331
|
|
2201
|
+
[#1332]: https://github.com/DataDog/dd-trace-rb/issues/1332
|
|
2202
|
+
[#1336]: https://github.com/DataDog/dd-trace-rb/issues/1336
|
|
2203
|
+
[#1341]: https://github.com/DataDog/dd-trace-rb/issues/1341
|
|
2204
|
+
[#1342]: https://github.com/DataDog/dd-trace-rb/issues/1342
|
|
2205
|
+
[#1346]: https://github.com/DataDog/dd-trace-rb/issues/1346
|
|
2206
|
+
[#1347]: https://github.com/DataDog/dd-trace-rb/issues/1347
|
|
2207
|
+
[#1350]: https://github.com/DataDog/dd-trace-rb/issues/1350
|
|
2208
|
+
[#1352]: https://github.com/DataDog/dd-trace-rb/issues/1352
|
|
2209
|
+
[#1353]: https://github.com/DataDog/dd-trace-rb/issues/1353
|
|
2210
|
+
[#1354]: https://github.com/DataDog/dd-trace-rb/issues/1354
|
|
2211
|
+
[#1357]: https://github.com/DataDog/dd-trace-rb/issues/1357
|
|
2212
|
+
[#1365]: https://github.com/DataDog/dd-trace-rb/issues/1365
|
|
2213
|
+
[#1366]: https://github.com/DataDog/dd-trace-rb/issues/1366
|
|
2214
|
+
[#1367]: https://github.com/DataDog/dd-trace-rb/issues/1367
|
|
2215
|
+
[#1368]: https://github.com/DataDog/dd-trace-rb/issues/1368
|
|
2216
|
+
[#1369]: https://github.com/DataDog/dd-trace-rb/issues/1369
|
|
2217
|
+
[#1370]: https://github.com/DataDog/dd-trace-rb/issues/1370
|
|
2218
|
+
[#1371]: https://github.com/DataDog/dd-trace-rb/issues/1371
|
|
2219
|
+
[#1374]: https://github.com/DataDog/dd-trace-rb/issues/1374
|
|
2220
|
+
[#1377]: https://github.com/DataDog/dd-trace-rb/issues/1377
|
|
2221
|
+
[#1378]: https://github.com/DataDog/dd-trace-rb/issues/1378
|
|
2222
|
+
[#1380]: https://github.com/DataDog/dd-trace-rb/issues/1380
|
|
2223
|
+
[#1381]: https://github.com/DataDog/dd-trace-rb/issues/1381
|
|
2224
|
+
[@AdrianLC]: https://github.com/AdrianLC
|
|
2160
2225
|
[@Azure7111]: https://github.com/Azure7111
|
|
2161
2226
|
[@BabyGroot]: https://github.com/BabyGroot
|
|
2162
2227
|
[@DocX]: https://github.com/DocX
|
|
2163
2228
|
[@EpiFouloux]: https://github.com/EpiFouloux
|
|
2229
|
+
[@EvNomad]: https://github.com/EvNomad
|
|
2164
2230
|
[@JamesHarker]: https://github.com/JamesHarker
|
|
2165
2231
|
[@Jared-Prime]: https://github.com/Jared-Prime
|
|
2166
2232
|
[@Joas1988]: https://github.com/Joas1988
|
|
@@ -2255,6 +2321,7 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
|
2255
2321
|
[@tjgrathwell]: https://github.com/tjgrathwell
|
|
2256
2322
|
[@tjwp]: https://github.com/tjwp
|
|
2257
2323
|
[@tomasv]: https://github.com/tomasv
|
|
2324
|
+
[@tomgi]: https://github.com/tomgi
|
|
2258
2325
|
[@tonypinder]: https://github.com/tonypinder
|
|
2259
2326
|
[@twe4ked]: https://github.com/twe4ked
|
|
2260
2327
|
[@undergroundwebdesigns]: https://github.com/undergroundwebdesigns
|
data/Gemfile
CHANGED
|
@@ -2,8 +2,43 @@ source 'https://rubygems.org'
|
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
# Development dependencies
|
|
6
|
+
gem 'addressable', '~> 2.4.0' # locking transitive dependency of webmock
|
|
7
|
+
gem 'appraisal', '~> 2.2'
|
|
8
|
+
gem 'benchmark-ips', '~> 2.8'
|
|
9
|
+
gem 'benchmark-memory', '~> 0.1'
|
|
10
|
+
gem 'builder'
|
|
11
|
+
gem 'climate_control', '~> 0.2.0'
|
|
12
|
+
# Leave it open as we also have it as an integration and want Appraisal to control the version under test.
|
|
13
|
+
gem 'concurrent-ruby'
|
|
14
|
+
gem 'memory_profiler', '~> 0.9'
|
|
15
|
+
gem 'minitest', '= 5.10.1'
|
|
16
|
+
gem 'minitest-around', '0.5.0'
|
|
17
|
+
gem 'minitest-stub_any_instance', '1.0.2'
|
|
18
|
+
gem 'pimpmychangelog', '>= 0.1.2'
|
|
19
|
+
gem 'pry', '~> 0.12.2'
|
|
20
|
+
gem 'pry-nav', '~> 0.3.0'
|
|
21
|
+
gem 'pry-stack_explorer', '~> 0.4.9' if RUBY_PLATFORM != 'java'
|
|
22
|
+
gem 'rake', '>= 10.5'
|
|
23
|
+
gem 'redcarpet', '~> 3.4' if RUBY_PLATFORM != 'java'
|
|
24
|
+
gem 'rspec', '~> 3.10'
|
|
25
|
+
gem 'rspec-collection_matchers', '~> 1.1'
|
|
26
|
+
gem 'rspec_junit_formatter', '>= 0.4.1'
|
|
27
|
+
gem 'rspec_n', '~> 1.3' if RUBY_VERSION >= '2.3.0'
|
|
28
|
+
gem 'ruby-prof', '~> 1.4' if RUBY_PLATFORM != 'java' && RUBY_VERSION >= '2.4.0'
|
|
29
|
+
gem 'simplecov', '~> 0.17'
|
|
30
|
+
gem 'warning', '~> 1' if RUBY_VERSION >= '2.5.0'
|
|
31
|
+
gem 'webmock', '>= 3.10.0'
|
|
32
|
+
gem 'webrick', '>= 1.7.0' if RUBY_VERSION >= '3.0.0' # No longer bundled by default since Ruby 3.0
|
|
33
|
+
gem 'yard', '~> 0.9'
|
|
34
|
+
|
|
35
|
+
if RUBY_VERSION >= '2.4.0'
|
|
36
|
+
gem 'rubocop', '~> 1.10', require: false
|
|
37
|
+
gem 'rubocop-performance', '~> 1.9', require: false
|
|
38
|
+
gem 'rubocop-rspec', '~> 2.2', require: false
|
|
7
39
|
end
|
|
8
40
|
|
|
9
|
-
#
|
|
41
|
+
# Optional extensions
|
|
42
|
+
# TODO: Move this to Appraisals?
|
|
43
|
+
gem 'dogstatsd-ruby', '>= 3.3.0'
|
|
44
|
+
gem 'opentracing', '>= 0.4.1'
|
data/Rakefile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'bundler/gem_tasks'
|
|
2
2
|
require 'ddtrace/version'
|
|
3
|
-
require 'rubocop/rake_task' if Gem
|
|
3
|
+
require 'rubocop/rake_task' if Gem.loaded_specs.key? 'rubocop'
|
|
4
4
|
require 'rspec/core/rake_task'
|
|
5
5
|
require 'rake/testtask'
|
|
6
6
|
require 'appraisal'
|
|
@@ -139,16 +139,14 @@ end
|
|
|
139
139
|
|
|
140
140
|
namespace :test do
|
|
141
141
|
task all: [:main,
|
|
142
|
-
:rails
|
|
143
|
-
:monkey]
|
|
142
|
+
:rails]
|
|
144
143
|
|
|
145
144
|
Rake::TestTask.new(:main) do |t|
|
|
146
145
|
t.libs << %w[test lib]
|
|
147
146
|
t.test_files = FileList['test/**/*_test.rb'].reject do |path|
|
|
148
147
|
path.include?('contrib') ||
|
|
149
148
|
path.include?('benchmark') ||
|
|
150
|
-
path.include?('redis')
|
|
151
|
-
path.include?('monkey_test.rb')
|
|
149
|
+
path.include?('redis')
|
|
152
150
|
end
|
|
153
151
|
end
|
|
154
152
|
|
|
@@ -156,19 +154,6 @@ namespace :test do
|
|
|
156
154
|
t.libs << %w[test lib]
|
|
157
155
|
t.test_files = FileList['test/contrib/rails/**/*_test.rb']
|
|
158
156
|
end
|
|
159
|
-
|
|
160
|
-
[
|
|
161
|
-
].each do |contrib|
|
|
162
|
-
Rake::TestTask.new(contrib) do |t|
|
|
163
|
-
t.libs << %w[test lib]
|
|
164
|
-
t.test_files = FileList["test/contrib/#{contrib}/*_test.rb"]
|
|
165
|
-
end
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
Rake::TestTask.new(:monkey) do |t|
|
|
169
|
-
t.libs << %w[test lib]
|
|
170
|
-
t.test_files = FileList['test/monkey_test.rb']
|
|
171
|
-
end
|
|
172
157
|
end
|
|
173
158
|
|
|
174
159
|
Rake::TestTask.new(:benchmark) do |t|
|
|
@@ -176,7 +161,7 @@ Rake::TestTask.new(:benchmark) do |t|
|
|
|
176
161
|
t.test_files = FileList['test/benchmark_test.rb']
|
|
177
162
|
end
|
|
178
163
|
|
|
179
|
-
if
|
|
164
|
+
if defined?(RuboCop::RakeTask)
|
|
180
165
|
RuboCop::RakeTask.new(:rubocop) do |t|
|
|
181
166
|
t.options << ['-D', '--force-exclusion']
|
|
182
167
|
t.patterns = ['lib/**/*.rb', 'test/**/*.rb', 'spec/**/*.rb', 'Gemfile', 'Rakefile']
|
|
@@ -196,6 +181,7 @@ S3_DIR = ENV['S3_DIR']
|
|
|
196
181
|
desc 'release the docs website'
|
|
197
182
|
task :'release:docs' => :docs do
|
|
198
183
|
raise 'Missing environment variable S3_DIR' if !S3_DIR || S3_DIR.empty?
|
|
184
|
+
|
|
199
185
|
sh "aws s3 cp --recursive doc/ s3://#{S3_BUCKET}/#{S3_DIR}/docs/"
|
|
200
186
|
end
|
|
201
187
|
|
|
@@ -226,8 +212,6 @@ task :ci do
|
|
|
226
212
|
declare 'bundle exec rake spec:contrib'
|
|
227
213
|
|
|
228
214
|
if RUBY_PLATFORM != 'java'
|
|
229
|
-
# Contrib minitests
|
|
230
|
-
declare 'bundle exec appraisal contrib-old rake test:monkey'
|
|
231
215
|
# Contrib specs
|
|
232
216
|
declare 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
|
|
233
217
|
declare 'bundle exec appraisal contrib-old rake spec:active_record'
|
|
@@ -285,8 +269,6 @@ task :ci do
|
|
|
285
269
|
declare 'bundle exec rake spec:opentracer'
|
|
286
270
|
|
|
287
271
|
if RUBY_PLATFORM != 'java'
|
|
288
|
-
# Contrib minitests
|
|
289
|
-
declare 'bundle exec appraisal contrib-old rake test:monkey'
|
|
290
272
|
# Contrib specs
|
|
291
273
|
declare 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
|
|
292
274
|
declare 'bundle exec appraisal contrib-old rake spec:active_record'
|
data/ddtrace.gemspec
CHANGED
|
@@ -33,40 +33,10 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
34
34
|
spec.require_paths = ['lib']
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
# Development dependencies
|
|
44
|
-
spec.add_development_dependency 'concurrent-ruby' # Leave it open as we also have it as an integration and want Appraisal to control the version under test.
|
|
45
|
-
spec.add_development_dependency 'rake', '>= 10.5'
|
|
46
|
-
spec.add_development_dependency 'rubocop', '= 0.49.1' if RUBY_VERSION >= '2.1.0'
|
|
47
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
48
|
-
spec.add_development_dependency 'rspec-collection_matchers', '~> 1.1'
|
|
49
|
-
spec.add_development_dependency 'ruby-prof', '~> 1.4' if RUBY_PLATFORM != 'java' && RUBY_VERSION >= '2.4.0'
|
|
50
|
-
spec.add_development_dependency 'minitest', '= 5.10.1'
|
|
51
|
-
spec.add_development_dependency 'minitest-around', '0.5.0'
|
|
52
|
-
spec.add_development_dependency 'minitest-stub_any_instance', '1.0.2'
|
|
53
|
-
spec.add_development_dependency 'pimpmychangelog', '>= 0.1.2'
|
|
54
|
-
spec.add_development_dependency 'appraisal', '~> 2.2'
|
|
55
|
-
spec.add_development_dependency 'yard', '~> 0.9'
|
|
56
|
-
spec.add_development_dependency 'webmock', '>= 3.10.0'
|
|
57
|
-
spec.add_development_dependency 'builder'
|
|
58
|
-
spec.add_development_dependency 'climate_control', '~> 0.2.0'
|
|
59
|
-
spec.add_development_dependency 'rspec_junit_formatter', '>= 0.4.1'
|
|
60
|
-
|
|
61
|
-
# locking transitive dependency of webmock
|
|
62
|
-
spec.add_development_dependency 'addressable', '~> 2.4.0'
|
|
63
|
-
spec.add_development_dependency 'benchmark-ips', '~> 2.8'
|
|
64
|
-
spec.add_development_dependency 'benchmark-memory', '~> 0.1'
|
|
65
|
-
spec.add_development_dependency 'memory_profiler', '~> 0.9'
|
|
66
|
-
spec.add_development_dependency 'redcarpet', '~> 3.4' if RUBY_PLATFORM != 'java'
|
|
67
|
-
spec.add_development_dependency 'pry', '~> 0.12.2'
|
|
68
|
-
spec.add_development_dependency 'pry-nav', '~> 0.3.0'
|
|
69
|
-
spec.add_development_dependency 'pry-stack_explorer', '~> 0.4.9' if RUBY_PLATFORM != 'java'
|
|
70
|
-
spec.add_development_dependency 'simplecov', '~> 0.17'
|
|
71
|
-
spec.add_development_dependency 'warning', '~> 1' if RUBY_VERSION >= '2.5.0'
|
|
36
|
+
if RUBY_VERSION >= '2.2.0'
|
|
37
|
+
spec.add_dependency 'msgpack'
|
|
38
|
+
else
|
|
39
|
+
# msgpack 1.4 fails for Ruby 2.0 and 2.1: https://github.com/msgpack/msgpack-ruby/issues/205
|
|
40
|
+
spec.add_dependency 'msgpack', '< 1.4'
|
|
41
|
+
end
|
|
72
42
|
end
|
data/docs/DevelopmentGuide.md
CHANGED
|
@@ -114,6 +114,34 @@ Because you are likely not running all tests locally, your report will contain p
|
|
|
114
114
|
You *must* check the CI step `coverage` for the complete test coverage report, ensuring coverage is not
|
|
115
115
|
decreased.
|
|
116
116
|
|
|
117
|
+
**Ensuring tests don't leak resources**
|
|
118
|
+
|
|
119
|
+
Tests execution can create resources that are hard to track: threads, sockets, files, etc. Because these resources can come
|
|
120
|
+
from the both the test setup as well as the code under test, making sure all resources are properly disposed is important
|
|
121
|
+
to prevent the application from inadvertently creating cumulative resources during its execution.
|
|
122
|
+
|
|
123
|
+
When running tests that utilize threads, you might see an error message similar to this one:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Test leaked 1 thread: "Datadog::Workers::AsyncTransport integration tests"
|
|
127
|
+
Ensure all threads are terminated when test finishes:
|
|
128
|
+
1: #<Thread:0x00007fcbc99863d0 /Users/marco.costa/work/dd-trace-rb/spec/spec_helper.rb:145 sleep> (Thread)
|
|
129
|
+
Thread Creation Site:
|
|
130
|
+
./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:245:in 'new'
|
|
131
|
+
./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:245:in 'block (4 levels) in <top (required)>'
|
|
132
|
+
Thread Backtrace:
|
|
133
|
+
./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:262:in 'sleep'
|
|
134
|
+
.dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:262:in 'block (5 levels) in <top (required)>'
|
|
135
|
+
./dd-trace-rb/spec/spec_helper.rb:147:in 'block in initialize'
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
This means that this test did not finish all threads by the time the test had finished. In this case, the thread
|
|
139
|
+
creation can be traced to `workers_integration_spec.rb:245:in 'new'`. The thread itself is sleeping at `workers_integration_spec.rb:262:in 'sleep'`.
|
|
140
|
+
|
|
141
|
+
The actionable in this case would be to ensure that the thread created in `workers_integration_spec.rb:245` is properly terminated by invoking `Thread#join` during the test tear down, which will wait for the thread to finish before returning.
|
|
142
|
+
|
|
143
|
+
Depending on the situation, the thread in question might need to be forced to terminate. It's recommended to have a mechanism in place to terminate it (a shared variable that changes value when the thread should exit), but as a last resort, `Thread#terminate` forces the thread to finish. Keep in mind that regardless of the termination method, `Thread#join` must be called to ensure that the thread has completely finished its shutdown process.
|
|
144
|
+
|
|
117
145
|
### Checking code quality
|
|
118
146
|
|
|
119
147
|
**Linting**
|
data/docs/GettingStarted.md
CHANGED
|
@@ -145,7 +145,7 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
|
145
145
|
|
|
146
146
|
### Quickstart for Rails applications
|
|
147
147
|
|
|
148
|
-
####
|
|
148
|
+
#### Automatic instrumentation
|
|
149
149
|
|
|
150
150
|
1. Add the `ddtrace` gem to your Gemfile:
|
|
151
151
|
|
|
@@ -158,7 +158,7 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
|
158
158
|
|
|
159
159
|
3. You can configure, override, or disable any specific integration settings by also adding a [Rails Manual Configuration](#rails-manual-configuration) file.
|
|
160
160
|
|
|
161
|
-
####
|
|
161
|
+
#### Manual instrumentation
|
|
162
162
|
|
|
163
163
|
1. Add the `ddtrace` gem to your Gemfile:
|
|
164
164
|
|
|
@@ -181,10 +181,10 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
|
181
181
|
|
|
182
182
|
### Quickstart for Ruby applications
|
|
183
183
|
|
|
184
|
-
####
|
|
184
|
+
#### Automatic instrumentation
|
|
185
185
|
|
|
186
186
|
1. Install the gem with `gem install ddtrace`
|
|
187
|
-
2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
|
|
187
|
+
2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
|
|
188
188
|
3. Add `require 'ddtrace/auto_instrument'` to your application. _Note:_ This must be done _after_ requiring any supported libraries or frameworks.
|
|
189
189
|
|
|
190
190
|
```ruby
|
|
@@ -195,10 +195,10 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
|
195
195
|
|
|
196
196
|
require 'ddtrace/auto_instrument'
|
|
197
197
|
```
|
|
198
|
-
|
|
198
|
+
|
|
199
199
|
You can configure, override, or disable any specific integration settings by also adding a [Ruby Manual Configuration Block](#ruby-manual-configuration).
|
|
200
200
|
|
|
201
|
-
####
|
|
201
|
+
#### Manual instrumentation
|
|
202
202
|
|
|
203
203
|
1. Install the gem with `gem install ddtrace`
|
|
204
204
|
2. Add a configuration block to your Ruby application:
|
|
@@ -673,7 +673,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
|
673
673
|
|
|
674
674
|
| Key | Description | Default |
|
|
675
675
|
| --- | ----------- | ------- |
|
|
676
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
|
|
677
676
|
| `enabled` | Defines whether Cucumber tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
|
678
677
|
| `service_name` | Service name used for `cucumber` instrumentation. | `'cucumber'` |
|
|
679
678
|
| `operation_name` | Operation name used for `cucumber` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'cucumber.test'` |
|
|
@@ -1058,7 +1057,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
|
1058
1057
|
The httpclient integration will trace any HTTP call using the httpclient gem.
|
|
1059
1058
|
|
|
1060
1059
|
```ruby
|
|
1061
|
-
require '
|
|
1060
|
+
require 'httpclient'
|
|
1062
1061
|
require 'ddtrace'
|
|
1063
1062
|
Datadog.configure do |c|
|
|
1064
1063
|
c.use :httpclient, options
|
|
@@ -1621,7 +1620,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
|
1621
1620
|
|
|
1622
1621
|
| Key | Description | Default |
|
|
1623
1622
|
| --- | ----------- | ------- |
|
|
1624
|
-
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
|
|
1625
1623
|
| `enabled` | Defines whether RSpec tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
|
1626
1624
|
| `service_name` | Service name used for `rspec` instrumentation. | `'rspec'` |
|
|
1627
1625
|
| `operation_name` | Operation name used for `rspec` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'rspec.example'` |
|
|
@@ -1864,6 +1862,7 @@ Available options are:
|
|
|
1864
1862
|
- `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
|
1865
1863
|
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
|
1866
1864
|
- `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
|
|
1865
|
+
- `time_now_provider`: when testing, it might be helpful to use a different time provider. For Timecop, for example, `->{ Time.now_without_mock_time }` allows the tracer to use the real wall time. Span duration calculation will still use the system monotonic clock when available, thus not being affected by this setting. Defaults to `->{ Time.now }`.
|
|
1867
1866
|
|
|
1868
1867
|
#### Custom logging
|
|
1869
1868
|
|