ddtrace 0.30.1 → 0.31.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +28 -0
  3. data/.circleci/images/primary/Dockerfile-2.7.0 +73 -0
  4. data/Appraisals +111 -2
  5. data/CHANGELOG.md +33 -1
  6. data/Rakefile +69 -1
  7. data/ddtrace.gemspec +1 -0
  8. data/docker-compose.yml +30 -0
  9. data/docs/GettingStarted.md +28 -3
  10. data/lib/ddtrace.rb +6 -0
  11. data/lib/ddtrace/buffer.rb +3 -3
  12. data/lib/ddtrace/configuration/base.rb +2 -1
  13. data/lib/ddtrace/configuration/settings.rb +15 -2
  14. data/lib/ddtrace/context.rb +62 -57
  15. data/lib/ddtrace/context_flush.rb +51 -114
  16. data/lib/ddtrace/context_provider.rb +45 -0
  17. data/lib/ddtrace/contrib/action_cable/configuration/settings.rb +25 -0
  18. data/lib/ddtrace/contrib/action_cable/event.rb +65 -0
  19. data/lib/ddtrace/contrib/action_cable/events.rb +33 -0
  20. data/lib/ddtrace/contrib/action_cable/events/broadcast.rb +49 -0
  21. data/lib/ddtrace/contrib/action_cable/events/perform_action.rb +52 -0
  22. data/lib/ddtrace/contrib/action_cable/events/transmit.rb +50 -0
  23. data/lib/ddtrace/contrib/action_cable/ext.rb +23 -0
  24. data/lib/ddtrace/contrib/action_cable/instrumentation.rb +31 -0
  25. data/lib/ddtrace/contrib/action_cable/integration.rb +36 -0
  26. data/lib/ddtrace/contrib/action_cable/patcher.rb +27 -0
  27. data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +2 -2
  28. data/lib/ddtrace/contrib/action_view/events/render_partial.rb +5 -3
  29. data/lib/ddtrace/contrib/action_view/events/render_template.rb +5 -3
  30. data/lib/ddtrace/contrib/action_view/instrumentation/partial_renderer.rb +2 -1
  31. data/lib/ddtrace/contrib/action_view/instrumentation/template_renderer.rb +4 -2
  32. data/lib/ddtrace/contrib/action_view/patcher.rb +1 -1
  33. data/lib/ddtrace/contrib/active_record/events/instantiation.rb +1 -1
  34. data/lib/ddtrace/contrib/active_record/events/sql.rb +1 -1
  35. data/lib/ddtrace/contrib/active_support/cache/instrumentation.rb +2 -2
  36. data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +2 -2
  37. data/lib/ddtrace/contrib/dalli/patcher.rb +1 -1
  38. data/lib/ddtrace/contrib/dalli/quantize.rb +1 -1
  39. data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -1
  40. data/lib/ddtrace/contrib/excon/middleware.rb +3 -3
  41. data/lib/ddtrace/contrib/faraday/connection.rb +18 -0
  42. data/lib/ddtrace/contrib/faraday/integration.rb +1 -1
  43. data/lib/ddtrace/contrib/faraday/patcher.rb +3 -3
  44. data/lib/ddtrace/contrib/grape/endpoint.rb +5 -5
  45. data/lib/ddtrace/contrib/grape/patcher.rb +1 -1
  46. data/lib/ddtrace/contrib/grpc/datadog_interceptor/client.rb +1 -1
  47. data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +2 -2
  48. data/lib/ddtrace/contrib/grpc/patcher.rb +1 -1
  49. data/lib/ddtrace/contrib/http/instrumentation.rb +1 -1
  50. data/lib/ddtrace/contrib/mongodb/subscribers.rb +2 -2
  51. data/lib/ddtrace/contrib/patchable.rb +1 -1
  52. data/lib/ddtrace/contrib/patcher.rb +1 -1
  53. data/lib/ddtrace/contrib/rack/middlewares.rb +2 -2
  54. data/lib/ddtrace/contrib/rack/patcher.rb +2 -2
  55. data/lib/ddtrace/contrib/rack/request_queue.rb +1 -1
  56. data/lib/ddtrace/contrib/rails/configuration/settings.rb +1 -0
  57. data/lib/ddtrace/contrib/rails/framework.rb +12 -0
  58. data/lib/ddtrace/contrib/rake/instrumentation.rb +2 -2
  59. data/lib/ddtrace/contrib/redis/quantize.rb +1 -1
  60. data/lib/ddtrace/contrib/sinatra/tracer.rb +1 -1
  61. data/lib/ddtrace/ext/forced_tracing.rb +1 -1
  62. data/lib/ddtrace/ext/sampling.rb +3 -0
  63. data/lib/ddtrace/logger.rb +42 -0
  64. data/lib/ddtrace/metrics.rb +5 -5
  65. data/lib/ddtrace/monkey.rb +1 -1
  66. data/lib/ddtrace/pin.rb +1 -1
  67. data/lib/ddtrace/pipeline.rb +1 -1
  68. data/lib/ddtrace/propagation/http_propagator.rb +2 -2
  69. data/lib/ddtrace/runtime/cgroup.rb +1 -1
  70. data/lib/ddtrace/runtime/container.rb +1 -1
  71. data/lib/ddtrace/runtime/metrics.rb +1 -1
  72. data/lib/ddtrace/sampler.rb +1 -1
  73. data/lib/ddtrace/sampling/rule.rb +1 -1
  74. data/lib/ddtrace/sampling/rule_sampler.rb +4 -4
  75. data/lib/ddtrace/span.rb +24 -6
  76. data/lib/ddtrace/sync_writer.rb +4 -3
  77. data/lib/ddtrace/tracer.rb +37 -77
  78. data/lib/ddtrace/transport/http/client.rb +2 -2
  79. data/lib/ddtrace/utils.rb +1 -1
  80. data/lib/ddtrace/version.rb +2 -2
  81. data/lib/ddtrace/workers.rb +3 -3
  82. data/lib/ddtrace/writer.rb +3 -2
  83. metadata +44 -6
  84. data/lib/ddtrace/contrib/faraday/rack_builder.rb +0 -18
  85. data/lib/ddtrace/provider.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c36cc86fbd0beff70a42059214a0c60c616bd67b
