ddtrace 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: be21d892e040ade90a13ed979fa5e6ab7e0a580b
4
- data.tar.gz: d5964cdb669c87cec23248d797104c19c065dd9e
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWNlZDk5MDNlMGM5NzgyN2Q2Y2M1NTA5MTNiMmQ5Yzk3ZGI2YzY2Mg==
5
+ data.tar.gz: !binary |-
6
+ MmE4OWFjODQ4NjI1ZDY5MzQyNWQxODg0MjhmNzczODNhOWEzZWE2Yg==
5
7
  SHA512:
6
- metadata.gz: 9afe3f5cc5bd6704d7b66a5c6a12cec4c6c66152b75ae38a96030419ef32552c826770e047e77d27b6cb2c614871971580aabe7bd8347b6a52fec57b77f2aa33
7
- data.tar.gz: 11c875488d99ec5920af2b055b2079f7e1b6a170be9bc3b162b5b5987280b2228ee70980af68071a16d1eff0faf2a67c386b461bf027ffa649f64b23f1023e71
8
+ metadata.gz: !binary |-
9
+ YjlkYjJlNjdlY2U1YTg1ZTE3ZmUwMTY0MzM5YzYzNzNlMWI4NGFkZTAzYTZi
10
+ MjJmMjNmODllNmVkNDFjYTUyOTZiMmVjZTM0MjlmZDE5YzRhOGI2NWM1MTMx
11
+ OTQyZjVmMDM2ZWM1MDY1NDNjNTdiMDY0YWU3NTYwYjViNTZiNjQ=
12
+ data.tar.gz: !binary |-
13
+ YzYwYmRlODlhY2YxY2E2NjJmOWI2N2M1MTQ4YTQzN2JhMWE2NTE5ODIwZDk1
14
+ ODNiNzk4ZTU2ZGY1ZGQyZmI3YjhkMzUyNzNjNDQyNThhZDY3YTM5MzFjMzk3
15
+ ZjNhNjkxMjk4Yjc4YTRmZWY5YjRiYTdiMTA0NDAyMTA1MDEzZDM=
@@ -165,7 +165,7 @@ To start using the middleware in your generic Rack application, add it to your `
165
165
  To modify the default middleware configuration, you can use middleware options as follows:
166
166
 
167
167
  # config.ru example
168
- use Datadog::Contrib::Rack::TraceMiddleware default_service: 'rack-stack'
168
+ use Datadog::Contrib::Rack::TraceMiddleware, default_service: 'rack-stack'
169
169
 
170
170
  app = proc do |env|
171
171
  [ 200, {'Content-Type' => 'text/plain'}, "OK" ]
@@ -209,8 +209,24 @@ module Datadog
209
209
  @buffer.set(parent)
210
210
 
211
211
  return unless parent.nil?
212
- spans = @spans
213
- @spans = []
212
+
213
+ # In general, all spans within the buffer belong to the same trace.
214
+ # But in heavily multithreaded contexts and/or when using lots of callbacks
215
+ # hooks and other non-linear programming style, one can technically
216
+ # end up in different situations. So we only extract the spans which
217
+ # are associated to the root span that just finished, and save the
218
+ # others for later.
219
+ trace_spans = []
220
+ alien_spans = []
221
+ @spans.each do |s|
222
+ if s.trace_id == span.trace_id
223
+ trace_spans << s
224
+ else
225
+ alien_spans << s
226
+ end
227
+ end
228
+ spans = trace_spans
229
+ @spans = alien_spans
214
230
  end
215
231
 
216
232
  return if spans.empty? || !span.sampled
@@ -2,7 +2,7 @@ module Datadog
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 7
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,57 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.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: 2017-05-10 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.5'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.5'
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.47'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.47'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: minitest
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -70,44 +56,48 @@ dependencies:
70
56
  name: appraisal
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - "~>"
59
+ - - ~>
74
60
  - !ruby/object:Gem::Version
75
61
  version: '2.1'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - "~>"
66
+ - - ~>
81
67
  - !ruby/object:Gem::Version
82
68
  version: '2.1'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: yard
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - "~>"
73
+ - - ~>
88
74
  - !ruby/object:Gem::Version
89
75
  version: '0.9'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - "~>"
80
+ - - ~>
95
81
  - !ruby/object:Gem::Version
96
82
  version: '0.9'
97
- description: |
98
- ddtrace is Datadog’s tracing client for Ruby. It is used to trace requests
83
+ description: ! 'ddtrace is Datadog’s tracing client for Ruby. It is used to trace
84
+ requests
85
+
99
86
  as they flow across web servers, databases and microservices so that developers
87
+
100
88
  have great visiblity into bottlenecks and troublesome requests.
89
+
90
+ '
101
91
  email:
102
92
  - dev@datadoghq.com
103
93
  executables: []
104
94
  extensions: []
105
95
  extra_rdoc_files: []
106
96
  files:
107
- - ".env"
108
- - ".gitignore"
109
- - ".rubocop.yml"
110
- - ".yardopts"
97
+ - .env
98
+ - .gitignore
99
+ - .rubocop.yml
100
+ - .yardopts
111
101
  - Appraisals
112
102
  - Gemfile
113
103
  - LICENSE
@@ -182,17 +172,17 @@ require_paths:
182
172
  - lib
183
173
  required_ruby_version: !ruby/object:Gem::Requirement
184
174
  requirements:
185
- - - ">="
175
+ - - ! '>='
186
176
  - !ruby/object:Gem::Version
187
177
  version: 1.9.1
188
178
  required_rubygems_version: !ruby/object:Gem::Requirement
189
179
  requirements:
190
- - - ">="
180
+ - - ! '>='
191
181
  - !ruby/object:Gem::Version
192
182
  version: '0'
193
183
  requirements: []
194
184
  rubyforge_project:
195
- rubygems_version: 2.6.11
185
+ rubygems_version: 2.6.10
196
186
  signing_key:
197
187
  specification_version: 4
198
188
  summary: Datadog tracing code for your Ruby applications