ddtrace 0.12.0 → 0.13.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.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +468 -0
  3. data/.circleci/images/primary/Dockerfile-1.9.3 +69 -0
  4. data/.circleci/images/primary/Dockerfile-2.0.0 +69 -0
  5. data/.circleci/images/primary/Dockerfile-2.1.10 +69 -0
  6. data/.circleci/images/primary/Dockerfile-2.2.10 +69 -0
  7. data/.circleci/images/primary/Dockerfile-2.3.7 +73 -0
  8. data/.circleci/images/primary/Dockerfile-2.4.4 +73 -0
  9. data/.dockerignore +1 -0
  10. data/.env +21 -11
  11. data/.gitignore +1 -1
  12. data/.rubocop.yml +4 -1
  13. data/Appraisals +471 -66
  14. data/CHANGELOG.md +80 -2
  15. data/Rakefile +304 -80
  16. data/ddtrace.gemspec +7 -7
  17. data/docker-compose.yml +240 -37
  18. data/docs/GettingStarted.md +273 -7
  19. data/lib/ddtrace/configuration.rb +2 -2
  20. data/lib/ddtrace/contrib/active_model_serializers/event.rb +57 -0
  21. data/lib/ddtrace/contrib/active_model_serializers/events/render.rb +32 -0
  22. data/lib/ddtrace/contrib/active_model_serializers/events/serialize.rb +35 -0
  23. data/lib/ddtrace/contrib/active_model_serializers/events.rb +30 -0
  24. data/lib/ddtrace/contrib/active_model_serializers/patcher.rb +62 -0
  25. data/lib/ddtrace/contrib/active_record/event.rb +30 -0
  26. data/lib/ddtrace/contrib/active_record/events/instantiation.rb +51 -0
  27. data/lib/ddtrace/contrib/active_record/events/sql.rb +48 -0
  28. data/lib/ddtrace/contrib/active_record/events.rb +30 -0
  29. data/lib/ddtrace/contrib/active_record/patcher.rb +3 -73
  30. data/lib/ddtrace/contrib/active_record/utils.rb +1 -15
  31. data/lib/ddtrace/contrib/active_support/notifications/event.rb +62 -0
  32. data/lib/ddtrace/contrib/aws/instrumentation.rb +2 -2
  33. data/lib/ddtrace/contrib/elasticsearch/patcher.rb +2 -2
  34. data/lib/ddtrace/contrib/elasticsearch/quantize.rb +18 -49
  35. data/lib/ddtrace/contrib/excon/middleware.rb +139 -0
  36. data/lib/ddtrace/contrib/excon/patcher.rb +50 -0
  37. data/lib/ddtrace/contrib/grpc/datadog_interceptor/client.rb +49 -0
  38. data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +66 -0
  39. data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +65 -0
  40. data/lib/ddtrace/contrib/grpc/intercept_with_datadog.rb +49 -0
  41. data/lib/ddtrace/contrib/grpc/patcher.rb +62 -0
  42. data/lib/ddtrace/contrib/http/patcher.rb +18 -16
  43. data/lib/ddtrace/contrib/mongodb/parsers.rb +24 -13
  44. data/lib/ddtrace/contrib/mongodb/patcher.rb +1 -0
  45. data/lib/ddtrace/contrib/mongodb/subscribers.rb +5 -4
  46. data/lib/ddtrace/contrib/mysql2/client.rb +60 -0
  47. data/lib/ddtrace/contrib/mysql2/patcher.rb +43 -0
  48. data/lib/ddtrace/contrib/racecar/event.rb +61 -0
  49. data/lib/ddtrace/contrib/racecar/events/batch.rb +27 -0
  50. data/lib/ddtrace/contrib/racecar/events/message.rb +27 -0
  51. data/lib/ddtrace/contrib/racecar/events.rb +30 -0
  52. data/lib/ddtrace/contrib/racecar/patcher.rb +6 -52
  53. data/lib/ddtrace/contrib/rack/middlewares.rb +65 -11
  54. data/lib/ddtrace/contrib/rack/patcher.rb +16 -0
  55. data/lib/ddtrace/contrib/rack/request_queue.rb +34 -0
  56. data/lib/ddtrace/contrib/rails/action_controller_patch.rb +77 -0
  57. data/lib/ddtrace/contrib/rails/action_view.rb +0 -65
  58. data/lib/ddtrace/contrib/rails/active_support.rb +9 -8
  59. data/lib/ddtrace/contrib/rails/core_extensions.rb +74 -115
  60. data/lib/ddtrace/contrib/rake/instrumentation.rb +70 -0
  61. data/lib/ddtrace/contrib/rake/patcher.rb +53 -0
  62. data/lib/ddtrace/contrib/sequel/database.rb +58 -0
  63. data/lib/ddtrace/contrib/sequel/dataset.rb +59 -0
  64. data/lib/ddtrace/contrib/sequel/patcher.rb +56 -0
  65. data/lib/ddtrace/contrib/sequel/utils.rb +28 -0
  66. data/lib/ddtrace/contrib/sidekiq/tracer.rb +1 -0
  67. data/lib/ddtrace/contrib/sinatra/env.rb +39 -0
  68. data/lib/ddtrace/contrib/sinatra/headers.rb +31 -0
  69. data/lib/ddtrace/contrib/sinatra/tracer.rb +21 -38
  70. data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +61 -0
  71. data/lib/ddtrace/ext/distributed.rb +5 -0
  72. data/lib/ddtrace/ext/grpc.rb +7 -0
  73. data/lib/ddtrace/ext/http.rb +35 -5
  74. data/lib/ddtrace/propagation/grpc_propagator.rb +54 -0
  75. data/lib/ddtrace/quantization/hash.rb +103 -0
  76. data/lib/ddtrace/tracer.rb +4 -1
  77. data/lib/ddtrace/utils/database.rb +21 -0
  78. data/lib/ddtrace/utils.rb +12 -2
  79. data/lib/ddtrace/version.rb +1 -1
  80. data/lib/ddtrace.rb +7 -0
  81. metadata +50 -21
  82. data/circle.yml +0 -69
  83. data/gemfiles/contrib.gemfile +0 -25
  84. data/gemfiles/contrib_old.gemfile +0 -23
  85. data/gemfiles/rails30_postgres.gemfile +0 -11
  86. data/gemfiles/rails30_postgres_sidekiq.gemfile +0 -12
  87. data/gemfiles/rails32_mysql2.gemfile +0 -12
  88. data/gemfiles/rails32_postgres.gemfile +0 -11
  89. data/gemfiles/rails32_postgres_redis.gemfile +0 -13
  90. data/gemfiles/rails32_postgres_sidekiq.gemfile +0 -12
  91. data/gemfiles/rails4_mysql2.gemfile +0 -10
  92. data/gemfiles/rails4_postgres.gemfile +0 -10
  93. data/gemfiles/rails4_postgres_redis.gemfile +0 -12
  94. data/gemfiles/rails4_postgres_sidekiq.gemfile +0 -12
  95. data/gemfiles/rails5_mysql2.gemfile +0 -9
  96. data/gemfiles/rails5_postgres.gemfile +0 -9
  97. data/gemfiles/rails5_postgres_redis.gemfile +0 -11
  98. data/gemfiles/rails5_postgres_sidekiq.gemfile +0 -11
data/CHANGELOG.md CHANGED
@@ -4,6 +4,81 @@
4
4
 
5
5
  ## [Unreleased (beta)]
6
6
 
7
+ ## [0.13.0] - 2018-06-20
8
+
9
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.13.0
10
+
11
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.12.1...v0.13.0
12
+
13
+ ### Added
14
+
15
+ - Sequel integration (supporting Ruby 2.0+) (#171, #367) (@randy-girard, @twe4ked, @palin)
16
+ - gRPC integration (supporting Ruby 2.2+) (#379, #403) (@Jared-Prime)
17
+ - ActiveModelSerializers integration (#340) (@sullimander)
18
+ - Excon integration (#211, #426) (@walterking, @jeffjo)
19
+ - Rake integration (supporting Ruby 2.0+, Rake 12.0+) (#409)
20
+ - Request queuing tracing to Rack (experimental) (#272)
21
+ - ActiveSupport::Notifications::Event helper for event tracing (#400)
22
+ - Request and response header tags to Rack (#389)
23
+ - Request and response header tags to Sinatra (#427, #375)
24
+ - MySQL2 integration (#453) (@jamiehodge)
25
+ - Sidekiq job delay tag (#443, #418) (@gottfrois)
26
+
27
+ ### Fixed
28
+
29
+ - Elasticsearch quantization of ids (#458)
30
+ - MongoDB to allow quantization of collection name (#463)
31
+
32
+ ### Refactored
33
+
34
+ - Hash quantization into core library (#410)
35
+ - MongoDB integration to use Hash quantization library (#463)
36
+
37
+ ### Changed
38
+
39
+ - Hash quantization truncates arrays with nested objects (#463)
40
+
41
+ ## [0.13.0.beta1] - 2018-05-09
42
+
43
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.13.0.beta1
44
+
45
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0...v0.13.0.beta1
46
+
47
+ ### Added
48
+ - Sequel integration (supporting Ruby 2.0+) (#171, #367) (@randy-girard, @twe4ked, @palin)
49
+ - gRPC integration (supporting Ruby 2.2+) (#379, #403) (@Jared-Prime)
50
+ - ActiveModelSerializers integration (#340) (@sullimander)
51
+ - Excon integration (#211) (@walterking)
52
+ - Rake integration (supporting Ruby 2.0+, Rake 12.0+) (#409)
53
+ - Request queuing tracing to Rack (experimental) (#272)
54
+ - ActiveSupport::Notifications::Event helper for event tracing (#400)
55
+ - Request and response header tags to Rack (#389)
56
+
57
+ ### Refactored
58
+ - Hash quantization into core library (#410)
59
+
60
+ ## [0.12.1] - 2018-06-12
61
+
62
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.12.1
63
+
64
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0...v0.12.1
65
+
66
+ ### Changed
67
+ - Cache configuration `Proxy` objects (#446)
68
+ - `freeze` more constant strings, to improve memory usage (#446)
69
+ - `Utils#truncate` to use slightly less memory (#446)
70
+
71
+ ### Fixed
72
+ - Net/HTTP integration not permitting `service_name` to be overridden. (#407, #430) (@undergroundwebdesigns)
73
+ - Block not being passed through Elasticsearch client initialization. (#421) (@shayonj)
74
+ - Devise raising `NoMethodError` when bad login attempts are made. (#419, #420) (@frsantos)
75
+ - AWS spans using wrong resource name (#374, #377) (@jfrancoist)
76
+ - ActionView `NoMethodError` on very long traces. (#445, #447) (@jvalanen)
77
+
78
+ ### Refactored
79
+ - ActionController patching strategy using modules. (#439)
80
+ - ActionView tracing strategy. (#445, #447)
81
+
7
82
  ## [0.12.0] - 2018-05-08
8
83
 
9
84
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.12.0
@@ -285,8 +360,11 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
285
360
 
286
361
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
287
362
 
288
- [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0...master
289
- [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0...0.13-dev
363
+ [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.13.0...master
364
+ [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.13.0...0.14-dev
365
+ [0.13.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.1...v0.13.0
366
+ [0.13.0.beta1]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0...v0.13.0.beta1
367
+ [0.12.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0...v0.12.1
290
368
  [0.12.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.11.4...v0.12.0
291
369
  [0.12.0.rc1]: https://github.com/DataDog/dd-trace-rb/compare/v0.11.4...v0.12.0.rc1
292
370
  [0.12.0.beta2]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0.beta1...v0.12.0.beta2
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'ddtrace/version'
3
- require 'rubocop/rake_task' if RUBY_VERSION >= '2.1.0'
3
+ require 'rubocop/rake_task' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1.0')
4
4
  require 'rspec/core/rake_task'
5
5
  require 'rake/testtask'
6
6
  require 'appraisal'
@@ -40,20 +40,26 @@ namespace :spec do
40
40
  end
41
41
 
42
42
  [
43
+ :active_model_serializers,
43
44
  :active_record,
44
45
  :active_support,
45
46
  :aws,
46
47
  :dalli,
47
48
  :elasticsearch,
49
+ :excon,
48
50
  :faraday,
49
51
  :grape,
50
52
  :graphql,
53
+ :grpc,
51
54
  :http,
52
55
  :mongodb,
56
+ :mysql2,
53
57
  :racecar,
54
58
  :rack,
59
+ :rake,
55
60
  :redis,
56
61
  :resque,
62
+ :sequel,
57
63
  :sidekiq,
58
64
  :sinatra,
59
65
  :sucker_punch
@@ -114,10 +120,7 @@ namespace :test do
114
120
  :elasticsearch,
115
121
  :grape,
116
122
  :http,
117
- :mongodb,
118
- :resque,
119
123
  :rack,
120
- :resque,
121
124
  :sidekiq,
122
125
  :sinatra,
123
126
  :sucker_punch
@@ -139,10 +142,10 @@ Rake::TestTask.new(:benchmark) do |t|
139
142
  t.test_files = FileList['test/benchmark_test.rb']
140
143
  end
141
144
 
142
- if RUBY_VERSION >= '2.1.0'
145
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1.0')
143
146
  RuboCop::RakeTask.new(:rubocop) do |t|
144
147
  t.options << ['-D']
145
- t.patterns = ['lib/**/*.rb', 'test/**/*.rb', 'Gemfile', 'Rakefile']
148
+ t.patterns = ['lib/**/*.rb', 'test/**/*.rb', 'spec/**/*.rb', 'Gemfile', 'Rakefile']
146
149
  end
147
150
  end
148
151
 
@@ -196,81 +199,302 @@ task :'release:docs' => :docs do
196
199
  sh "aws s3 cp --recursive doc/ s3://#{S3_BUCKET}/#{S3_DIR}/docs/"
197
200
  end
198
201
 
199
- desc 'CI dependent task; it runs all parallel tests'
202
+ desc 'CI task; it runs all tests for current version of Ruby'
200
203
  task :ci do
201
- # CircleCI uses this environment to store the node index (starting from 0)
202
- # check: https://circleci.com/docs/parallel-manual-setup/#env-splitting
203
- case ENV['CIRCLE_NODE_INDEX'].to_i
204
- when 0
205
- sh 'rvm $MRI_VERSIONS,$MRI_OLD_VERSIONS,$JRUBY_VERSIONS --verbose do rake test:main'
206
- # RSpec
207
- sh 'rvm $MRI_VERSIONS,$MRI_OLD_VERSIONS,$JRUBY_VERSIONS --verbose do rake spec:main'
208
- when 1
209
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:elasticsearch'
210
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:http'
211
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:sinatra'
212
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:rack'
213
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:grape'
214
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:aws'
215
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:mongodb'
216
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:sucker_punch'
217
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:resque'
218
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:monkey'
219
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:elasticsearch'
220
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:http'
221
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:sinatra'
222
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:rack'
223
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:aws'
224
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:mongodb'
225
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:sucker_punch'
226
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake test:resque'
227
- # RSpec
228
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake spec:active_record'
229
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake spec:active_support'
230
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake spec:dalli'
231
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake spec:faraday'
232
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake spec:graphql'
233
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake spec:racecar'
234
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake spec:redis'
235
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake spec:active_record'
236
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake spec:active_support'
237
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake spec:dalli'
238
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake spec:faraday'
239
- sh 'rvm $MRI_OLD_VERSIONS --verbose do appraisal contrib-old rake spec:redis'
240
- when 2
241
- sh 'rvm $MRI_VERSIONS --verbose do appraisal contrib rake test:sidekiq'
242
- sh 'rvm $SIDEKIQ_OLD_VERSIONS --verbose do appraisal contrib-old rake test:sidekiq'
243
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails30-postgres rake test:rails'
244
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails30-postgres rake test:railsdisableenv'
245
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails32-mysql2 rake test:rails'
246
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails32-postgres rake test:rails'
247
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails32-postgres-redis rake test:railsredis'
248
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails32-postgres rake test:railsdisableenv'
249
- sh 'rvm $RAILS4_VERSIONS --verbose do appraisal rails4-mysql2 rake test:rails'
250
- sh 'rvm $RAILS4_VERSIONS --verbose do appraisal rails4-postgres rake test:rails'
251
- sh 'rvm $RAILS4_VERSIONS --verbose do appraisal rails4-postgres-redis rake test:railsredis'
252
- sh 'rvm $RAILS4_VERSIONS --verbose do appraisal rails4-postgres rake test:railsdisableenv'
253
- sh 'rvm $RAILS3_SIDEKIQ_VERSIONS --verbose do appraisal rails30-postgres-sidekiq rake test:railssidekiq'
254
- sh 'rvm $RAILS3_SIDEKIQ_VERSIONS --verbose do appraisal rails32-postgres-sidekiq rake test:railssidekiq'
255
- sh 'rvm $RAILS4_SIDEKIQ_VERSIONS --verbose do appraisal rails4-postgres-sidekiq rake test:railssidekiq'
256
- sh 'rvm $RAILS4_SIDEKIQ_VERSIONS --verbose do appraisal rails4-postgres-sidekiq rake test:railsactivejob'
257
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-mysql2 rake test:rails'
258
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-postgres rake test:rails'
259
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-postgres-redis rake test:railsredis'
260
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-postgres-sidekiq rake test:railssidekiq'
261
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-postgres-sidekiq rake test:railsactivejob'
262
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-postgres rake test:railsdisableenv'
263
- # RSpec
264
- sh 'rvm $LAST_STABLE --verbose do rake benchmark'
265
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails30-postgres rake spec:rails'
266
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails32-mysql2 rake spec:rails'
267
- sh 'rvm $RAILS3_VERSIONS --verbose do appraisal rails32-postgres rake spec:rails'
268
- sh 'rvm $RAILS4_VERSIONS --verbose do appraisal rails4-mysql2 rake spec:rails'
269
- sh 'rvm $RAILS4_VERSIONS --verbose do appraisal rails4-postgres rake spec:rails'
270
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-mysql2 rake spec:rails'
271
- sh 'rvm $RAILS5_VERSIONS --verbose do appraisal rails5-postgres rake spec:rails'
272
- else
273
- puts 'Too many workers than parallel tasks'
204
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9.3')
205
+ raise NotImplementedError, 'Ruby versions < 1.9.3 are not supported!'
206
+ elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
207
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
208
+ # Main library
209
+ sh 'bundle exec rake test:main'
210
+ sh 'bundle exec rake spec:main'
211
+
212
+ if RUBY_PLATFORM != 'java'
213
+ # Contrib minitests
214
+ sh 'bundle exec appraisal contrib-old rake test:aws'
215
+ sh 'bundle exec appraisal contrib-old rake test:elasticsearch'
216
+ sh 'bundle exec appraisal contrib-old rake test:http'
217
+ sh 'bundle exec appraisal contrib-old rake test:monkey'
218
+ sh 'bundle exec appraisal contrib-old rake test:rack'
219
+ sh 'bundle exec appraisal contrib-old rake test:sinatra'
220
+ sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
221
+ # Contrib specs
222
+ sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
223
+ sh 'bundle exec appraisal contrib-old rake spec:active_record'
224
+ sh 'bundle exec appraisal contrib-old rake spec:active_support'
225
+ sh 'bundle exec appraisal contrib-old rake spec:dalli'
226
+ sh 'bundle exec appraisal contrib-old rake spec:excon'
227
+ sh 'bundle exec appraisal contrib-old rake spec:faraday'
228
+ sh 'bundle exec appraisal contrib-old rake spec:http'
229
+ sh 'bundle exec appraisal contrib-old rake spec:mongodb'
230
+ sh 'bundle exec appraisal contrib-old rake spec:mysql2'
231
+ sh 'bundle exec appraisal contrib-old rake spec:rake'
232
+ sh 'bundle exec appraisal contrib-old rake spec:redis'
233
+ sh 'bundle exec appraisal contrib-old rake spec:resque'
234
+ sh 'bundle exec appraisal contrib-old rake spec:sequel'
235
+ # Rails minitests
236
+ sh 'bundle exec appraisal rails30-postgres rake test:rails'
237
+ sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
238
+ sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
239
+ sh 'bundle exec appraisal rails32-postgres rake test:rails'
240
+ sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
241
+ sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
242
+ # Rails specs
243
+ sh 'bundle exec appraisal rails30-postgres rake spec:rails'
244
+ sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
245
+ sh 'bundle exec appraisal rails32-postgres rake spec:rails'
246
+ end
247
+ elsif Gem::Version.new('2.0.0') <= Gem::Version.new(RUBY_VERSION) \
248
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1.0')
249
+ # Main library
250
+ sh 'bundle exec rake test:main'
251
+ sh 'bundle exec rake spec:main'
252
+
253
+ if RUBY_PLATFORM != 'java'
254
+ # Contrib minitests
255
+ sh 'bundle exec appraisal contrib-old rake test:aws'
256
+ sh 'bundle exec appraisal contrib-old rake test:elasticsearch'
257
+ sh 'bundle exec appraisal contrib-old rake test:http'
258
+ sh 'bundle exec appraisal contrib-old rake test:monkey'
259
+ sh 'bundle exec appraisal contrib-old rake test:rack'
260
+ sh 'bundle exec appraisal contrib-old rake test:sinatra'
261
+ sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
262
+ # Contrib specs
263
+ sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
264
+ sh 'bundle exec appraisal contrib-old rake spec:active_record'
265
+ sh 'bundle exec appraisal contrib-old rake spec:active_support'
266
+ sh 'bundle exec appraisal contrib-old rake spec:dalli'
267
+ sh 'bundle exec appraisal contrib-old rake spec:excon'
268
+ sh 'bundle exec appraisal contrib-old rake spec:faraday'
269
+ sh 'bundle exec appraisal contrib-old rake spec:http'
270
+ sh 'bundle exec appraisal contrib-old rake spec:mongodb'
271
+ sh 'bundle exec appraisal contrib-old rake spec:mysql2'
272
+ sh 'bundle exec appraisal contrib-old rake spec:rake'
273
+ sh 'bundle exec appraisal contrib-old rake spec:redis'
274
+ sh 'bundle exec appraisal contrib-old rake spec:resque'
275
+ sh 'bundle exec appraisal contrib-old rake spec:sequel'
276
+ # Rails minitests
277
+ sh 'bundle exec appraisal contrib-old rake test:sidekiq'
278
+ sh 'bundle exec appraisal rails30-postgres rake test:rails'
279
+ sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
280
+ sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
281
+ sh 'bundle exec appraisal rails32-postgres rake test:rails'
282
+ sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
283
+ sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
284
+ sh 'bundle exec appraisal rails30-postgres-sidekiq rake test:railssidekiq'
285
+ sh 'bundle exec appraisal rails32-postgres-sidekiq rake test:railssidekiq'
286
+ # Rails specs
287
+ sh 'bundle exec appraisal rails30-postgres rake spec:rails'
288
+ sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
289
+ sh 'bundle exec appraisal rails32-postgres rake spec:rails'
290
+ end
291
+ elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
292
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.0')
293
+ # Main library
294
+ sh 'bundle exec rake test:main'
295
+ sh 'bundle exec rake spec:main'
296
+
297
+ if RUBY_PLATFORM != 'java'
298
+ # Contrib minitests
299
+ sh 'bundle exec appraisal contrib-old rake test:aws'
300
+ sh 'bundle exec appraisal contrib-old rake test:elasticsearch'
301
+ sh 'bundle exec appraisal contrib-old rake test:http'
302
+ sh 'bundle exec appraisal contrib-old rake test:monkey'
303
+ sh 'bundle exec appraisal contrib-old rake test:rack'
304
+ sh 'bundle exec appraisal contrib-old rake test:sinatra'
305
+ sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
306
+ # Contrib specs
307
+ sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
308
+ sh 'bundle exec appraisal contrib-old rake spec:active_record'
309
+ sh 'bundle exec appraisal contrib-old rake spec:active_support'
310
+ sh 'bundle exec appraisal contrib-old rake spec:dalli'
311
+ sh 'bundle exec appraisal contrib-old rake spec:excon'
312
+ sh 'bundle exec appraisal contrib-old rake spec:faraday'
313
+ sh 'bundle exec appraisal contrib-old rake spec:http'
314
+ sh 'bundle exec appraisal contrib-old rake spec:mongodb'
315
+ sh 'bundle exec appraisal contrib-old rake spec:mysql2'
316
+ sh 'bundle exec appraisal contrib-old rake spec:rake'
317
+ sh 'bundle exec appraisal contrib-old rake spec:redis'
318
+ sh 'bundle exec appraisal contrib-old rake spec:resque'
319
+ sh 'bundle exec appraisal contrib-old rake spec:sequel'
320
+ # Rails minitests
321
+ sh 'bundle exec appraisal contrib-old rake test:sidekiq'
322
+ sh 'bundle exec appraisal rails30-postgres rake test:rails'
323
+ sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
324
+ sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
325
+ sh 'bundle exec appraisal rails32-postgres rake test:rails'
326
+ sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
327
+ sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
328
+ sh 'bundle exec appraisal rails4-mysql2 rake test:rails'
329
+ sh 'bundle exec appraisal rails4-postgres rake test:rails'
330
+ sh 'bundle exec appraisal rails4-postgres-redis rake test:railsredis'
331
+ sh 'bundle exec appraisal rails4-postgres rake test:railsdisableenv'
332
+ sh 'bundle exec appraisal rails30-postgres-sidekiq rake test:railssidekiq'
333
+ sh 'bundle exec appraisal rails32-postgres-sidekiq rake test:railssidekiq'
334
+ # Rails specs
335
+ sh 'bundle exec appraisal rails30-postgres rake spec:rails'
336
+ sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
337
+ sh 'bundle exec appraisal rails32-postgres rake spec:rails'
338
+ sh 'bundle exec appraisal rails4-mysql2 rake spec:rails'
339
+ sh 'bundle exec appraisal rails4-postgres rake spec:rails'
340
+ end
341
+ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION)\
342
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0')
343
+ # Main library
344
+ sh 'bundle exec rake test:main'
345
+ sh 'bundle exec rake spec:main'
346
+
347
+ if RUBY_PLATFORM != 'java'
348
+ # Contrib minitests
349
+ sh 'bundle exec appraisal contrib rake test:aws'
350
+ sh 'bundle exec appraisal contrib rake test:elasticsearch'
351
+ sh 'bundle exec appraisal contrib rake test:grape'
352
+ sh 'bundle exec appraisal contrib rake test:http'
353
+ sh 'bundle exec appraisal contrib rake test:rack'
354
+ sh 'bundle exec appraisal contrib rake test:sinatra'
355
+ sh 'bundle exec appraisal contrib rake test:sucker_punch'
356
+ # Contrib specs
357
+ sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
358
+ sh 'bundle exec appraisal contrib rake spec:active_record'
359
+ sh 'bundle exec appraisal contrib rake spec:active_support'
360
+ sh 'bundle exec appraisal contrib rake spec:dalli'
361
+ sh 'bundle exec appraisal contrib rake spec:excon'
362
+ sh 'bundle exec appraisal contrib rake spec:faraday'
363
+ sh 'bundle exec appraisal contrib rake spec:graphql'
364
+ sh 'bundle exec appraisal contrib rake spec:grpc'
365
+ sh 'bundle exec appraisal contrib rake spec:http'
366
+ sh 'bundle exec appraisal contrib rake spec:mongodb'
367
+ sh 'bundle exec appraisal contrib rake spec:mysql2'
368
+ sh 'bundle exec appraisal contrib rake spec:racecar'
369
+ sh 'bundle exec appraisal contrib rake spec:rake'
370
+ sh 'bundle exec appraisal contrib rake spec:redis'
371
+ sh 'bundle exec appraisal contrib rake spec:resque'
372
+ sh 'bundle exec appraisal contrib rake spec:sequel'
373
+ # Rails minitests
374
+ sh 'bundle exec appraisal contrib rake test:sidekiq'
375
+ sh 'bundle exec appraisal rails30-postgres rake test:rails'
376
+ sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
377
+ sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
378
+ sh 'bundle exec appraisal rails32-postgres rake test:rails'
379
+ sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
380
+ sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
381
+ sh 'bundle exec appraisal rails4-mysql2 rake test:rails'
382
+ sh 'bundle exec appraisal rails4-postgres rake test:rails'
383
+ sh 'bundle exec appraisal rails4-postgres-redis rake test:railsredis'
384
+ sh 'bundle exec appraisal rails4-postgres rake test:railsdisableenv'
385
+ sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railssidekiq'
386
+ sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railsactivejob'
387
+ sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
388
+ sh 'bundle exec appraisal rails5-postgres rake test:rails'
389
+ sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
390
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
391
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
392
+ sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
393
+ # Rails specs
394
+ sh 'bundle exec appraisal rails30-postgres rake spec:rails'
395
+ sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
396
+ sh 'bundle exec appraisal rails32-postgres rake spec:rails'
397
+ sh 'bundle exec appraisal rails4-mysql2 rake spec:rails'
398
+ sh 'bundle exec appraisal rails4-postgres rake spec:rails'
399
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
400
+ sh 'bundle exec appraisal rails5-postgres rake spec:rails'
401
+ end
402
+ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
403
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4.0')
404
+ # Main library
405
+ sh 'bundle exec rake test:main'
406
+ sh 'bundle exec rake spec:main'
407
+
408
+ if RUBY_PLATFORM != 'java'
409
+ # Contrib minitests
410
+ sh 'bundle exec appraisal contrib rake test:aws'
411
+ sh 'bundle exec appraisal contrib rake test:elasticsearch'
412
+ sh 'bundle exec appraisal contrib rake test:grape'
413
+ sh 'bundle exec appraisal contrib rake test:http'
414
+ sh 'bundle exec appraisal contrib rake test:rack'
415
+ sh 'bundle exec appraisal contrib rake test:sinatra'
416
+ sh 'bundle exec appraisal contrib rake test:sucker_punch'
417
+ # Contrib specs
418
+ sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
419
+ sh 'bundle exec appraisal contrib rake spec:active_record'
420
+ sh 'bundle exec appraisal contrib rake spec:active_support'
421
+ sh 'bundle exec appraisal contrib rake spec:dalli'
422
+ sh 'bundle exec appraisal contrib rake spec:excon'
423
+ sh 'bundle exec appraisal contrib rake spec:faraday'
424
+ sh 'bundle exec appraisal contrib rake spec:graphql'
425
+ sh 'bundle exec appraisal contrib rake spec:grpc'
426
+ sh 'bundle exec appraisal contrib rake spec:http'
427
+ sh 'bundle exec appraisal contrib rake spec:mongodb'
428
+ sh 'bundle exec appraisal contrib rake spec:mysql2'
429
+ sh 'bundle exec appraisal contrib rake spec:racecar'
430
+ sh 'bundle exec appraisal contrib rake spec:rake'
431
+ sh 'bundle exec appraisal contrib rake spec:redis'
432
+ sh 'bundle exec appraisal contrib rake spec:resque'
433
+ sh 'bundle exec appraisal contrib rake spec:sequel'
434
+ # Rails minitests
435
+ sh 'bundle exec appraisal contrib rake test:sidekiq'
436
+ sh 'bundle exec appraisal rails30-postgres rake test:rails'
437
+ sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
438
+ sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
439
+ sh 'bundle exec appraisal rails32-postgres rake test:rails'
440
+ sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
441
+ sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
442
+ sh 'bundle exec appraisal rails4-mysql2 rake test:rails'
443
+ sh 'bundle exec appraisal rails4-postgres rake test:rails'
444
+ sh 'bundle exec appraisal rails4-postgres-redis rake test:railsredis'
445
+ sh 'bundle exec appraisal rails4-postgres rake test:railsdisableenv'
446
+ sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railssidekiq'
447
+ sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railsactivejob'
448
+ sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
449
+ sh 'bundle exec appraisal rails5-postgres rake test:rails'
450
+ sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
451
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
452
+ sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
453
+ sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
454
+ # Rails specs
455
+ sh 'bundle exec appraisal rails30-postgres rake spec:rails'
456
+ sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
457
+ sh 'bundle exec appraisal rails32-postgres rake spec:rails'
458
+ sh 'bundle exec appraisal rails4-mysql2 rake spec:rails'
459
+ sh 'bundle exec appraisal rails4-postgres rake spec:rails'
460
+ sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
461
+ sh 'bundle exec appraisal rails5-postgres rake spec:rails'
462
+ end
463
+ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION)
464
+ # Main library
465
+ sh 'bundle exec rake test:main'
466
+ sh 'bundle exec rake spec:main'
467
+
468
+ if RUBY_PLATFORM != 'java'
469
+ # Contrib minitests
470
+ sh 'bundle exec appraisal contrib rake test:aws'
471
+ sh 'bundle exec appraisal contrib rake test:elasticsearch'
472
+ sh 'bundle exec appraisal contrib rake test:grape'
473
+ sh 'bundle exec appraisal contrib rake test:http'
474
+ sh 'bundle exec appraisal contrib rake test:rack'
475
+ sh 'bundle exec appraisal contrib rake test:sinatra'
476
+ sh 'bundle exec appraisal contrib rake test:sucker_punch'
477
+ # Contrib specs
478
+ sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
479
+ sh 'bundle exec appraisal contrib rake spec:active_record'
480
+ sh 'bundle exec appraisal contrib rake spec:active_support'
481
+ sh 'bundle exec appraisal contrib rake spec:dalli'
482
+ sh 'bundle exec appraisal contrib rake spec:excon'
483
+ sh 'bundle exec appraisal contrib rake spec:faraday'
484
+ sh 'bundle exec appraisal contrib rake spec:graphql'
485
+ sh 'bundle exec appraisal contrib rake spec:grpc'
486
+ sh 'bundle exec appraisal contrib rake spec:http'
487
+ sh 'bundle exec appraisal contrib rake spec:mongodb'
488
+ sh 'bundle exec appraisal contrib rake spec:mysql2'
489
+ sh 'bundle exec appraisal contrib rake spec:racecar'
490
+ sh 'bundle exec appraisal contrib rake spec:rake'
491
+ sh 'bundle exec appraisal contrib rake spec:redis'
492
+ sh 'bundle exec appraisal contrib rake spec:resque'
493
+ sh 'bundle exec appraisal contrib rake spec:sequel'
494
+ # Rails minitests
495
+ sh 'bundle exec appraisal contrib rake test:sidekiq'
496
+ sh 'bundle exec rake benchmark'
497
+ end
274
498
  end
275
499
  end
276
500
 
data/ddtrace.gemspec CHANGED
@@ -6,17 +6,17 @@ require 'ddtrace/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'ddtrace'
9
- spec.version = "#{Datadog::VERSION::STRING}#{ENV['VERSION_SUFFIX']}"
9
+ spec.version = Datadog::VERSION::STRING
10
10
  spec.required_ruby_version = '>= 1.9.1'
11
11
  spec.authors = ['Datadog, Inc.']
12
12
  spec.email = ['dev@datadoghq.com']
13
13
 
14
14
  spec.summary = 'Datadog tracing code for your Ruby applications'
15
- spec.description = <<-EOS
16
- ddtrace is Datadog’s tracing client for Ruby. It is used to trace requests
17
- as they flow across web servers, databases and microservices so that developers
18
- have great visiblity into bottlenecks and troublesome requests.
19
- EOS
15
+ spec.description = <<-EOS.gsub(/^[\s]+/, '')
16
+ ddtrace is Datadog’s tracing client for Ruby. It is used to trace requests
17
+ as they flow across web servers, databases and microservices so that developers
18
+ have great visiblity into bottlenecks and troublesome requests.
19
+ EOS
20
20
 
21
21
  spec.homepage = 'https://github.com/DataDog/dd-trace-rb'
22
22
  spec.license = 'BSD-3-Clause'
@@ -34,7 +34,7 @@ EOS
34
34
 
35
35
  spec.add_dependency 'msgpack'
36
36
 
37
- spec.add_development_dependency 'rake', '~> 10.5'
37
+ spec.add_development_dependency 'rake', '>= 10.5'
38
38
  spec.add_development_dependency 'rubocop', '= 0.49.1' if RUBY_VERSION >= '2.1.0'
39
39
  spec.add_development_dependency 'rspec', '~> 3.0'
40
40
  spec.add_development_dependency 'rspec-collection_matchers', '~> 1.1'