4
- data.tar.gz: 0b760d9c734d4945d607ee0ad63032d9b703eec3
2
+ SHA256:
3
+ metadata.gz: e3ff39e24ac076f66cf5a897a58dd8bed004f510dca8e62229c875f7c15672ef
4
+ data.tar.gz: 0dc0267a78bb5a6d8da71b812369583118bb3abafcb6cd0e2d23be46570d28a6
5
5
  SHA512:
6
- metadata.gz: b63c248f6f431dd430b0f51e5668e8bade6d0b1c2e30adf2f7ba1f4ee667038c1ca6ef62aa806ee5a898600ebf77d55624d26bc9144f0fbcb9602292dc2afa3c
7
- data.tar.gz: 49c3a9e7442fd8835ad2124f5f1943429911da62671fda5d691d866ea6314856bd892f8841071823d71954802c4fdec7919a20f84653c583cd65f7a43c135324
6
+ metadata.gz: b0496e43acdce8830ffba4307903cedea2a48280759a6ef76fd33d8859422e2a8f33bdb39f17a9e744d0cfa357c46c9721e03def039f39f19d003f9e43a68154
7
+ data.tar.gz: e315219947b6cdf7f025205685e50be08098348fd0e9dfb077e19b81053c370e87d859c1ef455364786e58b330a17b02b76b78b7a660dbd4d8b4912c51c67927
@@ -120,6 +120,11 @@ orbs:
120
120
  keys:
121
121
  - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
122
122
  - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
123
+ - restore_cache:
124
+ keys:
125
+ - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "Appraisals" }}-{{ checksum "ddtrace.gemspec" }}
126
+ - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-
127
+ - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}
123
128
  - *step_init_bundle_checksum
124
129
  - restore_cache:
125
130
  keys:
@@ -139,6 +144,10 @@ orbs:
139
144
  key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
140
145
  paths:
