ddtrace 0.26.1 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +153 -77
  3. data/.circleci/images/primary/{Dockerfile-1.9.3 → Dockerfile-2.5.6} +8 -8
  4. data/.circleci/images/primary/Dockerfile-2.6.4 +73 -0
  5. data/.github/CODEOWNERS +1 -0
  6. data/Appraisals +201 -94
  7. data/CHANGELOG.md +25 -8
  8. data/Rakefile +153 -47
  9. data/ddtrace.gemspec +1 -1
  10. data/docker-compose.yml +56 -26
  11. data/docs/GettingStarted.md +117 -14
  12. data/lib/ddtrace.rb +4 -0
  13. data/lib/ddtrace/analytics.rb +9 -39
  14. data/lib/ddtrace/configuration.rb +0 -19
  15. data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +144 -0
  16. data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +37 -0
  17. data/lib/ddtrace/contrib/action_pack/configuration/settings.rb +25 -0
  18. data/lib/ddtrace/contrib/action_pack/ext.rb +16 -0
  19. data/lib/ddtrace/contrib/action_pack/integration.rb +36 -0
  20. data/lib/ddtrace/contrib/action_pack/patcher.rb +29 -0
  21. data/lib/ddtrace/contrib/action_pack/utils.rb +36 -0
  22. data/lib/ddtrace/contrib/action_view/configuration/settings.rb +24 -0
  23. data/lib/ddtrace/contrib/action_view/ext.rb +17 -0
  24. data/lib/ddtrace/contrib/action_view/instrumentation.rb +192 -0
  25. data/lib/ddtrace/contrib/action_view/integration.rb +43 -0
  26. data/lib/ddtrace/contrib/action_view/patcher.rb +47 -0
  27. data/lib/ddtrace/contrib/action_view/utils.rb +32 -0
  28. data/lib/ddtrace/contrib/active_support/cache/instrumentation.rb +157 -0
  29. data/lib/ddtrace/contrib/active_support/cache/patcher.rb +62 -0
  30. data/lib/ddtrace/contrib/active_support/cache/redis.rb +47 -0
  31. data/lib/ddtrace/contrib/active_support/configuration/settings.rb +23 -0
  32. data/lib/ddtrace/contrib/active_support/ext.rb +21 -0
  33. data/lib/ddtrace/contrib/active_support/integration.rb +38 -0
  34. data/lib/ddtrace/contrib/active_support/patcher.rb +29 -0
  35. data/lib/ddtrace/contrib/ethon/configuration/settings.rb +24 -0
  36. data/lib/ddtrace/contrib/ethon/easy_patch.rb +139 -0
  37. data/lib/ddtrace/contrib/ethon/ext.rb +15 -0
  38. data/lib/ddtrace/contrib/ethon/integration.rb +35 -0
  39. data/lib/ddtrace/contrib/ethon/multi_patch.rb +80 -0
  40. data/lib/ddtrace/contrib/ethon/patcher.rb +27 -0
  41. data/lib/ddtrace/contrib/patchable.rb +1 -1
  42. data/lib/ddtrace/contrib/rails/configuration/settings.rb +43 -6
  43. data/lib/ddtrace/contrib/rails/ext.rb +0 -15
  44. data/lib/ddtrace/contrib/rails/framework.rb +37 -6
  45. data/lib/ddtrace/contrib/rails/middlewares.rb +2 -1
  46. data/lib/ddtrace/contrib/rails/patcher.rb +0 -8
  47. data/lib/ddtrace/contrib/rails/utils.rb +0 -46
  48. data/lib/ddtrace/contrib/redis/patcher.rb +12 -19
  49. data/lib/ddtrace/correlation.rb +8 -12
  50. data/lib/ddtrace/forced_tracing.rb +10 -38
  51. data/lib/ddtrace/sampler.rb +20 -74
  52. data/lib/ddtrace/span.rb +3 -4
  53. data/lib/ddtrace/tracer.rb +4 -11
  54. data/lib/ddtrace/version.rb +2 -2
  55. metadata +32 -9
  56. data/lib/ddtrace/contrib/rails/action_controller.rb +0 -100
  57. data/lib/ddtrace/contrib/rails/action_controller_patch.rb +0 -78
  58. data/lib/ddtrace/contrib/rails/action_view.rb +0 -19
  59. data/lib/ddtrace/contrib/rails/active_support.rb +0 -67
  60. data/lib/ddtrace/contrib/rails/core_extensions.rb +0 -353
data/CHANGELOG.md CHANGED
@@ -4,15 +4,32 @@
4
4
 
5
5
  ## [Unreleased (beta)]
6
6
 
7
- ## [0.26.1] - 2019-11-26
7
+ ## [0.27.0] - 2019-09-04
8
8
 
9
- Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.26.1
9
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.27.0
10
10
 
11
- Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.26.0...v0.26.1
11
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.26.0...v0.27.0
12
12
 
13
- ### Fixed
13
+ Support for Ruby < 2.0 is *removed*. Plan for timeline is as follows:
14
+
15
+ - 0.25.0: Support for Ruby < 2.0 is deprecated; retains full feature support.
16
+ - 0.26.0: Last version to support Ruby < 2.0; any new features will not support 1.9.
17
+ - 0.27.0: Support for Ruby < 2.0 is removed.
18
+
19
+ Version 0.26.x will receive only critical bugfixes for 1 year following the release of 0.26.0 (August 6th, 2020.)
20
+
21
+ ### Added
22
+
23
+ - Support for Ruby 2.5 & 2.6 (#800, #802)
24
+ - Ethon integration (#527, #778) (@al-kudryavtsev)
25
+
26
+ ### Refactored
27
+
28
+ - Rails integration into smaller integrations per component (#747, #762, #795)
29
+
30
+ ### Removed
14
31
 
15
- - Priority sampling not activating by default (#868)
32
+ - Support for Ruby 1.9 (#791)
16
33
 
17
34
  ## [0.26.0] - 2019-08-06
18
35
 
@@ -912,9 +929,9 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
912
929
 
913
930
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
914
931
 
915
- [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.26.0...master
916
- [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.26.0...0.27-dev
917
- [0.26.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.26.0...v0.26.1
932
+ [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.27.0...master
933
+ [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.27.0...0.28-dev
934
+ [0.27.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.26.0...v0.27.0
918
935
  [0.26.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.25.1...v0.26.0
919
936
  [0.25.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.25.0...v0.25.1
920
937
  [0.25.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.24.0...v0.25.0
data/Rakefile CHANGED
@@ -59,6 +59,8 @@ namespace :spec do
59
59
  end
60
60
 
61
61
  [
62
+ :action_pack,
63
+ :action_view,
62
64
  :active_model_serializers,
63
65
  :active_record,
64
66
  :active_support,
@@ -67,6 +69,7 @@ namespace :spec do
67
69
  :dalli,
68
70
  :delayed_job,
69
71
  :elasticsearch,
72
+ :ethon,
70
73
  :excon,
71
74
  :faraday,
72
75
  :grape,
@@ -186,52 +189,8 @@ end
186
189
 
187
190
  desc 'CI task; it runs all tests for current version of Ruby'
188
191
  task :ci do
189
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9.3')
190
- raise NotImplementedError, 'Ruby versions < 1.9.3 are not supported!'
191
- elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
192
- && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
193
- # Main library
194
- sh 'bundle exec rake test:main'
195
- sh 'bundle exec rake spec:main'
196
- sh 'bundle exec rake spec:contrib'
197
-
198
- if RUBY_PLATFORM != 'java'
199
- # Contrib minitests
200
- sh 'bundle exec appraisal contrib-old rake test:monkey'
201
- sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
202
- # Contrib specs
203
- sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
204
- sh 'bundle exec appraisal contrib-old rake spec:active_record'
205
- sh 'bundle exec appraisal contrib-old rake spec:active_support'
206
- sh 'bundle exec appraisal contrib-old rake spec:aws'
207
- sh 'bundle exec appraisal contrib-old rake spec:concurrent_ruby'
208
- sh 'bundle exec appraisal contrib-old rake spec:dalli'
209
- sh 'bundle exec appraisal contrib-old rake spec:delayed_job'
210
- sh 'bundle exec appraisal contrib-old rake spec:elasticsearch'
211
- sh 'bundle exec appraisal contrib-old rake spec:excon'
212
- sh 'bundle exec appraisal contrib-old rake spec:faraday'
213
- sh 'bundle exec appraisal contrib-old rake spec:http'
214
- sh 'bundle exec appraisal contrib-old rake spec:mongodb'
215
- sh 'bundle exec appraisal contrib-old rake spec:mysql2'
216
- sh 'bundle exec appraisal contrib-old rake spec:rack'
217
- sh 'bundle exec appraisal contrib-old rake spec:rake'
218
- sh 'bundle exec appraisal contrib-old rake spec:redis'
219
- sh 'bundle exec appraisal contrib-old rake spec:resque'
220
- sh 'bundle exec appraisal contrib-old rake spec:rest_client'
221
- sh 'bundle exec appraisal contrib-old rake spec:sequel'
222
- sh 'bundle exec appraisal contrib-old rake spec:sinatra'
223
- # Rails minitests
224
- sh 'bundle exec appraisal rails30-postgres rake test:rails'
225
- sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
226
- sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
227
- sh 'bundle exec appraisal rails32-postgres rake test:rails'
228
- sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
229
- sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
230
- # Rails specs
231
- sh 'bundle exec appraisal rails30-postgres rake spec:rails'
232
- sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
233
- sh 'bundle exec appraisal rails32-postgres rake spec:rails'
234
- end
192
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
193
+ raise NotImplementedError, 'Ruby versions < 2.0.0 are not supported!'
235
194
  elsif Gem::Version.new('2.0.0') <= Gem::Version.new(RUBY_VERSION) \
236
195
  && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1.0')
237
196
  # Main library
@@ -265,6 +224,7 @@ task :ci do
265
224
  sh 'bundle exec appraisal contrib-old rake spec:rest_client'
266
225
  sh 'bundle exec appraisal contrib-old rake spec:sequel'
267
226
  sh 'bundle exec appraisal contrib-old rake spec:sinatra'
227
+ sh 'bundle exec appraisal contrib-old rake spec:ethon'
268
228
  # Rails minitests
269
229
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
270
230
  sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
@@ -278,6 +238,11 @@ task :ci do
278
238
  sh 'bundle exec appraisal rails30-postgres rake spec:rails'
279
239
  sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
280
240
  sh 'bundle exec appraisal rails32-postgres rake spec:rails'
241
+ # Rails suite specs
242
+ sh 'bundle exec appraisal rails32-postgres rake spec:action_pack'
243
+ sh 'bundle exec appraisal rails32-postgres rake spec:action_view'
244
+ sh 'bundle exec appraisal rails32-mysql2 rake spec:active_record'
245
+ sh 'bundle exec appraisal rails32-postgres rake spec:active_support'
281
246
  end
282
247
  elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
283
248
  && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.0')
@@ -313,6 +278,7 @@ task :ci do
313
278
  sh 'bundle exec appraisal contrib-old rake spec:rest_client'
314
279
  sh 'bundle exec appraisal contrib-old rake spec:sequel'
315
280
  sh 'bundle exec appraisal contrib-old rake spec:sinatra'
281
+ sh 'bundle exec appraisal contrib-old rake spec:ethon'
316
282
  # Rails minitests
317
283
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
318
284
  sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
@@ -332,6 +298,11 @@ task :ci do
332
298
  sh 'bundle exec appraisal rails32-postgres rake spec:rails'
333
299
  sh 'bundle exec appraisal rails4-mysql2 rake spec:rails'
334
300
  sh 'bundle exec appraisal rails4-postgres rake spec:rails'
301
+ # Rails suite specs
302
+ sh 'bundle exec appraisal rails32-postgres rake spec:action_pack'
303
+ sh 'bundle exec appraisal rails32-postgres rake spec:action_view'
304
+ sh 'bundle exec appraisal rails32-mysql2 rake spec:active_record'
305
+ sh 'bundle exec appraisal rails32-postgres rake spec:active_support'
335
306
  end
336
307
  elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION)\
337
308
  && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0')
@@ -347,6 +318,8 @@ task :ci do
347
318
  sh 'bundle exec appraisal contrib rake test:sidekiq'
348
319
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
349
320
  # Contrib specs
321
+ sh 'bundle exec appraisal contrib rake spec:action_pack'
322
+ sh 'bundle exec appraisal contrib rake spec:action_view'
350
323
  sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
351
324
  sh 'bundle exec appraisal contrib rake spec:active_record'
352
325
  sh 'bundle exec appraisal contrib rake spec:active_support'
@@ -371,6 +344,7 @@ task :ci do
371
344
  sh 'bundle exec appraisal contrib rake spec:sequel'
372
345
  sh 'bundle exec appraisal contrib rake spec:shoryuken'
373
346
  sh 'bundle exec appraisal contrib rake spec:sinatra'
347
+ sh 'bundle exec appraisal contrib rake spec:ethon'
374
348
  # Rails minitests
375
349
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
376
350
  sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
@@ -387,6 +361,7 @@ task :ci do
387
361
  sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
388
362
  sh 'bundle exec appraisal rails5-postgres rake test:rails'
389
363
  sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
364
+ sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
390
365
  sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
391
366
  sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
392
367
  sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
@@ -413,6 +388,8 @@ task :ci do
413
388
  sh 'bundle exec appraisal contrib rake test:sidekiq'
414
389
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
415
390
  # Contrib specs
391
+ sh 'bundle exec appraisal contrib rake spec:action_pack'
392
+ sh 'bundle exec appraisal contrib rake spec:action_view'
416
393
  sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
417
394
  sh 'bundle exec appraisal contrib rake spec:active_record'
418
395
  sh 'bundle exec appraisal contrib rake spec:active_support'
@@ -437,6 +414,7 @@ task :ci do
437
414
  sh 'bundle exec appraisal contrib rake spec:sequel'
438
415
  sh 'bundle exec appraisal contrib rake spec:shoryuken'
439
416
  sh 'bundle exec appraisal contrib rake spec:sinatra'
417
+ sh 'bundle exec appraisal contrib rake spec:ethon'
440
418
  # Rails minitests
441
419
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
442
420
  sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
@@ -453,6 +431,7 @@ task :ci do
453
431
  sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
454
432
  sh 'bundle exec appraisal rails5-postgres rake test:rails'
455
433
  sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
434
+ sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
456
435
  sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
457
436
  sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
458
437
  sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
@@ -465,7 +444,8 @@ task :ci do
465
444
  sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
466
445
  sh 'bundle exec appraisal rails5-postgres rake spec:rails'
467
446
  end
468
- elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION)
447
+ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION) \
448
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.5.0')
469
449
  # Main library
470
450
  sh 'bundle exec rake test:main'
471
451
  sh 'bundle exec rake spec:main'
@@ -473,11 +453,15 @@ task :ci do
473
453
  sh 'bundle exec rake spec:opentracer'
474
454
 
475
455
  if RUBY_PLATFORM != 'java'
456
+ # Benchmarks
457
+ sh 'bundle exec rake benchmark'
476
458
  # Contrib minitests
477
459
  sh 'bundle exec appraisal contrib rake test:grape'
478
460
  sh 'bundle exec appraisal contrib rake test:sidekiq'
479
461
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
480
462
  # Contrib specs
463
+ sh 'bundle exec appraisal contrib rake spec:action_pack'
464
+ sh 'bundle exec appraisal contrib rake spec:action_view'
481
465
  sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
482
466
  sh 'bundle exec appraisal contrib rake spec:active_record'
483
467
  sh 'bundle exec appraisal contrib rake spec:active_support'
@@ -502,8 +486,130 @@ task :ci do
502
486
  sh 'bundle exec appraisal contrib rake spec:sequel'
503
487
  sh 'bundle exec appraisal contrib rake spec:shoryuken'
504
488
  sh 'bundle exec appraisal contrib rake spec:sinatra'
489
+ sh 'bundle exec appraisal contrib rake spec:ethon'
505
490
  # Rails minitests
491
+ # We only test Rails 5+ because older versions require Bundler < 2.0
492
+ sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
493
+ sh 'bundle exec appraisal rails5-postgres rake test:rails'
494
+ sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
495
+ sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
496
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
497
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
498
+ sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
499
+ # Rails specs
500
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
501
+ sh 'bundle exec appraisal rails5-postgres rake spec:rails'
502
+ end
503
+ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
504
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
505
+ # Main library
506
+ sh 'bundle exec rake test:main'
507
+ sh 'bundle exec rake spec:main'
508
+ sh 'bundle exec rake spec:contrib'
509
+ sh 'bundle exec rake spec:opentracer'
510
+
511
+ if RUBY_PLATFORM != 'java'
512
+ # Benchmarks
506
513
  sh 'bundle exec rake benchmark'
514
+ # Contrib minitests
515
+ sh 'bundle exec appraisal contrib rake test:grape'
516
+ sh 'bundle exec appraisal contrib rake test:sidekiq'
517
+ sh 'bundle exec appraisal contrib rake test:sucker_punch'
518
+ # Contrib specs
519
+ sh 'bundle exec appraisal contrib rake spec:action_pack'
520
+ sh 'bundle exec appraisal contrib rake spec:action_view'
521
+ sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
522
+ sh 'bundle exec appraisal contrib rake spec:active_record'
523
+ sh 'bundle exec appraisal contrib rake spec:active_support'
524
+ sh 'bundle exec appraisal contrib rake spec:aws'
525
+ sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
526
+ sh 'bundle exec appraisal contrib rake spec:dalli'
527
+ sh 'bundle exec appraisal contrib rake spec:delayed_job'
528
+ sh 'bundle exec appraisal contrib rake spec:elasticsearch'
529
+ sh 'bundle exec appraisal contrib rake spec:excon'
530
+ sh 'bundle exec appraisal contrib rake spec:faraday'
531
+ sh 'bundle exec appraisal contrib rake spec:graphql'
532
+ sh 'bundle exec appraisal contrib rake spec:grpc'
533
+ sh 'bundle exec appraisal contrib rake spec:http'
534
+ sh 'bundle exec appraisal contrib rake spec:mongodb'
535
+ sh 'bundle exec appraisal contrib rake spec:mysql2'
536
+ sh 'bundle exec appraisal contrib rake spec:racecar'
537
+ sh 'bundle exec appraisal contrib rake spec:rack'
538
+ sh 'bundle exec appraisal contrib rake spec:rake'
539
+ sh 'bundle exec appraisal contrib rake spec:redis'
540
+ sh 'bundle exec appraisal contrib rake spec:resque'
541
+ sh 'bundle exec appraisal contrib rake spec:rest_client'
542
+ sh 'bundle exec appraisal contrib rake spec:sequel'
543
+ sh 'bundle exec appraisal contrib rake spec:shoryuken'
544
+ sh 'bundle exec appraisal contrib rake spec:sinatra'
545
+ sh 'bundle exec appraisal contrib rake spec:ethon'
546
+ # Rails minitests
547
+ # We only test Rails 5+ because older versions require Bundler < 2.0
548
+ sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
549
+ sh 'bundle exec appraisal rails5-postgres rake test:rails'
550
+ sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
551
+ sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
552
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
553
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
554
+ sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
555
+ # Rails specs
556
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
557
+ sh 'bundle exec appraisal rails5-postgres rake spec:rails'
558
+ end
559
+ elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION)
560
+ # Main library
561
+ sh 'bundle exec rake test:main'
562
+ sh 'bundle exec rake spec:main'
563
+ sh 'bundle exec rake spec:contrib'
564
+ sh 'bundle exec rake spec:opentracer'
565
+
566
+ if RUBY_PLATFORM != 'java'
567
+ # Benchmarks
568
+ sh 'bundle exec rake benchmark'
569
+ # Contrib minitests
570
+ sh 'bundle exec appraisal contrib rake test:grape'
571
+ sh 'bundle exec appraisal contrib rake test:sidekiq'
572
+ sh 'bundle exec appraisal contrib rake test:sucker_punch'
573
+ # Contrib specs
574
+ sh 'bundle exec appraisal contrib rake spec:action_pack'
575
+ sh 'bundle exec appraisal contrib rake spec:action_view'
576
+ sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
577
+ sh 'bundle exec appraisal contrib rake spec:active_record'
578
+ sh 'bundle exec appraisal contrib rake spec:active_support'
579
+ sh 'bundle exec appraisal contrib rake spec:aws'
580
+ sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
581
+ sh 'bundle exec appraisal contrib rake spec:dalli'
582
+ sh 'bundle exec appraisal contrib rake spec:delayed_job'
583
+ sh 'bundle exec appraisal contrib rake spec:elasticsearch'
584
+ sh 'bundle exec appraisal contrib rake spec:excon'
585
+ sh 'bundle exec appraisal contrib rake spec:faraday'
586
+ sh 'bundle exec appraisal contrib rake spec:graphql'
587
+ sh 'bundle exec appraisal contrib rake spec:grpc'
588
+ sh 'bundle exec appraisal contrib rake spec:http'
589
+ sh 'bundle exec appraisal contrib rake spec:mongodb'
590
+ sh 'bundle exec appraisal contrib rake spec:mysql2'
591
+ sh 'bundle exec appraisal contrib rake spec:racecar'
592
+ sh 'bundle exec appraisal contrib rake spec:rack'
593
+ sh 'bundle exec appraisal contrib rake spec:rake'
594
+ sh 'bundle exec appraisal contrib rake spec:redis'
595
+ sh 'bundle exec appraisal contrib rake spec:resque'
596
+ sh 'bundle exec appraisal contrib rake spec:rest_client'
597
+ sh 'bundle exec appraisal contrib rake spec:sequel'
598
+ sh 'bundle exec appraisal contrib rake spec:shoryuken'
599
+ sh 'bundle exec appraisal contrib rake spec:sinatra'
600
+ sh 'bundle exec appraisal contrib rake spec:ethon'
601
+ # Rails minitests
602
+ # We only test Rails 5+ because older versions require Bundler < 2.0
603
+ sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
604
+ sh 'bundle exec appraisal rails5-postgres rake test:rails'
605
+ sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
606
+ sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
607
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
608
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
609
+ sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
610
+ # Rails specs
611
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
612
+ sh 'bundle exec appraisal rails5-postgres rake spec:rails'
507
613
  end
508
614
  end
509
615
  end
data/ddtrace.gemspec CHANGED
@@ -7,7 +7,7 @@ require 'ddtrace/version'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'ddtrace'
9
9
  spec.version = Datadog::VERSION::STRING
10
- spec.required_ruby_version = '>= 1.9.1'
10
+ spec.required_ruby_version = '>= 2.0.0'
11
11
  spec.authors = ['Datadog, Inc.']
12
12
  spec.email = ['dev@datadoghq.com']
13
13
 
data/docker-compose.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  version: '3.2'
2
2
  services:
3
- tracer-1.9:
4
- image: palazzem/docker-library:ddtrace_rb_1_9_3
3
+ tracer-2.0:
4
+ image: palazzem/docker-library:ddtrace_rb_2_0_0
5
5
  command: /bin/bash
6
6
  depends_on:
7
7
  - ddagent
@@ -26,10 +26,10 @@ services:
26
26
  tty: true
27
27
  volumes:
28
28
  - .:/app
29
- - bundle-1.9:/usr/local/bundle
30
- - gemfiles-1.9:/app/gemfiles
31
- tracer-2.0:
32
- image: palazzem/docker-library:ddtrace_rb_2_0_0
29
+ - bundle-2.0:/usr/local/bundle
30
+ - gemfiles-2.0:/app/gemfiles
31
+ tracer-2.1:
32
+ image: palazzem/docker-library:ddtrace_rb_2_1_10
33
33
  command: /bin/bash
34
34
  depends_on:
35
35
  - ddagent
@@ -54,10 +54,10 @@ services:
54
54
  tty: true
55
55
  volumes:
56
56
  - .:/app
57
- - bundle-2.0:/usr/local/bundle
58
- - gemfiles-2.0:/app/gemfiles
59
- tracer-2.1:
60
- image: palazzem/docker-library:ddtrace_rb_2_1_10
57
+ - bundle-2.1:/usr/local/bundle
58
+ - gemfiles-2.1:/app/gemfiles
59
+ tracer-2.2:
60
+ image: palazzem/docker-library:ddtrace_rb_2_2_10
61
61
  command: /bin/bash
62
62
  depends_on:
63
63
  - ddagent
@@ -82,10 +82,10 @@ services:
82
82
  tty: true
83
83
  volumes:
84
84
  - .:/app
85
- - bundle-2.1:/usr/local/bundle
86
- - gemfiles-2.1:/app/gemfiles
87
- tracer-2.2:
88
- image: palazzem/docker-library:ddtrace_rb_2_2_10
85
+ - bundle-2.2:/usr/local/bundle
86
+ - gemfiles-2.2:/app/gemfiles
87
+ tracer-2.3:
88
+ image: palazzem/docker-library:ddtrace_rb_2_3_8
89
89
  command: /bin/bash
90
90
  depends_on:
91
91
  - ddagent
@@ -110,10 +110,10 @@ services:
110
110
  tty: true
111
111
  volumes:
112
112
  - .:/app
113
- - bundle-2.2:/usr/local/bundle
114
- - gemfiles-2.2:/app/gemfiles
115
- tracer-2.3:
116
- image: palazzem/docker-library:ddtrace_rb_2_3_8
113
+ - bundle-2.3:/usr/local/bundle
114
+ - gemfiles-2.3:/app/gemfiles
115
+ tracer-2.4:
116
+ image: palazzem/docker-library:ddtrace_rb_2_4_6
117
117
  command: /bin/bash
118
118
  depends_on:
119
119
  - ddagent
@@ -138,10 +138,10 @@ services:
138
138
  tty: true
139
139
  volumes:
140
140
  - .:/app
141
- - bundle-2.3:/usr/local/bundle
142
- - gemfiles-2.3:/app/gemfiles
143
- tracer-2.4:
144
- image: palazzem/docker-library:ddtrace_rb_2_4_6
141
+ - bundle-2.4:/usr/local/bundle
142
+ - gemfiles-2.4:/app/gemfiles
143
+ tracer-2.5:
144
+ image: marcotc/docker-library:ddtrace_rb_2_5_6
145
145
  command: /bin/bash
146
146
  depends_on:
147
147
  - ddagent
@@ -166,8 +166,36 @@ services:
166
166
  tty: true
167
167
  volumes:
168
168
  - .:/app
169
- - bundle-2.4:/usr/local/bundle
170
- - gemfiles-2.4:/app/gemfiles
169
+ - bundle-2.5:/usr/local/bundle
170
+ - gemfiles-2.5:/app/gemfiles
171
+ tracer-2.6:
172
+ image: marcotc/docker-library:ddtrace_rb_2_6_4
173
+ command: /bin/bash
174
+ depends_on:
175
+ - ddagent
176
+ - elasticsearch
177
+ - memcached
178
+ - mongodb
179
+ - mysql
180
+ - postgres
181
+ - redis
182
+ env_file: ./.env
183
+ environment:
184
+ - BUNDLE_GEMFILE=/app/Gemfile
185
+ - DD_AGENT_HOST=ddagent
186
+ - TEST_DATADOG_INTEGRATION=1
187
+ - TEST_ELASTICSEARCH_HOST=elasticsearch
188
+ - TEST_MEMCACHED_HOST=memcached
189
+ - TEST_MONGODB_HOST=mongodb
190
+ - TEST_MYSQL_HOST=mysql
191
+ - TEST_POSTGRES_HOST=postgres
192
+ - TEST_REDIS_HOST=redis
193
+ stdin_open: true
194
+ tty: true
195
+ volumes:
196
+ - .:/app
197
+ - bundle-2.6:/usr/local/bundle
198
+ - gemfiles-2.6:/app/gemfiles
171
199
  ddagent:
172
200
  image: datadog/docker-dd-agent
173
201
  environment:
@@ -232,15 +260,17 @@ services:
232
260
  ports:
233
261
  - "${TEST_REDIS_PORT}:6379"
234
262
  volumes:
235
- bundle-1.9:
236
263
  bundle-2.0:
237
264
  bundle-2.1:
238
265
  bundle-2.2:
239
266
  bundle-2.3:
240
267
  bundle-2.4:
241
- gemfiles-1.9:
268
+ bundle-2.5:
269
+ bundle-2.6:
242
270
  gemfiles-2.0:
243
271
  gemfiles-2.1:
244
272
  gemfiles-2.2:
245
273
  gemfiles-2.3:
246
274
  gemfiles-2.4:
275
+ gemfiles-2.5:
276
+ gemfiles-2.6: