ddtrace 0.35.0 → 0.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +3 -1
  3. data/.gitignore +2 -0
  4. data/.gitlab-ci.yml +26 -0
  5. data/.rubocop.yml +4 -0
  6. data/Appraisals +23 -6
  7. data/CHANGELOG.md +116 -1
  8. data/Rakefile +43 -12
  9. data/ddtrace.gemspec +5 -0
  10. data/docker-compose.yml +37 -2
  11. data/docs/GettingStarted.md +63 -34
  12. data/lib/ddtrace.rb +2 -0
  13. data/lib/ddtrace/configuration/base.rb +1 -1
  14. data/lib/ddtrace/configuration/components.rb +2 -2
  15. data/lib/ddtrace/configuration/options.rb +1 -1
  16. data/lib/ddtrace/configuration/pin_setup.rb +3 -2
  17. data/lib/ddtrace/configuration/settings.rb +18 -0
  18. data/lib/ddtrace/contrib/active_support/cache/redis.rb +1 -1
  19. data/lib/ddtrace/contrib/active_support/notifications/event.rb +3 -1
  20. data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +1 -1
  21. data/lib/ddtrace/contrib/concurrent_ruby/context_composite_executor_service.rb +9 -3
  22. data/lib/ddtrace/contrib/configuration/settings.rb +19 -1
  23. data/lib/ddtrace/contrib/dalli/patcher.rb +1 -5
  24. data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -2
  25. data/lib/ddtrace/contrib/extensions.rb +38 -4
  26. data/lib/ddtrace/contrib/faraday/middleware.rb +5 -3
  27. data/lib/ddtrace/contrib/faraday/patcher.rb +4 -5
  28. data/lib/ddtrace/contrib/grape/patcher.rb +1 -1
  29. data/lib/ddtrace/contrib/graphql/patcher.rb +6 -3
  30. data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +1 -1
  31. data/lib/ddtrace/contrib/grpc/datadog_interceptor/client.rb +1 -3
  32. data/lib/ddtrace/contrib/grpc/patcher.rb +1 -5
  33. data/lib/ddtrace/contrib/http/circuit_breaker.rb +8 -32
  34. data/lib/ddtrace/contrib/http/instrumentation.rb +13 -8
  35. data/lib/ddtrace/contrib/httprb/configuration/settings.rb +27 -0
  36. data/lib/ddtrace/contrib/httprb/ext.rb +14 -0
  37. data/lib/ddtrace/contrib/httprb/instrumentation.rb +163 -0
  38. data/lib/ddtrace/contrib/httprb/integration.rb +43 -0
  39. data/lib/ddtrace/contrib/httprb/patcher.rb +35 -0
  40. data/lib/ddtrace/contrib/kafka/configuration/settings.rb +25 -0
  41. data/lib/ddtrace/contrib/kafka/consumer_event.rb +14 -0
  42. data/lib/ddtrace/contrib/kafka/consumer_group_event.rb +14 -0
  43. data/lib/ddtrace/contrib/kafka/event.rb +51 -0
  44. data/lib/ddtrace/contrib/kafka/events.rb +44 -0
  45. data/lib/ddtrace/contrib/kafka/events/connection/request.rb +34 -0
  46. data/lib/ddtrace/contrib/kafka/events/consumer/process_batch.rb +41 -0
  47. data/lib/ddtrace/contrib/kafka/events/consumer/process_message.rb +39 -0
  48. data/lib/ddtrace/contrib/kafka/events/consumer_group/heartbeat.rb +39 -0
  49. data/lib/ddtrace/contrib/kafka/events/consumer_group/join_group.rb +29 -0
  50. data/lib/ddtrace/contrib/kafka/events/consumer_group/leave_group.rb +29 -0
  51. data/lib/ddtrace/contrib/kafka/events/consumer_group/sync_group.rb +29 -0
  52. data/lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb +32 -0
  53. data/lib/ddtrace/contrib/kafka/events/producer/deliver_messages.rb +35 -0
  54. data/lib/ddtrace/contrib/kafka/ext.rb +38 -0
  55. data/lib/ddtrace/contrib/kafka/integration.rb +39 -0
  56. data/lib/ddtrace/contrib/kafka/patcher.rb +26 -0
  57. data/lib/ddtrace/contrib/mongodb/instrumentation.rb +1 -2
  58. data/lib/ddtrace/contrib/mysql2/instrumentation.rb +1 -1
  59. data/lib/ddtrace/contrib/patcher.rb +14 -8
  60. data/lib/ddtrace/contrib/rack/middlewares.rb +15 -12
  61. data/lib/ddtrace/contrib/rails/configuration/settings.rb +13 -11
  62. data/lib/ddtrace/contrib/rails/framework.rb +52 -46
  63. data/lib/ddtrace/contrib/rails/integration.rb +1 -1
  64. data/lib/ddtrace/contrib/redis/patcher.rb +1 -1
  65. data/lib/ddtrace/contrib/rest_client/request_patch.rb +2 -2
  66. data/lib/ddtrace/contrib/sequel/database.rb +1 -1
  67. data/lib/ddtrace/contrib/sidekiq/ext.rb +1 -0
  68. data/lib/ddtrace/contrib/sidekiq/patcher.rb +8 -1
  69. data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +1 -0
  70. data/lib/ddtrace/contrib/sucker_punch/patcher.rb +1 -1
  71. data/lib/ddtrace/diagnostics/environment_logger.rb +278 -0
  72. data/lib/ddtrace/environment.rb +5 -1
  73. data/lib/ddtrace/ext/diagnostics.rb +2 -0
  74. data/lib/ddtrace/ext/environment.rb +2 -0
  75. data/lib/ddtrace/pin.rb +39 -15
  76. data/lib/ddtrace/pipeline/span_filter.rb +15 -15
  77. data/lib/ddtrace/sampler.rb +2 -0
  78. data/lib/ddtrace/span.rb +10 -0
  79. data/lib/ddtrace/tracer.rb +15 -8
  80. data/lib/ddtrace/transport/http/adapters/net.rb +8 -0
  81. data/lib/ddtrace/transport/http/adapters/test.rb +4 -0
  82. data/lib/ddtrace/transport/http/adapters/unix_socket.rb +4 -0
  83. data/lib/ddtrace/transport/response.rb +11 -0
  84. data/lib/ddtrace/version.rb +1 -1
  85. data/lib/ddtrace/workers/trace_writer.rb +3 -0
  86. data/lib/ddtrace/writer.rb +33 -12
  87. metadata +98 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21f4247167d50bf629af437139a08b0b07ce84f66d4a1c273b327bd3a909510c
4
- data.tar.gz: 0a71268b253fdfea93c6ecb749edd4758e99e25728a48f777832780d7c915ea6
3
+ metadata.gz: 88a2890ed343b6cfef9752a3bbeb34c4a670a86755c66f99d625fe10f9172f5f
4
+ data.tar.gz: e77520aa45dad85b0a8198233dd7e1bc485db11e8d478eb606401aaa9e17f2f9
5
5
  SHA512:
6
- metadata.gz: a38ea403030ed7405b11401b7ff7b81cbd7669bfe5aac582e03c57da96c81f5294dd7b073107441400f506135590e246dffebdb0b169abfc0da2f0d275e6d47e
7
- data.tar.gz: d33fa196c75876d526c79dbd041ea31c367e0084588f740ed6322fe38bc716dae9d97e50c2b981f5437774716767bc7cae461f5bfe21911571e8f6596a501a9b
6
+ metadata.gz: af5e2a13d1960b68d4b4d9c39661052898ce7636eef5866447ee67cb23d2f9e4a4d98aed3be403780a5d31c7c7a588cc7821dcf8b161679e211a6d315932f1bf
7
+ data.tar.gz: f0dc91d291576bec7a7b5ed7e494a09d2a976acfe7aa38999d2c8be893117757925253192f83f70317a8f60eee3d7fcc122aa8c33867409db5ade6b94f9148f4
@@ -54,7 +54,9 @@ step_rubocop: &step_rubocop
54
54
  step_appraisal_install: &step_appraisal_install
55
55
  run:
56
56
  name: Install Appraisal gems
57
- command: bundle exec appraisal install
57
+ command: |
58
+ bundle exec appraisal clean # Ensure we fetch the latest version of dependencies
59
+ bundle exec appraisal install
58
60
  step_compute_bundle_checksum: &step_compute_bundle_checksum
59
61
  run:
60
62
  name: Compute bundle checksum
data/.gitignore CHANGED
@@ -50,6 +50,8 @@ build-iPhoneSimulator/
50
50
 
51
51
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
52
52
  .rvmrc
53
+ # Ignore local variables
54
+ .envrc
53
55
 
54
56
  # lock files
55
57
  Gemfile.lock
@@ -0,0 +1,26 @@
1
+ stages:
2
+ - deploy
3
+
4
+ variables:
5
+ INDEX_FILE: index.txt
6
+
7
+ .common: &common
8
+ tags: [ "runner:main", "size:large" ]
9
+
10
+ copy_to_s3:
11
+ <<: *common
12
+ stage: deploy
13
+ image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
14
+ rules:
15
+ - if: '$CI_COMMIT_BRANCH == "master"'
16
+ when: on_success
17
+ - when: manual
18
+ script:
19
+ - export ACCESS_KEY_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-rb.secret_key_id --with-decryption --query "Parameter.Value" --out text)
20
+ - export SECRET_ACCESS_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-rb.secret_sec_key_id --with-decryption --query "Parameter.Value" --out text)
21
+ - export AWS_ACCESS_KEY_ID=$ACCESS_KEY_ID
22
+ - export AWS_SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY
23
+ - echo $CI_COMMIT_REF_NAME >> $INDEX_FILE
24
+ - echo $CI_COMMIT_SHA >> $INDEX_FILE
25
+ - echo $GITLAB_USER_NAME >> $INDEX_FILE
26
+ - aws s3 cp $INDEX_FILE s3://datadog-reliability-env/ruby/$INDEX_FILE
@@ -67,6 +67,10 @@ Metrics/PerceivedComplexity:
67
67
  Lint/UnusedMethodArgument:
68
68
  Enabled: false
69
69
 
70
+ # alias and alias_method are not equivalent
71
+ Style/Alias:
72
+ Enabled: false
73
+
70
74
  # Disabling advices that would lead to incompatible Ruby 1.9 code
71
75
  Style/SymbolArray:
72
76
  Enabled: false
data/Appraisals CHANGED
@@ -73,6 +73,7 @@ elsif Gem::Version.new('2.0.0') <= Gem::Version.new(RUBY_VERSION) \
73
73
  gem 'ethon'
74
74
  gem 'excon'
75
75
  gem 'hiredis'
76
+ gem 'http'
76
77
  gem 'mongo', '< 2.5'
77
78
  gem 'mysql2', '0.3.21', platform: :ruby
78
79
  gem 'rack', '1.4.7'
@@ -184,6 +185,7 @@ elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
184
185
  gem 'ethon'
185
186
  gem 'excon'
186
187
  gem 'hiredis'
188
+ gem 'http'
187
189
  gem 'mongo', '< 2.5'
188
190
  gem 'mysql2', '0.3.21', platform: :ruby
189
191
  gem 'rack', '1.4.7'
@@ -193,6 +195,7 @@ elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
193
195
  gem 'redis', '< 4.0'
194
196
  gem 'rest-client'
195
197
  gem 'resque', '< 2.0'
198
+ gem 'ruby-kafka', '>= 0.7.10'
196
199
  gem 'sequel', '~> 4.0', '< 4.37'
197
200
  gem 'shoryuken'
198
201
  gem 'sidekiq', '~> 3.5.4'
@@ -292,33 +295,33 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
292
295
  end
293
296
 
294
297
  appraise 'rails5-mysql2' do
295
- gem 'rails', '~> 5.2.1', '!= 5.2.4.1', '!= 5.2.4.2'
298
+ gem 'rails', '5.2.3'
296
299
  gem 'mysql2', '< 1', platform: :ruby
297
300
  gem 'sprockets', '< 4'
298
301
  end
299
302
 
300
303
  appraise 'rails5-postgres' do
301
- gem 'rails', '~> 5.2.1', '!= 5.2.4.1', '!= 5.2.4.2'
304
+ gem 'rails', '5.2.3'
302
305
  gem 'pg', '< 1.0', platform: :ruby
303
306
  gem 'sprockets', '< 4'
304
307
  end
305
308
 
306
309
  appraise 'rails5-postgres-redis' do
307
- gem 'rails', '~> 5.2.1', '!= 5.2.4.1', '!= 5.2.4.2'
310
+ gem 'rails', '5.2.3'
308
311
  gem 'pg', '< 1.0', platform: :ruby
309
312
  gem 'redis', '>= 4.0.1'
310
313
  gem 'sprockets', '< 4'
311
314
  end
312
315
 
313
316
  appraise 'rails5-postgres-redis-activesupport' do
314
- gem 'rails', '~> 5.2.1', '!= 5.2.4.1', '!= 5.2.4.2'
317
+ gem 'rails', '5.2.3'
315
318
  gem 'pg', '< 1.0', platform: :ruby
316
319
  gem 'redis', '>= 4.0.1'
317
320
  gem 'sprockets', '< 4'
318
321
  end
319
322
 
320
323
  appraise 'rails5-postgres-sidekiq' do
321
- gem 'rails', '~> 5.2.1', '!= 5.2.4.1', '!= 5.2.4.2'
324
+ gem 'rails', '5.2.3'
322
325
  gem 'pg', '< 1.0', platform: :ruby
323
326
  gem 'sidekiq'
324
327
  gem 'activejob'
@@ -342,8 +345,9 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
342
345
  gem 'faraday'
343
346
  gem 'grape'
344
347
  gem 'graphql', '< 1.9.4'
345
- gem 'grpc'
348
+ gem 'grpc', '~> 1.21.0' # Last version to support Ruby < 2.3
346
349
  gem 'hiredis'
350
+ gem 'http'
347
351
  gem 'mongo', '>= 2.8.0'
348
352
  gem 'mysql2', '< 0.5', platform: :ruby
349
353
  gem 'racecar', '>= 0.3.5'
@@ -353,6 +357,7 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
353
357
  gem 'redis', '< 4.0'
354
358
  gem 'rest-client'
355
359
  gem 'resque', '< 2.0'
360
+ gem 'ruby-kafka', '>= 0.7.10'
356
361
  gem 'sequel'
357
362
  gem 'shoryuken'
358
363
  gem 'sidekiq'
@@ -501,7 +506,9 @@ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
501
506
  gem 'grape'
502
507
  gem 'graphql'
503
508
  gem 'grpc'
509
+ gem 'google-protobuf', '~> 3.11.0' # Last version to support Ruby < 2.5
504
510
  gem 'hiredis'
511
+ gem 'http'
505
512
  gem 'mongo', '>= 2.8.0'
506
513
  gem 'mysql2', '< 0.5', platform: :ruby
507
514
  gem 'presto-client', '>= 0.5.14'
@@ -512,6 +519,7 @@ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
512
519
  gem 'redis', '< 4.0'
513
520
  gem 'rest-client'
514
521
  gem 'resque', '< 2.0'
522
+ gem 'ruby-kafka', '>= 0.7.10'
515
523
  gem 'sequel'
516
524
  gem 'shoryuken'
517
525
  gem 'sidekiq'
@@ -579,7 +587,9 @@ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION) \
579
587
  gem 'grape'
580
588
  gem 'graphql'
581
589
  gem 'grpc'
590
+ gem 'google-protobuf', '~> 3.11.0' # Last version to support Ruby < 2.5
582
591
  gem 'hiredis'
592
+ gem 'http'
583
593
  gem 'mongo', '>= 2.8.0'
584
594
  gem 'mysql2', '< 0.5', platform: :ruby
585
595
  gem 'presto-client', '>= 0.5.14'
@@ -590,6 +600,7 @@ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION) \
590
600
  gem 'redis', '< 4.0'
591
601
  gem 'rest-client'
592
602
  gem 'resque', '< 2.0'
603
+ gem 'ruby-kafka', '>= 0.7.10'
593
604
  gem 'sequel'
594
605
  gem 'shoryuken'
595
606
  gem 'sidekiq'
@@ -692,6 +703,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
692
703
  gem 'graphql'
693
704
  gem 'grpc'
694
705
  gem 'hiredis'
706
+ gem 'http'
695
707
  gem 'mongo', '>= 2.8.0'
696
708
  gem 'mysql2', '< 0.5', platform: :ruby
697
709
  gem 'presto-client', '>= 0.5.14'
@@ -702,6 +714,7 @@ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
702
714
  gem 'redis', '< 4.0'
703
715
  gem 'rest-client'
704
716
  gem 'resque', '< 2.0'
717
+ gem 'ruby-kafka', '>= 0.7.10'
705
718
  gem 'sequel'
706
719
  gem 'shoryuken'
707
720
  gem 'sidekiq'
@@ -804,6 +817,7 @@ elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION) \
804
817
  gem 'graphql'
805
818
  gem 'grpc'
806
819
  gem 'hiredis'
820
+ gem 'http'
807
821
  gem 'mongo', '>= 2.8.0'
808
822
  gem 'mysql2', '< 0.5', platform: :ruby
809
823
  gem 'presto-client', '>= 0.5.14'
@@ -814,6 +828,7 @@ elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION) \
814
828
  gem 'redis', '< 4.0'
815
829
  gem 'rest-client'
816
830
  gem 'resque', '< 2.0'
831
+ gem 'ruby-kafka', '>= 0.7.10'
817
832
  gem 'sequel'
818
833
  gem 'shoryuken'
819
834
  gem 'sidekiq'
@@ -918,6 +933,7 @@ elsif Gem::Version.new('2.7.0') <= Gem::Version.new(RUBY_VERSION)
918
933
  gem 'graphql'
919
934
  gem 'grpc'
920
935
  gem 'hiredis'
936
+ gem 'http'
921
937
  gem 'mongo', '>= 2.8.0'
922
938
  gem 'mysql2', '< 0.5', platform: :ruby
923
939
  gem 'presto-client', '>= 0.5.14'
@@ -928,6 +944,7 @@ elsif Gem::Version.new('2.7.0') <= Gem::Version.new(RUBY_VERSION)
928
944
  gem 'redis', '< 4.0'
929
945
  gem 'rest-client'
930
946
  gem 'resque', '< 2.0'
947
+ gem 'ruby-kafka', '>= 0.7.10'
931
948
  gem 'sequel'
932
949
  gem 'shoryuken'
933
950
  gem 'sidekiq'
@@ -2,6 +2,116 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.38.0] - 2020-07-13
6
+
7
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.38.0
8
+
9
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.37.0...v0.38.0
10
+
11
+ ### Added
12
+
13
+ - http.rb integration (#529, #853)
14
+ - Kafka integration (#1070) (@tjwp)
15
+ - Span#set_tags (#1081) (@DocX)
16
+ - retry_count tag for Sidekiq jobs (#1089) (@elyalvarado)
17
+ - Startup environment log (#1104, #1109)
18
+ - DD_SITE and DD_API_KEY configuration (#1107)
19
+
20
+ ### Changed
21
+
22
+ - Auto instrument Faraday default connection (#1057)
23
+ - Sidekiq client middleware is now the same for client and server (#1099) (@drcapulet)
24
+ - Single pass SpanFilter (#1071) (@tjwp)
25
+
26
+ ### Fixed
27
+
28
+ - Ensure fatal exceptions are propagated (#1100)
29
+ - Respect child_of: option in Tracer#trace (#1082) (@DocX)
30
+ - Improve Writer thread safety (#1091) (@fledman)
31
+
32
+ ### Refactored
33
+
34
+ - Improvements to test suite (#1092, #1103)
35
+
36
+ ## [0.37.0] - 2020-06-24
37
+
38
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.37.0
39
+
40
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.36.0...v0.37.0
41
+
42
+ ### Refactored
43
+
44
+ - Documentation improvements regarding Datadog Agent defaults (#1074) (@cswatt)
45
+ - Improvements to test suite (#1043, #1051, #1062, #1075, #1076, #1086)
46
+
47
+ ### Removed
48
+
49
+ - **DEPRECATION**: Deprecate Contrib::Configuration::Settings#tracer= (#1072, #1079)
50
+ - The `tracer:` option is no longer supported for integration configuration. A deprecation warning will be issued when this option is used.
51
+ - Tracer instances are dynamically created when `ddtrace` is reconfigured (through `Datadog.configure{}` calls).
52
+
53
+ A reference to a tracer instance cannot be stored as it will be replaced by a new instance during reconfiguration.
54
+
55
+ Retrieving the global tracer instance, by invoking `Datadog.tracer`, is the only safe mechanism to acquire the active tracer instance.
56
+
57
+ Allowing an integration to set its tracer instance is effectively preventing that integration from dynamically retrieving the current active tracer in the future, thus causing it to record spans in a stale tracer instance. Spans recorded in a stale tracer instance will look disconnected from their parent context.
58
+
59
+ - **BREAKING**: Remove Pin#tracer= and DeprecatedPin#tracer= (#1073)
60
+ - The `Pin` and `DeprecatedPin` are internal tools used to provide more granular configuration for integrations.
61
+ - The APIs being removed are not public nor have been externally documented. The `DeprecatedPin` specifically has been considered deprecated since 0.20.0.
62
+ - This removal is a continuation of #1079 above, thus carrying the same rationale.
63
+
64
+ ### Migration
65
+
66
+ - Remove `tracer` argument provided to integrations (e.g. `c.use :rails, tracer: ...`).
67
+ - Remove `tracer` argument provided to `Pin` or `DeprecatedPin` initializers (e.g. `Pin.new(service, tracer: ...)`).
68
+ - If you require a custom tracer instance, use a global instance configuration:
69
+ ```ruby
70
+ Datadog.configure do |c|
71
+ c.tracer.instance = custom_tracer
72
+ end
73
+ ```
74
+
75
+ ## [0.36.0] - 2020-05-27
76
+
77
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.36.0
78
+
79
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.35.2...v0.36.0
80
+
81
+ ### Changed
82
+
83
+ - Prevent trace components from being re-initialized multiple times during setup (#1037)
84
+
85
+ ### Fixed
86
+
87
+ - Allow Rails patching if Railties are loaded (#993, #1054) (@mustela, @bheemreddy181, @vramaiah)
88
+ - Pin delegates to default tracer unless configured (#1041)
89
+
90
+ ### Refactored
91
+
92
+ - Improvements to test suite (#1027, #1031, #1045, #1046, #1047)
93
+
94
+ ## [0.35.2] - 2020-05-08
95
+
96
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.35.2
97
+
98
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.35.1...v0.35.2
99
+
100
+ ### Fixed
101
+
102
+ - Internal tracer HTTP requests generating traces (#1030, #1033) (@gingerlime)
103
+ - `Datadog.configure` forcing all options to eager load (#1032, #1034) (@kelvin-acosta)
104
+
105
+ ## [0.35.1] - 2020-05-05
106
+
107
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.35.1
108
+
109
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...v0.35.1
110
+
111
+ ### Fixed
112
+
113
+ - Components#teardown! NoMethodError (#1021, #1023) (@bzf)
114
+
5
115
  ## [0.35.0] - 2020-04-29
6
116
 
7
117
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.35.0
@@ -1195,7 +1305,12 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
1195
1305
 
1196
1306
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
1197
1307
 
1198
- [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...master
1308
+ [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.38.0...master
1309
+ [0.38.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.37.0...v0.38.0
1310
+ [0.37.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.36.0...v0.37.0
1311
+ [0.36.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.2...v0.36.0
1312
+ [0.35.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.1...v0.35.2
1313
+ [0.35.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...v0.35.1
1199
1314
  [0.35.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.2...v0.35.0
1200
1315
  [0.34.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.1...v0.34.2
1201
1316
  [0.34.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.0...v0.34.1
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Dir.glob('tasks/*.rake').each { |r| import r }
11
11
  desc 'Run RSpec'
12
12
  # rubocop:disable Metrics/BlockLength
13
13
  namespace :spec do
14
- task all: [:main,
14
+ task all: [:main, :benchmark,
15
15
  :rails, :railsredis, :railsactivejob,
16
16
  :elasticsearch, :http, :redis, :sidekiq, :sinatra]
17
17
 
@@ -21,6 +21,11 @@ namespace :spec do
21
21
  t.rspec_opts = args.to_a.join(' ')
22
22
  end
23
23
 
24
+ RSpec::Core::RakeTask.new(:benchmark) do |t, args|
25
+ t.pattern = 'spec/ddtrace/benchmark/**/*_spec.rb'
26
+ t.rspec_opts = args.to_a.join(' ')
27
+ end
28
+
24
29
  RSpec::Core::RakeTask.new(:opentracer) do |t, args|
25
30
  t.pattern = 'spec/ddtrace/opentracer/**/*_spec.rb'
26
31
  t.rspec_opts = args.to_a.join(' ')
@@ -90,6 +95,8 @@ namespace :spec do
90
95
  :graphql,
91
96
  :grpc,
92
97
  :http,
98
+ :httprb,
99
+ :kafka,
93
100
  :mongodb,
94
101
  :mysql2,
95
102
  :presto,
@@ -100,10 +107,11 @@ namespace :spec do
100
107
  :resque,
101
108
  :rest_client,
102
109
  :sequel,
110
+ :shoryuken,
103
111
  :sidekiq,
104
112
  :sinatra,
105
113
  :sucker_punch,
106
- :shoryuken
114
+ :suite
107
115
  ].each do |contrib|
108
116
  RSpec::Core::RakeTask.new(contrib) do |t, args|
109
117
  t.pattern = "spec/ddtrace/contrib/#{contrib}/**/*_spec.rb"
@@ -115,7 +123,7 @@ end
115
123
  namespace :test do
116
124
  task all: [:main,
117
125
  :rails,
118
- :sidekiq, :monkey]
126
+ :monkey]
119
127
 
120
128
  Rake::TestTask.new(:main) do |t|
121
129
  t.libs << %w[test lib]
@@ -134,7 +142,6 @@ namespace :test do
134
142
 
135
143
  [
136
144
  :grape,
137
- :sidekiq,
138
145
  :sucker_punch
139
146
  ].each do |contrib|
140
147
  Rake::TestTask.new(contrib) do |t|
@@ -187,11 +194,12 @@ task :ci do
187
194
  sh 'bundle exec rake test:main'
188
195
  sh 'bundle exec rake spec:main'
189
196
  sh 'bundle exec rake spec:contrib'
197
+ # Benchmarks
198
+ sh 'bundle exec rake spec:benchmark'
190
199
 
191
200
  if RUBY_PLATFORM != 'java'
192
201
  # Contrib minitests
193
202
  sh 'bundle exec appraisal contrib-old rake test:monkey'
194
- sh 'bundle exec appraisal contrib-old rake test:sidekiq'
195
203
  sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
196
204
  # Contrib specs
197
205
  sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
@@ -206,6 +214,7 @@ task :ci do
206
214
  sh 'bundle exec appraisal contrib-old rake spec:excon'
207
215
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
208
216
  sh 'bundle exec appraisal contrib-old rake spec:http'
217
+ sh 'bundle exec appraisal contrib-old rake spec:httprb'
209
218
  sh 'bundle exec appraisal contrib-old rake spec:mongodb'
210
219
  sh 'bundle exec appraisal contrib-old rake spec:mysql2'
211
220
  sh 'bundle exec appraisal contrib-old rake spec:rack'
@@ -217,6 +226,7 @@ task :ci do
217
226
  sh 'bundle exec appraisal contrib-old rake spec:sidekiq'
218
227
  sh 'bundle exec appraisal contrib-old rake spec:sinatra'
219
228
  sh 'bundle exec appraisal contrib-old rake spec:sucker_punch'
229
+ sh 'bundle exec appraisal contrib-old rake spec:suite'
220
230
  # Rails minitests
221
231
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
222
232
  sh 'bundle exec appraisal rails30-postgres rake spec:railsdisableenv'
@@ -241,11 +251,12 @@ task :ci do
241
251
  sh 'bundle exec rake spec:main'
242
252
  sh 'bundle exec rake spec:contrib'
243
253
  sh 'bundle exec rake spec:opentracer'
254
+ # Benchmarks
255
+ sh 'bundle exec rake spec:benchmark'
244
256
 
245
257
  if RUBY_PLATFORM != 'java'
246
258
  # Contrib minitests
247
259
  sh 'bundle exec appraisal contrib-old rake test:monkey'
248
- sh 'bundle exec appraisal contrib-old rake test:sidekiq'
249
260
  sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
250
261
  # Contrib specs
251
262
  sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
@@ -260,6 +271,7 @@ task :ci do
260
271
  sh 'bundle exec appraisal contrib-old rake spec:excon'
261
272
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
262
273
  sh 'bundle exec appraisal contrib-old rake spec:http'
274
+ sh 'bundle exec appraisal contrib-old rake spec:httprb'
263
275
  sh 'bundle exec appraisal contrib-old rake spec:mongodb'
264
276
  sh 'bundle exec appraisal contrib-old rake spec:mysql2'
265
277
  sh 'bundle exec appraisal contrib-old rake spec:presto'
@@ -272,6 +284,7 @@ task :ci do
272
284
  sh 'bundle exec appraisal contrib-old rake spec:sidekiq'
273
285
  sh 'bundle exec appraisal contrib-old rake spec:sinatra'
274
286
  sh 'bundle exec appraisal contrib-old rake spec:sucker_punch'
287
+ sh 'bundle exec appraisal contrib-old rake spec:suite'
275
288
  # Rails minitests
276
289
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
277
290
  sh 'bundle exec appraisal rails30-postgres rake spec:railsdisableenv'
@@ -302,11 +315,12 @@ task :ci do
302
315
  sh 'bundle exec rake spec:main'
303
316
  sh 'bundle exec rake spec:contrib'
304
317
  sh 'bundle exec rake spec:opentracer'
318
+ # Benchmarks
319
+ sh 'bundle exec rake spec:benchmark'
305
320
 
306
321
  if RUBY_PLATFORM != 'java'
307
322
  # Contrib minitests
308
323
  sh 'bundle exec appraisal contrib rake test:grape'
309
- sh 'bundle exec appraisal contrib rake test:sidekiq'
310
324
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
311
325
  # Contrib specs
312
326
  sh 'bundle exec appraisal contrib rake spec:action_pack'
@@ -326,6 +340,7 @@ task :ci do
326
340
  sh 'bundle exec appraisal contrib rake spec:graphql'
327
341
  sh 'bundle exec appraisal contrib rake spec:grpc'
328
342
  sh 'bundle exec appraisal contrib rake spec:http'
343
+ sh 'bundle exec appraisal contrib rake spec:httprb'
329
344
  sh 'bundle exec appraisal contrib rake spec:mongodb'
330
345
  sh 'bundle exec appraisal contrib rake spec:mysql2'
331
346
  sh 'bundle exec appraisal contrib rake spec:presto'
@@ -340,6 +355,7 @@ task :ci do
340
355
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
341
356
  sh 'bundle exec appraisal contrib rake spec:sinatra'
342
357
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
358
+ sh 'bundle exec appraisal contrib rake spec:suite'
343
359
  # Rails minitests
344
360
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
345
361
  sh 'bundle exec appraisal rails30-postgres rake spec:railsdisableenv'
@@ -374,11 +390,12 @@ task :ci do
374
390
  sh 'bundle exec rake spec:main'
375
391
  sh 'bundle exec rake spec:contrib'
376
392
  sh 'bundle exec rake spec:opentracer'
393
+ # Benchmarks
394
+ sh 'bundle exec rake spec:benchmark'
377
395
 
378
396
  if RUBY_PLATFORM != 'java'
379
397
  # Contrib minitests
380
398
  sh 'bundle exec appraisal contrib rake test:grape'
381
- sh 'bundle exec appraisal contrib rake test:sidekiq'
382
399
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
383
400
  # Contrib specs
384
401
  sh 'bundle exec appraisal contrib rake spec:action_pack'
@@ -398,6 +415,7 @@ task :ci do
398
415
  sh 'bundle exec appraisal contrib rake spec:graphql'
399
416
  sh 'bundle exec appraisal contrib rake spec:grpc'
400
417
  sh 'bundle exec appraisal contrib rake spec:http'
418
+ sh 'bundle exec appraisal contrib rake spec:httprb'
401
419
  sh 'bundle exec appraisal contrib rake spec:mongodb'
402
420
  sh 'bundle exec appraisal contrib rake spec:mysql2'
403
421
  sh 'bundle exec appraisal contrib rake spec:presto'
@@ -412,6 +430,7 @@ task :ci do
412
430
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
413
431
  sh 'bundle exec appraisal contrib rake spec:sinatra'
414
432
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
433
+ sh 'bundle exec appraisal contrib rake spec:suite'
415
434
  # Contrib specs with old gem versions
416
435
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
417
436
  # Rails minitests
@@ -449,13 +468,14 @@ task :ci do
449
468
  sh 'bundle exec rake spec:contrib'
450
469
  sh 'bundle exec rake spec:opentracer'
451
470
  sh 'bundle exec rake spec:opentelemetry'
471
+ # Benchmarks
472
+ sh 'bundle exec rake spec:benchmark'
452
473
 
453
474
  if RUBY_PLATFORM != 'java'
454
475
  # Benchmarks
455
476
  sh 'bundle exec rake benchmark'
456
477
  # Contrib minitests
457
478
  sh 'bundle exec appraisal contrib rake test:grape'
458
- sh 'bundle exec appraisal contrib rake test:sidekiq'
459
479
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
460
480
  # Contrib specs
461
481
  sh 'bundle exec appraisal contrib rake spec:action_pack'
@@ -475,6 +495,7 @@ task :ci do
475
495
  sh 'bundle exec appraisal contrib rake spec:graphql'
476
496
  sh 'bundle exec appraisal contrib rake spec:grpc'
477
497
  sh 'bundle exec appraisal contrib rake spec:http'
498
+ sh 'bundle exec appraisal contrib rake spec:httprb'
478
499
  sh 'bundle exec appraisal contrib rake spec:mongodb'
479
500
  sh 'bundle exec appraisal contrib rake spec:mysql2'
480
501
  sh 'bundle exec appraisal contrib rake spec:presto'
@@ -489,6 +510,7 @@ task :ci do
489
510
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
490
511
  sh 'bundle exec appraisal contrib rake spec:sinatra'
491
512
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
513
+ sh 'bundle exec appraisal contrib rake spec:suite'
492
514
  # Contrib specs with old gem versions
493
515
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
494
516
  # Rails minitests
@@ -511,13 +533,14 @@ task :ci do
511
533
  sh 'bundle exec rake spec:contrib'
512
534
  sh 'bundle exec rake spec:opentracer'
513
535
  sh 'bundle exec rake spec:opentelemetry'
536
+ # Benchmarks
537
+ sh 'bundle exec rake spec:benchmark'
514
538
 
515
539
  if RUBY_PLATFORM != 'java'
516
540
  # Benchmarks
517
541
  sh 'bundle exec rake benchmark'
518
542
  # Contrib minitests
519
543
  sh 'bundle exec appraisal contrib rake test:grape'
520
- sh 'bundle exec appraisal contrib rake test:sidekiq'
521
544
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
522
545
  # Contrib specs
523
546
  sh 'bundle exec appraisal contrib rake spec:action_pack'
@@ -537,6 +560,7 @@ task :ci do
537
560
  sh 'bundle exec appraisal contrib rake spec:graphql'
538
561
  sh 'bundle exec appraisal contrib rake spec:grpc'
539
562
  sh 'bundle exec appraisal contrib rake spec:http'
563
+ sh 'bundle exec appraisal contrib rake spec:httprb'
540
564
  sh 'bundle exec appraisal contrib rake spec:mongodb'
541
565
  sh 'bundle exec appraisal contrib rake spec:mysql2'
542
566
  sh 'bundle exec appraisal contrib rake spec:presto'
@@ -551,6 +575,7 @@ task :ci do
551
575
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
552
576
  sh 'bundle exec appraisal contrib rake spec:sinatra'
553
577
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
578
+ sh 'bundle exec appraisal contrib rake spec:suite'
554
579
  # Contrib specs with old gem versions
555
580
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
556
581
  # Rails minitests
@@ -583,13 +608,14 @@ task :ci do
583
608
  sh 'bundle exec rake spec:contrib'
584
609
  sh 'bundle exec rake spec:opentracer'
585
610
  sh 'bundle exec rake spec:opentelemetry'
611
+ # Benchmarks
612
+ sh 'bundle exec rake spec:benchmark'
586
613
 
587
614
  if RUBY_PLATFORM != 'java'
588
615
  # Benchmarks
589
616
  sh 'bundle exec rake benchmark'
590
617
  # Contrib minitests
591
618
  sh 'bundle exec appraisal contrib rake test:grape'
592
- sh 'bundle exec appraisal contrib rake test:sidekiq'
593
619
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
594
620
  # Contrib specs
595
621
  sh 'bundle exec appraisal contrib rake spec:action_pack'
@@ -609,6 +635,7 @@ task :ci do
609
635
  sh 'bundle exec appraisal contrib rake spec:graphql'
610
636
  sh 'bundle exec appraisal contrib rake spec:grpc'
611
637
  sh 'bundle exec appraisal contrib rake spec:http'
638
+ sh 'bundle exec appraisal contrib rake spec:httprb'
612
639
  sh 'bundle exec appraisal contrib rake spec:mongodb'
613
640
  sh 'bundle exec appraisal contrib rake spec:mysql2'
614
641
  sh 'bundle exec appraisal contrib rake spec:presto'
@@ -623,6 +650,7 @@ task :ci do
623
650
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
624
651
  sh 'bundle exec appraisal contrib rake spec:sinatra'
625
652
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
653
+ sh 'bundle exec appraisal contrib rake spec:suite'
626
654
  # Contrib specs with old gem versions
627
655
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
628
656
  # Rails minitests
@@ -654,13 +682,14 @@ task :ci do
654
682
  sh 'bundle exec rake spec:contrib'
655
683
  sh 'bundle exec rake spec:opentracer'
656
684
  sh 'bundle exec rake spec:opentelemetry'
685
+ # Benchmarks
686
+ sh 'bundle exec rake spec:benchmark'
657
687
 
658
688
  if RUBY_PLATFORM != 'java'
659
689
  # Benchmarks
660
690
  sh 'bundle exec rake benchmark'
661
691
  # Contrib minitests
662
692
  sh 'bundle exec appraisal contrib rake test:grape'
663
- sh 'bundle exec appraisal contrib rake test:sidekiq'
664
693
  sh 'bundle exec appraisal contrib rake test:sucker_punch'
665
694
  # Contrib specs
666
695
  sh 'bundle exec appraisal contrib rake spec:action_pack'
@@ -680,6 +709,7 @@ task :ci do
680
709
  sh 'bundle exec appraisal contrib rake spec:graphql'
681
710
  sh 'bundle exec appraisal contrib rake spec:grpc'
682
711
  sh 'bundle exec appraisal contrib rake spec:http'
712
+ sh 'bundle exec appraisal contrib rake spec:httprb'
683
713
  sh 'bundle exec appraisal contrib rake spec:mongodb'
684
714
  sh 'bundle exec appraisal contrib rake spec:mysql2'
685
715
  sh 'bundle exec appraisal contrib rake spec:presto'
@@ -694,6 +724,7 @@ task :ci do
694
724
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
695
725
  sh 'bundle exec appraisal contrib rake spec:sinatra'
696
726
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
727
+ sh 'bundle exec appraisal contrib rake spec:suite'
697
728
  # Contrib specs with old gem versions
698
729
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
699
730
  # Rails minitests