141
146
  - /usr/local/bundle
147
+ - save_cache:
148
+ key: bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "Appraisals" }}-{{ checksum "ddtrace.gemspec" }}-{{ checksum ".circleci/bundle_checksum" }}'
149
+ paths:
150
+ - /usr/local/bundle
142
151
  test:
143
152
  <<: *job_defaults
144
153
  parameters:
@@ -286,6 +295,10 @@ job_configuration:
286
295
  <<: *filters_all_branches_and_tags
287
296
  ruby_version: '2.6'
288
297
  image: marcotc/docker-library:ddtrace_rb_2_6_4
298
+ - &config-2_7
299
+ <<: *filters_all_branches_and_tags
300
+ ruby_version: '2.7'
301
+ image: marcotc/docker-library:ddtrace_rb_2_7_0
289
302
 
290
303
  workflows:
291
304
  version: 2
@@ -388,6 +401,19 @@ workflows:
388
401
  name: test-2.6
389
402
  requires:
390
403
  - build-2.6
404
+ - orb/checkout:
405
+ <<: *config-2_7
406
+ name: checkout-2.7
407
+ - orb/build:
408
+ <<: *config-2_7
409
+ name: build-2.7
410
+ requires:
411
+ - checkout-2.7
412
+ - orb/test:
413
+ <<: *config-2_7
414
+ name: test-2.7
415
+ requires:
416
+ - build-2.7
391
417
  - "deploy prerelease Gem":
392
418
  <<: *filters_all_branches_and_tags
393
419
  requires:
@@ -398,6 +424,7 @@ workflows:
398
424
  - test-2.4
399
425
  - test-2.5
400
426
  - test-2.6
427
+ - test-2.7
401
428
  - "deploy release":
402
429
  <<: *filters_only_release_tags
403
430
  requires:
@@ -408,3 +435,4 @@ workflows:
408
435
  - test-2.4
409
436
  - test-2.5
410
437
  - test-2.6
438
+ - test-2.7
@@ -0,0 +1,73 @@
1
+ # Current version: https://github.com/docker-library/ruby/blob/defb10adcd6dd2178be3cd9c884fd035b52d42fb/2.7/buster/Dockerfile
2
+ FROM ruby:2.7.0
3
+
4
+ # Make apt non-interactive
5
+ RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
6
+ && echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90circleci
7
+
8
+ ENV DEBIAN_FRONTEND=noninteractive
9
+
10
+ # Install required packages
11
+ RUN set -ex; \
12
+ apt-get update; \
13
+ mkdir -p /usr/share/man/man1; \
14
+ apt-get install -y --no-install-recommends \
15
+ git mercurial xvfb \
16
+ locales sudo openssh-client ca-certificates tar gzip parallel \
17
+ net-tools netcat unzip zip bzip2 gnupg curl wget \
18
+ tzdata rsync vim; \
19
+ rm -rf /var/lib/apt/lists/*;
20
+
21
+ # Set timezone to UTC by default
22
+ RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
23
+
24
+ # Set language
25
+ RUN locale-gen en_US.UTF-8
26
+ ENV LANG en_US.UTF-8
27
+ ENV LANGUAGE en_US:en
28
+
29
+ # Install jq
30
+ RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \
31
+ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \
32
+ && chmod +x /usr/bin/jq \
33
+ && jq --version
34
+
35
+ # Install Docker
36
+ RUN set -ex \
37
+ && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \
38
+ && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \
39
+ && echo Docker URL: $DOCKER_URL \
40
+ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \
41
+ && ls -lha /tmp/docker.tgz \
42
+ && tar -xz -C /tmp -f /tmp/docker.tgz \
43
+ && mv /tmp/docker/* /usr/bin \
44
+ && rm -rf /tmp/docker /tmp/docker.tgz \
45
+ && which docker \
46
+ && (docker version || true)
47
+
48
+ # Install Docker Compose
49
+ RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \
50
+ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \
51
+ && chmod +x /usr/bin/docker-compose \
52
+ && docker-compose version
53
+
54
+ # Install Dockerize
55
+ RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \
56
+ && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \
57
+ && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \
58
+ && rm -rf /tmp/dockerize-linux-amd64.tar.gz \
59
+ && dockerize --version
60
+
61
+ # Install RubyGems
62
+ # RUN gem update --system # Upgrading disabled until https://github.com/thoughtbot/appraisal/issues/162 is fixed
63
+ RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
64
+
65
+ # Upgrade RubyGems and Bundler # Upgrading disabled until https://github.com/thoughtbot/appraisal/issues/162 is fixed
66
+ # RUN gem update --system
67
+ # RUN gem install bundler
68
+ ENV BUNDLE_SILENCE_ROOT_WARNING 1
69
+
70
+ RUN mkdir /app
71
+ WORKDIR /app
72
+
73
+ CMD ["/bin/sh"]
data/Appraisals CHANGED
@@ -698,7 +698,8 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
698
698
  gem 'typhoeus'
699
699
  end
700
700
  end
701
- elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION)
701
+ elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION) \
702
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7.0')
702
703
  if RUBY_PLATFORM != 'java'
703
704
  appraise 'rails5-mysql2' do
704
705
  gem 'rails', '~> 5.2.1'
@@ -804,5 +805,113 @@ elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION)
804
805
  gem 'typhoeus'
805
806
  end
806
807
  end
807
- end
808
+ elsif Gem::Version.new('2.7.0') <= Gem::Version.new(RUBY_VERSION)
809
+ if RUBY_PLATFORM != 'java'
810
+ appraise 'rails5-mysql2' do
811
+ gem 'rails', '~> 5.2.1'
812
+ gem 'mysql2', '< 0.5', platform: :ruby
813
+ gem 'sprockets', '< 4'
814
+ end
815
+
816
+ appraise 'rails5-postgres' do
817
+ gem 'rails', '~> 5.2.1'
818
+ gem 'pg', '< 1.0', platform: :ruby
819
+ gem 'sprockets', '< 4'
820
+ end
821
+
822
+ appraise 'rails5-postgres-redis' do
823
+ gem 'rails', '~> 5.2.1'
824
+ gem 'pg', '< 1.0', platform: :ruby
825
+ gem 'redis-rails'
826
+ gem 'redis'
827
+ gem 'sprockets', '< 4'
828
+ end
829
+
830
+ appraise 'rails5-postgres-redis-activesupport' do
831
+ gem 'rails', '~> 5.2.1'
832
+ gem 'pg', '< 1.0', platform: :ruby
833
+ gem 'redis-rails'
834
+ gem 'redis'
835
+ gem 'sprockets', '< 4'
836
+ end
837
+
838
+ appraise 'rails5-postgres-sidekiq' do
839
+ gem 'rails', '~> 5.2.1'
840
+ gem 'pg', '< 1.0', platform: :ruby
841
+ gem 'sidekiq'
842
+ gem 'activejob'
843
+ gem 'sprockets', '< 4'
844
+ end
845
+
846
+ appraise 'rails6-mysql2' do
847
+ gem 'rails', '~> 6.0.0'
848
+ gem 'mysql2', '< 0.6', platform: :ruby
849
+ gem 'sprockets', '< 4'
850
+ end
851
+
852
+ appraise 'rails6-postgres' do
853
+ gem 'rails', '~> 6.0.0'
854
+ gem 'pg', '< 1.0', platform: :ruby
855
+ gem 'sprockets', '< 4'
856
+ end
808
857
 
858
+ appraise 'rails6-postgres-redis' do
859
+ gem 'rails', '~> 6.0.0'
860
+ gem 'pg', '< 1.0', platform: :ruby
861
+ gem 'redis-rails'
862
+ gem 'redis'
863
+ gem 'sprockets', '< 4'
864
+ end
865
+
866
+ appraise 'rails6-postgres-redis-activesupport' do
867
+ gem 'rails', '~> 6.0.0'
868
+ gem 'pg', '< 1.0', platform: :ruby
869
+ gem 'redis-rails'
870
+ gem 'redis'
871
+ gem 'sprockets', '< 4'
872
+ end
873
+
874
+ appraise 'rails6-postgres-sidekiq' do
875
+ gem 'rails', '~> 6.0.0'
876
+ gem 'pg', '< 1.0', platform: :ruby
877
+ gem 'sidekiq'
878
+ gem 'activejob'
879
+ gem 'sprockets', '< 4'
880
+ end
881
+
882
+ appraise 'contrib' do
883
+ gem 'actionpack'
884
+ gem 'actionview'
885
+ gem 'active_model_serializers', '>= 0.10.0'
886
+ gem 'activerecord'
887
+ gem 'aws-sdk'
888
+ gem 'concurrent-ruby'
889
+ gem 'dalli'
890
+ gem 'delayed_job'
891
+ gem 'delayed_job_active_record'
892
+ gem 'elasticsearch-transport'
893
+ gem 'ethon'
894
+ gem 'excon'
895
+ gem 'grape'
896
+ gem 'graphql'
897
+ # gem 'grpc' # Pending 2.7 support: https://github.com/grpc/grpc/issues/21514
898
+ gem 'hiredis'
899
+ gem 'mongo', '>= 2.8.0'
900
+ gem 'mysql2', '< 0.5', platform: :ruby
901
+ gem 'racecar', '>= 0.3.5'
902
+ gem 'rack'
903
+ gem 'rack-test'
904
+ gem 'rake', '>= 12.3'
905
+ gem 'redis', '< 4.0'
906
+ gem 'rest-client'
907
+ gem 'resque', '< 2.0'
908
+ gem 'sequel'
909
+ gem 'shoryuken'
910
+ gem 'sidekiq'
911
+ gem 'sinatra'
912
+ gem 'sqlite3', '~> 1.4.1'
913
+ gem 'sucker_punch'
914
+ gem 'typhoeus'
915
+ end
916
+ end
917
+ end
@@ -2,6 +2,36 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.31.0] - 2020-01-07
6
+
7
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.31.0
8
+
9
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.30.1...v0.31.0
10
+
11
+ ### Added
12
+
13
+ - Ruby 2.7 support (#805, #896)
14
+ - ActionCable integration (#132, #824) (@renchap, @ericmustin)
15
+ - Faraday 1.0 support (#906)
16
+ - Set resource for Rails template spans (#855, #881) (@djmb)
17
+ - at_exit hook for graceful Tracer shutdown (#884)
18
+ - Environment variables to configure RuleSampler defaults (#892)
19
+
20
+ ### Changed
21
+
22
+ - Updated partial trace flushing to conform with new back-end requirements (#845)
23
+ - Store numeric tags as metrics (#886)
24
+ - Moved logging from Datadog::Tracer to Datadog::Logger (#880)
25
+ - Changed default RuleSampler rate limit from unlimited to 100/s (#898)
26
+
27
+ ### Fixed
28
+
29
+ - SyncWriter incompatibility with Transport::HTTP::Client (#903, #904) (@Yurokle)
30
+
31
+ ### Refactored
32
+
33
+ - Improvements to test suite & CI (#815, #821, #841, #846, #883, #895)
34
+
5
35
  ## [0.30.1] - 2019-12-30
6
36
 
7
37
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.30.1
@@ -1012,7 +1042,9 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
1012
1042
 
1013
1043
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
1014
1044
 
1015
- [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.30.0...master
1045
+ [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.31.0...master
1046
+ [0.31.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.30.1...v0.31.0
1047
+ [0.30.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.30.0...v0.30.1
1016
1048
  [0.30.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.29.1...v0.30.0
1017
1049
  [0.29.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.29.0...v0.29.1
1018
1050
  [0.29.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.28.0...v0.29.0
data/Rakefile CHANGED
@@ -54,6 +54,7 @@ namespace :spec do
54
54
  end
55
55
 
56
56
  [
57
+ :action_cable,
57
58
  :action_pack,
58
59
  :action_view,
59
60
  :active_model_serializers,
@@ -519,12 +520,15 @@ task :ci do
519
520
  sh 'bundle exec appraisal rails6-postgres-sidekiq rake spec:railsactivejob'
520
521
  sh 'bundle exec appraisal rails6-postgres rake spec:railsdisableenv'
521
522
  # Rails specs
523
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:action_cable'
522
524
  sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
523
525
  sh 'bundle exec appraisal rails5-postgres rake spec:rails'
526
+ sh 'bundle exec appraisal rails6-mysql2 rake spec:action_cable'
524
527
  sh 'bundle exec appraisal rails6-mysql2 rake spec:rails'
525
528
  sh 'bundle exec appraisal rails6-postgres rake spec:rails'
526
529
  end
527
- elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION)
530
+ elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION) \
531
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7.0')
528
532
  # Main library
529
533
  sh 'bundle exec rake test:main'
530
534
  sh 'bundle exec rake spec:main'
@@ -581,6 +585,70 @@ task :ci do
581
585
  sh 'bundle exec appraisal rails6-postgres-sidekiq rake spec:railsactivejob'
582
586
  sh 'bundle exec appraisal rails6-postgres rake spec:railsdisableenv'
583
587
  # Rails specs
588
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:action_cable'
589
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
590
+ sh 'bundle exec appraisal rails5-postgres rake spec:rails'
591
+ sh 'bundle exec appraisal rails6-mysql2 rake spec:action_cable'
592
+ sh 'bundle exec appraisal rails6-mysql2 rake spec:rails'
593
+ sh 'bundle exec appraisal rails6-postgres rake spec:rails'
594
+ end
595
+ elsif Gem::Version.new('2.7.0') <= Gem::Version.new(RUBY_VERSION)
596
+ # Main library
597
+ sh 'bundle exec rake test:main'
598
+ sh 'bundle exec rake spec:main'
599
+ sh 'bundle exec rake spec:contrib'
600
+ sh 'bundle exec rake spec:opentracer'
601
+
602
+ if RUBY_PLATFORM != 'java'
603
+ # Benchmarks
604
+ sh 'bundle exec rake benchmark'
605
+ # Contrib minitests
606
+ sh 'bundle exec appraisal contrib rake test:grape'
607
+ sh 'bundle exec appraisal contrib rake test:sidekiq'
608
+ sh 'bundle exec appraisal contrib rake test:sucker_punch'
609
+ # Contrib specs
610
+ sh 'bundle exec appraisal contrib rake spec:action_pack'
611
+ sh 'bundle exec appraisal contrib rake spec:action_view'
612
+ sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
613
+ sh 'bundle exec appraisal contrib rake spec:active_record'
614
+ sh 'bundle exec appraisal contrib rake spec:active_support'
615
+ sh 'bundle exec appraisal contrib rake spec:aws'
616
+ sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
617
+ sh 'bundle exec appraisal contrib rake spec:dalli'
618
+ sh 'bundle exec appraisal contrib rake spec:delayed_job'
619
+ sh 'bundle exec appraisal contrib rake spec:elasticsearch'
620
+ sh 'bundle exec appraisal contrib rake spec:excon'
621
+ sh 'bundle exec appraisal contrib rake spec:faraday'
622
+ sh 'bundle exec appraisal contrib rake spec:graphql'
623
+ # sh 'bundle exec appraisal contrib rake spec:grpc' # Pending 2.7 support: https://github.com/grpc/grpc/issues/21514
624
+ sh 'bundle exec appraisal contrib rake spec:http'
625
+ sh 'bundle exec appraisal contrib rake spec:mongodb'
626
+ sh 'bundle exec appraisal contrib rake spec:mysql2'
627
+ sh 'bundle exec appraisal contrib rake spec:racecar'
628
+ sh 'bundle exec appraisal contrib rake spec:rack'
629
+ sh 'bundle exec appraisal contrib rake spec:rake'
630
+ sh 'bundle exec appraisal contrib rake spec:redis'
631
+ sh 'bundle exec appraisal contrib rake spec:resque'
632
+ sh 'bundle exec appraisal contrib rake spec:rest_client'
633
+ sh 'bundle exec appraisal contrib rake spec:sequel'
634
+ sh 'bundle exec appraisal contrib rake spec:shoryuken'
635
+ sh 'bundle exec appraisal contrib rake spec:sinatra'
636
+ sh 'bundle exec appraisal contrib rake spec:ethon'
637
+ # Rails minitests
638
+ # We only test Rails 5+ because older versions require Bundler < 2.0
639
+ sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
640
+ sh 'bundle exec appraisal rails5-postgres rake test:rails'
641
+ sh 'bundle exec appraisal rails5-postgres-redis rake spec:railsredis'
642
+ sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake spec:railsredis'
643
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake spec:railsactivejob'
644
+ sh 'bundle exec appraisal rails5-postgres rake spec:railsdisableenv'
645
+ sh 'bundle exec appraisal rails6-mysql2 rake test:rails'
646
+ sh 'bundle exec appraisal rails6-postgres rake test:rails'
647
+ sh 'bundle exec appraisal rails6-postgres-redis rake spec:railsredis'
648
+ sh 'bundle exec appraisal rails6-postgres-redis-activesupport rake spec:railsredis'
649
+ sh 'bundle exec appraisal rails6-postgres-sidekiq rake spec:railsactivejob'
650
+ sh 'bundle exec appraisal rails6-postgres rake spec:railsdisableenv'
651
+ # Rails specs
584
652
  sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
585
653
  sh 'bundle exec appraisal rails5-postgres rake spec:rails'
586
654
  sh 'bundle exec appraisal rails6-mysql2 rake spec:rails'
@@ -46,6 +46,7 @@ Gem::Specification.new do |spec|
46
46
  spec.add_development_dependency 'rspec-collection_matchers', '~> 1.1'
47
47
  spec.add_development_dependency 'minitest', '= 5.10.1'
48
48
  spec.add_development_dependency 'appraisal', '~> 2.2'
49
+ spec.add_development_dependency 'bundler', '<= 2.1.2' # Remove when https://github.com/thoughtbot/appraisal/issues/162 is fixed
49
50
  spec.add_development_dependency 'yard', '~> 0.9'
50
51
  spec.add_development_dependency 'webmock', '~> 2.0'
51
52
  spec.add_development_dependency 'builder'
@@ -196,6 +196,34 @@ services:
196
196
  - .:/app
197
197
  - bundle-2.6:/usr/local/bundle
198
198
  - gemfiles-2.6:/app/gemfiles
199
+ tracer-2.7:
200
+ image: marcotc/docker-library:ddtrace_rb_2_7_0
201
+ command: /bin/bash
202
+ depends_on:
203
+ - ddagent
204
+ - elasticsearch
205
+ - memcached
206
+ - mongodb
207
+ - mysql
208
+ - postgres
209
+ - redis
210
+ env_file: ./.env
211
+ environment:
212
+ - BUNDLE_GEMFILE=/app/Gemfile
213
+ - DD_AGENT_HOST=ddagent
214
+ - TEST_DATADOG_INTEGRATION=1
215
+ - TEST_ELASTICSEARCH_HOST=elasticsearch
216
+ - TEST_MEMCACHED_HOST=memcached
217
+ - TEST_MONGODB_HOST=mongodb
218
+ - TEST_MYSQL_HOST=mysql
219
+ - TEST_POSTGRES_HOST=postgres
220
+ - TEST_REDIS_HOST=redis
221
+ stdin_open: true
222
+ tty: true
223
+ volumes:
224
+ - .:/app
225
+ - bundle-2.7:/usr/local/bundle
226
+ - gemfiles-2.7:/app/gemfiles
199
227
  ddagent:
200
228
  image: datadog/docker-dd-agent
201
229
  environment:
@@ -267,6 +295,7 @@ volumes:
267
295
  bundle-2.4:
268
296
  bundle-2.5:
269
297
  bundle-2.6:
298
+ bundle-2.7:
270
299
  gemfiles-2.0:
271
300
  gemfiles-2.1:
272
301
  gemfiles-2.2:
@@ -274,3 +303,4 @@ volumes:
274
303
  gemfiles-2.4:
275
304
  gemfiles-2.5:
276
305
  gemfiles-2.6:
306
+ gemfiles-2.7: