ddtrace 0.35.1 → 0.35.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 178723b7546b1beef31f3bec8a9baeaa487a88108bc7e29e4af2f44bc1500ed6
4
- data.tar.gz: 823361a5e7f249cf3dac93d0b5f6b534f40c3ad6c1d6256d3104d12d3f222583
3
+ metadata.gz: 9f9f3da5a5aec215ac1141352d819ad2126dc5334d2ca7c16a98a93c0853def6
4
+ data.tar.gz: d1a751907768587840896e49945413dcc7682ebb41cc149ccbacdfb34af24687
5
5
  SHA512:
6
- metadata.gz: 8a1585205668fac0e4579dad9687d8a69953ad01ad4660dfa2293d0e253db65759264a5e08c617939b71a74bd5a13854708b6fcabd7666f0c2428e68d792c546
7
- data.tar.gz: 21ec2235e47dbb0eee68358fc9d4943a7d54dcc6df2e40d1713a9af231cc8f3cd7f1665933f4d69fff231ed4ff4ba88a4f3f910eef8a667a86ae92c6d80812d1
6
+ metadata.gz: 85895df7a3bc35105d02d8eaacf669b8a8dc7bf4c9c0e6de5fecdd13a28a33f84154c203f71863501a34fa3633e9f69d93b30b898c88da28c6cd20c3d440a8df
7
+ data.tar.gz: 842367ce941fb9d572c74edd78901b4787f0bde39f37ad6de1b5e0fa18525f4166f23ede14dcc11af02fda4ad5b88fa7c4defb39a39e7afdd969063c4ad23606
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.35.2] - 2020-05-08
6
+
7
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.35.2
8
+
9
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.35.1...v0.35.2
10
+
11
+ ### Fixed
12
+
13
+ - Internal tracer HTTP requests generating traces (#1030, #1033) (@gingerlime)
14
+ - `Datadog.configure` forcing all options to eager load (#1032, #1034) (@kelvin-acosta)
15
+
5
16
  ## [0.35.1] - 2020-05-05
6
17
 
7
18
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.35.1
@@ -1205,7 +1216,8 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
1205
1216
 
1206
1217
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
1207
1218
 
1208
- [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.1...master
1219
+ [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.2...master
1220
+ [0.35.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.1...v0.35.2
1209
1221
  [0.35.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...v0.35.1
1210
1222
  [0.35.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.2...v0.35.0
1211
1223
  [0.34.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.1...v0.34.2
data/Rakefile CHANGED
@@ -100,10 +100,11 @@ namespace :spec do
100
100
  :resque,
101
101
  :rest_client,
102
102
  :sequel,
103
+ :shoryuken,
103
104
  :sidekiq,
104
105
  :sinatra,
105
106
  :sucker_punch,
106
- :shoryuken
107
+ :suite
107
108
  ].each do |contrib|
108
109
  RSpec::Core::RakeTask.new(contrib) do |t, args|
109
110
  t.pattern = "spec/ddtrace/contrib/#{contrib}/**/*_spec.rb"
@@ -217,6 +218,7 @@ task :ci do
217
218
  sh 'bundle exec appraisal contrib-old rake spec:sidekiq'
218
219
  sh 'bundle exec appraisal contrib-old rake spec:sinatra'
219
220
  sh 'bundle exec appraisal contrib-old rake spec:sucker_punch'
221
+ sh 'bundle exec appraisal contrib-old rake spec:suite'
220
222
  # Rails minitests
221
223
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
222
224
  sh 'bundle exec appraisal rails30-postgres rake spec:railsdisableenv'
@@ -272,6 +274,7 @@ task :ci do
272
274
  sh 'bundle exec appraisal contrib-old rake spec:sidekiq'
273
275
  sh 'bundle exec appraisal contrib-old rake spec:sinatra'
274
276
  sh 'bundle exec appraisal contrib-old rake spec:sucker_punch'
277
+ sh 'bundle exec appraisal contrib-old rake spec:suite'
275
278
  # Rails minitests
276
279
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
277
280
  sh 'bundle exec appraisal rails30-postgres rake spec:railsdisableenv'
@@ -340,6 +343,7 @@ task :ci do
340
343
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
341
344
  sh 'bundle exec appraisal contrib rake spec:sinatra'
342
345
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
346
+ sh 'bundle exec appraisal contrib rake spec:suite'
343
347
  # Rails minitests
344
348
  sh 'bundle exec appraisal rails30-postgres rake test:rails'
345
349
  sh 'bundle exec appraisal rails30-postgres rake spec:railsdisableenv'
@@ -412,6 +416,7 @@ task :ci do
412
416
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
413
417
  sh 'bundle exec appraisal contrib rake spec:sinatra'
414
418
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
419
+ sh 'bundle exec appraisal contrib rake spec:suite'
415
420
  # Contrib specs with old gem versions
416
421
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
417
422
  # Rails minitests
@@ -489,6 +494,7 @@ task :ci do
489
494
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
490
495
  sh 'bundle exec appraisal contrib rake spec:sinatra'
491
496
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
497
+ sh 'bundle exec appraisal contrib rake spec:suite'
492
498
  # Contrib specs with old gem versions
493
499
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
494
500
  # Rails minitests
@@ -551,6 +557,7 @@ task :ci do
551
557
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
552
558
  sh 'bundle exec appraisal contrib rake spec:sinatra'
553
559
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
560
+ sh 'bundle exec appraisal contrib rake spec:suite'
554
561
  # Contrib specs with old gem versions
555
562
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
556
563
  # Rails minitests
@@ -623,6 +630,7 @@ task :ci do
623
630
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
624
631
  sh 'bundle exec appraisal contrib rake spec:sinatra'
625
632
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
633
+ sh 'bundle exec appraisal contrib rake spec:suite'
626
634
  # Contrib specs with old gem versions
627
635
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
628
636
  # Rails minitests
@@ -694,6 +702,7 @@ task :ci do
694
702
  sh 'bundle exec appraisal contrib rake spec:sidekiq'
695
703
  sh 'bundle exec appraisal contrib rake spec:sinatra'
696
704
  sh 'bundle exec appraisal contrib rake spec:sucker_punch'
705
+ sh 'bundle exec appraisal contrib rake spec:suite'
697
706
  # Contrib specs with old gem versions
698
707
  sh 'bundle exec appraisal contrib-old rake spec:faraday'
699
708
  # Rails minitests
@@ -45,7 +45,7 @@ module Datadog
45
45
  # Instance methods for configuration
46
46
  module InstanceMethods
47
47
  def initialize(options = {})
48
- configure(options)
48
+ configure(options) unless options.empty?
49
49
  end
50
50
 
51
51
  def configure(opts = {})
@@ -80,7 +80,7 @@ module Datadog
80
80
  end
81
81
 
82
82
  def options_hash
83
- options.each_with_object({}) do |(key, _), hash|
83
+ self.class.options.merge(options).each_with_object({}) do |(key, _), hash|
84
84
  hash[key] = get_option(key)
85
85
  end
86
86
  end
@@ -16,7 +16,7 @@ module Datadog
16
16
 
17
17
  def configure(options = {})
18
18
  self.class.options.dependency_order.each do |name|
19
- self[name] = options.fetch(name, self[name])
19
+ self[name] = options[name] if options.key?(name)
20
20
  end
21
21
 
22
22
  yield(self) if block_given?
@@ -4,8 +4,8 @@ module Datadog
4
4
  # HTTP integration circuit breaker behavior
5
5
  # For avoiding recursive traces.
6
6
  module CircuitBreaker
7
- def should_skip_tracing?(req, address, port, tracer)
8
- return true if datadog_http_request?(req, address, port, tracer)
7
+ def should_skip_tracing?(request, tracer)
8
+ return true if datadog_http_request?(request)
9
9
 
10
10
  # we don't want a "shotgun" effect with two nested traces for one
11
11
  # logical get, and request is likely to call itself recursively
@@ -16,38 +16,14 @@ module Datadog
16
16
  end
17
17
 
18
18
  # We don't want to trace our own call to the API (they use net/http)
19
- # TODO: We don't want this kind of coupling with the transport.
19
+ # TODO: We don't want this kind of soft-check on HTTP requests.
20
20
  # Remove this when transport implements its own "skip tracing" mechanism.
21
- def datadog_http_request?(req, address, port, tracer)
22
- transport = tracer.writer.transport
23
-
24
- transport_hostname = nil
25
- transport_port = nil
26
-
27
- # Get settings from transport, if available.
28
- case transport
29
- when Datadog::Transport::HTTP::Client
30
- adapter = transport.current_api.adapter
31
- if adapter.is_a?(Datadog::Transport::HTTP::Adapters::Net)
32
- transport_hostname = adapter.hostname.to_s
33
- transport_port = adapter.port.to_i
34
- end
35
- end
36
-
37
- # When we know the host & port (from the URI) we use it, else (most-likely
38
- # called with a block) rely on the URL at the end.
39
- if req.respond_to?(:uri) && req.uri
40
- if req.uri.host.to_s == transport_hostname &&
41
- req.uri.port.to_i == transport_port
42
- return true
43
- end
44
- elsif address && port &&
45
- address.to_s == transport_hostname &&
46
- port.to_i == transport_port
47
- return true
21
+ def datadog_http_request?(request)
22
+ if request[Datadog::Ext::Transport::HTTP::HEADER_META_TRACER_VERSION]
23
+ true
24
+ else
25
+ false
48
26
  end
49
-
50
- false
51
27
  end
52
28
 
53
29
  def should_skip_distributed_tracing?(pin)
@@ -37,7 +37,7 @@ module Datadog
37
37
  pin = datadog_pin(request_options)
38
38
  return super(req, body, &block) unless pin && pin.tracer
39
39
 
40
- if Datadog::Contrib::HTTP.should_skip_tracing?(req, @address, @port, pin.tracer)
40
+ if Datadog::Contrib::HTTP.should_skip_tracing?(req, pin.tracer)
41
41
  return super(req, body, &block)
42
42
  end
43
43
 
@@ -6,6 +6,19 @@ module Datadog
6
6
  module Configuration
7
7
  # Custom settings for the Rails integration
8
8
  class Settings < Contrib::Configuration::Settings
9
+ def initialize(options = {})
10
+ super(options)
11
+
12
+ # NOTE: Eager load these
13
+ # Rails integration is responsible for orchestrating other integrations.
14
+ # When using environment variables, settings will not be automatically
15
+ # filled because nothing explicitly calls them. They must though, so
16
+ # integrations like ActionPack can receive the value as it should.
17
+ # Trigger these manually to force an eager load and propagate them.
18
+ analytics_enabled
19
+ analytics_sample_rate
20
+ end
21
+
9
22
  option :analytics_enabled do |o|
10
23
  o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, nil) }
11
24
  o.lazy
@@ -2,7 +2,7 @@ module Datadog
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 35
5
- PATCH = 1
5
+ PATCH = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.1
4
+ version: 0.35.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-05 00:00:00.000000000 Z
11
+ date: 2020-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -713,7 +713,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
713
713
  - !ruby/object:Gem::Version
714
714
  version: 2.0.0
715
715
  requirements: []
716
- rubygems_version: 3.1.2
716
+ rubyforge_project:
717
+ rubygems_version: 2.7.6.2
717
718
  signing_key:
718
719
  specification_version: 4
719
720
  summary: Datadog tracing code for your Ruby applications