traceview 3.4.1 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +8 -18
- data/gemfiles/delayed_job.gemfile +1 -1
- data/gemfiles/frameworks.gemfile +1 -1
- data/gemfiles/libraries.gemfile +1 -1
- data/gemfiles/rails32.gemfile +1 -1
- data/gemfiles/rails42.gemfile +1 -1
- data/lib/traceview/base.rb +1 -1
- data/lib/traceview/version.rb +1 -1
- data/test/instrumentation/rest-client_test.rb +34 -36
- data/test/servers/rackapp_8101.rb +11 -3
- data/test/support/auto_tracing_test.rb +10 -0
- data/traceview.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3d357444f67c44151415cc11102caeb7ba583bb
|
4
|
+
data.tar.gz: de197ddc6816f8cc9e92aca0cf830c7d5fd917bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b1e49a8be926b89fc5017d7702e815a5c74d37275f9803280596716f9fc4c730038edea85992cc58e7875d496b7ae0cfbe2f8ca10ee9af51e65ccdaf8ef169f
|
7
|
+
data.tar.gz: e82c11d3a9e64ee2d475b5fb144081047508c0b7a1d29c6dd823d22a1b56ffb8ab1e89267a1e232d83a46a316c7d2d969dfa4baa6ed939a6f46c20cf31837637
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,18 @@ https://github.com/appneta/oboe-ruby/releases
|
|
4
4
|
|
5
5
|
Dates in this file are in the format MM/DD/YYYY.
|
6
6
|
|
7
|
+
# traceview 3.4.2
|
8
|
+
|
9
|
+
This patch release includes the following fixes:
|
10
|
+
|
11
|
+
* bson dependency breaks Ruby 1.8.7 install: #158
|
12
|
+
* Resque worker automatic tracing: #157
|
13
|
+
|
14
|
+
Pushed to Rubygems:
|
15
|
+
|
16
|
+
https://rubygems.org/gems/traceview/versions/3.4.2
|
17
|
+
https://rubygems.org/gems/traceview/versions/3.4.2-java
|
18
|
+
|
7
19
|
# traceview 3.4.1
|
8
20
|
|
9
21
|
This patch release includes the following fixes:
|
data/README.md
CHANGED
@@ -150,9 +150,11 @@ You can send deploy notifications to TraceView and have the events show up on yo
|
|
150
150
|
|
151
151
|
# Custom Tracing
|
152
152
|
|
153
|
+
You can add even more visibility into any part of your application or scripts by adding custom instrumentation. If you want to see the performance of an existing method see Method Profiling. To trace blocks of code see the Tracing API.
|
154
|
+
|
153
155
|
## The Tracing API
|
154
156
|
|
155
|
-
You can instrument any arbitrary block of code using `TraceView::API.trace
|
157
|
+
You can instrument any arbitrary block of code using `TraceView::API.trace`. The code and any supported calls for libraries that we support, will automatically get traced and reported to your dashboard.
|
156
158
|
|
157
159
|
```ruby
|
158
160
|
# layer_name will show up in the TraceView app dashboard
|
@@ -181,27 +183,15 @@ Find more details in the [RubyDoc page](http://rdoc.info/gems/traceview/TraceVie
|
|
181
183
|
|
182
184
|
## Tracing Methods
|
183
185
|
|
184
|
-
|
186
|
+
With TraceView, you can profile any method in your application or even in the Ruby language using `TraceView::API.profile_method`.
|
185
187
|
|
186
|
-
|
188
|
+
If, for example, you wanted to see the performance for the `Array::sort`, you could simply call the following in your startup code:
|
187
189
|
|
188
|
-
```
|
189
|
-
|
190
|
-
# It identifies this custom trace in your dashboard.
|
191
|
-
#
|
192
|
-
class Engine
|
193
|
-
def processor()
|
194
|
-
# body of method
|
195
|
-
end
|
196
|
-
|
197
|
-
include TraceViewMethodProfiling
|
198
|
-
|
199
|
-
# call syntax: profile_method <method>, <profile_name>
|
200
|
-
profile_method :processor, 'processor'
|
201
|
-
end
|
190
|
+
```
|
191
|
+
TraceView::API.profile_method(Array, :sort)
|
202
192
|
```
|
203
193
|
|
204
|
-
|
194
|
+
For full documentation, options and reporting custom KVs, see our documentation on [method profiling](http://docs.appneta.com/ruby#profiling-ruby-methods).
|
205
195
|
|
206
196
|
# Support
|
207
197
|
|
data/gemfiles/frameworks.gemfile
CHANGED
data/gemfiles/libraries.gemfile
CHANGED
data/gemfiles/rails32.gemfile
CHANGED
data/gemfiles/rails42.gemfile
CHANGED
data/lib/traceview/base.rb
CHANGED
data/lib/traceview/version.rb
CHANGED
@@ -191,16 +191,14 @@ if RUBY_VERSION >= '1.9.3'
|
|
191
191
|
response = nil
|
192
192
|
|
193
193
|
TraceView::API.start_trace('rest_client_test') do
|
194
|
-
resource = RestClient::Resource.new 'http://
|
194
|
+
resource = RestClient::Resource.new 'http://127.0.0.1:8101/redirectme?redirect_test'
|
195
195
|
response = resource.get
|
196
196
|
end
|
197
197
|
|
198
198
|
traces = get_all_traces
|
199
|
-
traces.count.must_equal
|
199
|
+
traces.count.must_equal 18
|
200
200
|
|
201
|
-
|
202
|
-
# stack instead so we can validate cross-app traces.
|
203
|
-
# valid_edges?(traces).must_equal true
|
201
|
+
valid_edges?(traces).must_equal true
|
204
202
|
validate_outer_layers(traces, 'rest_client_test')
|
205
203
|
|
206
204
|
traces[1]['Layer'].must_equal 'rest-client'
|
@@ -209,43 +207,43 @@ if RUBY_VERSION >= '1.9.3'
|
|
209
207
|
traces[2]['Layer'].must_equal 'net-http'
|
210
208
|
traces[2]['Label'].must_equal 'entry'
|
211
209
|
|
212
|
-
traces[
|
213
|
-
traces[
|
214
|
-
traces[
|
215
|
-
traces[
|
216
|
-
traces[
|
217
|
-
traces[
|
218
|
-
traces[
|
219
|
-
traces[
|
220
|
-
traces[
|
210
|
+
traces[6]['Layer'].must_equal 'net-http'
|
211
|
+
traces[6]['Label'].must_equal 'info'
|
212
|
+
traces[6]['IsService'].must_equal 1
|
213
|
+
traces[6]['RemoteProtocol'].must_equal 'HTTP'
|
214
|
+
traces[6]['RemoteHost'].must_equal '127.0.0.1:8101'
|
215
|
+
traces[6]['ServiceArg'].must_equal '/redirectme?redirect_test'
|
216
|
+
traces[6]['HTTPMethod'].must_equal 'GET'
|
217
|
+
traces[6]['HTTPStatus'].must_equal "301"
|
218
|
+
traces[6].key?('Backtrace').must_equal TraceView::Config[:nethttp][:collect_backtraces]
|
219
|
+
|
220
|
+
traces[7]['Layer'].must_equal 'net-http'
|
221
|
+
traces[7]['Label'].must_equal 'exit'
|
221
222
|
|
222
|
-
traces[
|
223
|
-
traces[
|
223
|
+
traces[8]['Layer'].must_equal 'rest-client'
|
224
|
+
traces[8]['Label'].must_equal 'entry'
|
224
225
|
|
225
|
-
traces[
|
226
|
-
traces[
|
226
|
+
traces[9]['Layer'].must_equal 'net-http'
|
227
|
+
traces[9]['Label'].must_equal 'entry'
|
227
228
|
|
228
|
-
traces[
|
229
|
-
traces[
|
229
|
+
traces[13]['Layer'].must_equal 'net-http'
|
230
|
+
traces[13]['Label'].must_equal 'info'
|
231
|
+
traces[13]['IsService'].must_equal 1
|
232
|
+
traces[13]['RemoteProtocol'].must_equal 'HTTP'
|
233
|
+
traces[13]['RemoteHost'].must_equal '127.0.0.1:8101'
|
234
|
+
traces[13]['ServiceArg'].must_equal '/'
|
235
|
+
traces[13]['HTTPMethod'].must_equal 'GET'
|
236
|
+
traces[13]['HTTPStatus'].must_equal "200"
|
237
|
+
traces[13].key?('Backtrace').must_equal TraceView::Config[:nethttp][:collect_backtraces]
|
230
238
|
|
231
|
-
traces[
|
232
|
-
traces[
|
233
|
-
traces[7]['IsService'].must_equal 1
|
234
|
-
traces[7]['RemoteProtocol'].must_equal 'HTTP'
|
235
|
-
traces[7]['RemoteHost'].must_equal 'www.appneta.com'
|
236
|
-
traces[7]['ServiceArg'].must_equal '/products/traceview/?a=1'
|
237
|
-
traces[7]['HTTPMethod'].must_equal 'GET'
|
238
|
-
traces[7]['HTTPStatus'].must_equal "200"
|
239
|
-
traces[7].key?('Backtrace').must_equal TraceView::Config[:nethttp][:collect_backtraces]
|
240
|
-
|
241
|
-
traces[8]['Layer'].must_equal 'net-http'
|
242
|
-
traces[8]['Label'].must_equal 'exit'
|
239
|
+
traces[14]['Layer'].must_equal 'net-http'
|
240
|
+
traces[14]['Label'].must_equal 'exit'
|
243
241
|
|
244
|
-
traces[
|
245
|
-
traces[
|
242
|
+
traces[15]['Layer'].must_equal 'rest-client'
|
243
|
+
traces[15]['Label'].must_equal 'exit'
|
246
244
|
|
247
|
-
traces[
|
248
|
-
traces[
|
245
|
+
traces[16]['Layer'].must_equal 'rest-client'
|
246
|
+
traces[16]['Label'].must_equal 'exit'
|
249
247
|
end
|
250
248
|
|
251
249
|
it 'should trace and capture raised exceptions' do
|
@@ -9,9 +9,17 @@ TraceView.logger.info "[traceview/info] Starting background utility rack app on
|
|
9
9
|
Thread.new do
|
10
10
|
app = Rack::Builder.new {
|
11
11
|
use TraceView::Rack
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
map "/" do
|
13
|
+
run Proc.new { |env|
|
14
|
+
[200, {"Content-Type" => "text/html"}, ['Hello TraceView!']]
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
map "/redirectme" do
|
19
|
+
run Proc.new { |env|
|
20
|
+
[301, {"Location" => "/", "Content-Type" => "text/html"}, ['']]
|
21
|
+
}
|
22
|
+
end
|
15
23
|
}
|
16
24
|
|
17
25
|
Rack::Handler::Puma.run(app, {:Host => '127.0.0.1', :Port => 8101})
|
@@ -15,11 +15,13 @@ class AutoTraceTest < Minitest::Test
|
|
15
15
|
def test_entry_layers
|
16
16
|
TraceView.entry_layer?('delayed_job-worker').must_equal true
|
17
17
|
TraceView.entry_layer?('sidekiq-worker').must_equal true
|
18
|
+
TraceView.entry_layer?('resque-worker').must_equal true
|
18
19
|
TraceView.entry_layer?('asdf-worker').must_equal false
|
19
20
|
end
|
20
21
|
|
21
22
|
def test_entry_layers_supports_symbols
|
22
23
|
TraceView.entry_layer?(:'delayed_job-worker').must_equal true
|
24
|
+
TraceView.entry_layer?(:'resque-worker').must_equal true
|
23
25
|
TraceView.entry_layer?(:asdfworker).must_equal false
|
24
26
|
end
|
25
27
|
|
@@ -39,6 +41,14 @@ class AutoTraceTest < Minitest::Test
|
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
44
|
+
def test_trace_when_default_tm_resque
|
45
|
+
TraceView::Config[:tracing_mode] = :through
|
46
|
+
|
47
|
+
TV::API.start_trace('resque-worker') do
|
48
|
+
TraceView.tracing?.must_equal true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
42
52
|
def test_dont_trace_when_never
|
43
53
|
TraceView::Config[:tracing_mode] = :never
|
44
54
|
|
data/traceview.gemspec
CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.extensions = ['ext/oboe_metal/extconf.rb'] unless defined?(JRUBY_VERSION)
|
23
23
|
|
24
24
|
s.add_runtime_dependency('json', '>= 0')
|
25
|
-
s.add_runtime_dependency('bson', '< 4.0')
|
26
25
|
|
27
26
|
# Development dependencies used in gem development & testing
|
28
27
|
s.add_development_dependency('rake', '>= 0.9.0')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traceview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Giacomo Lombardo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -25,20 +25,6 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: bson
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - "<"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '4.0'
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - "<"
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '4.0'
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: rake
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|