oboe 2.7.10.1 → 2.7.11.1

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
  SHA1:
3
- metadata.gz: e8bb2b787b9dc0d9063cbf0fa36b421d845f2d0f
4
- data.tar.gz: 3136a7df38094cead5f1c5cc9b78b90acfb6cd9f
3
+ metadata.gz: cf54d0acc797dc2e44f88be2e6b78343238a3002
4
+ data.tar.gz: 8ad6c21adbb5bbf4f2b841b17d68db0535b67f73
5
5
  SHA512:
6
- metadata.gz: 38fa91f208a17c8edc5543b0c7c87f792e5ef1631ec76924ee83b897ad88b13a2c7b7a1a55ed3ed5e5c4a2d3044ad529d1870181aac42a4b404b94784f8d4e3e
7
- data.tar.gz: 678572388e75bd7f83e0e68a7009f69cf9799054ef8c26e0d28c3a14e722874f3d51187829597a06b852ce32515d4c83d6582fe1ba6c4b1ed55a8e2a68b5d456
6
+ metadata.gz: 9c8280991451e38d92ebe98eeed3e70640a48041bf92102d28e0d14eaf4e7871c356f23150e4df197f09ff37b6e50b4621cc2ba48dd3995873d22172a8a85779
7
+ data.tar.gz: fc98cddfe8e2607804b3584c902d0feb45062546a53e57294c5fb613e4ac1b172fe52e1bb6ff6822efc631e1ada4a64486d78ce2a7d0a8670fec5563594c29e8
@@ -4,6 +4,41 @@ 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
+ # oboe 2.7.11.1
8
+
9
+ This patch release includes:
10
+
11
+ * Grape instrumentation fixes and improvements: #102
12
+ * Report Sequel and Typhoeus versions in __Init: #101
13
+
14
+ Pushed to Rubygems:
15
+
16
+ https://rubygems.org/gems/oboe/versions/2.7.11.1
17
+ https://rubygems.org/gems/oboe/versions/2.7.11.1-java
18
+
19
+ # oboe 2.7.10.1
20
+
21
+ This patch release includes:
22
+
23
+ * Add the ability to configure the do not trace list: #100
24
+
25
+ Pushed to Rubygems:
26
+
27
+ https://rubygems.org/gems/oboe/versions/2.7.10.1
28
+ https://rubygems.org/gems/oboe/versions/2.7.10.1-java
29
+
30
+ # oboe 2.7.9.6
31
+
32
+ This patch release includes:
33
+
34
+ * Better, faster, stronger Rack instrumentation: #99
35
+ * A Typhoeus instrumentation fix for cross-app tracing: #97
36
+
37
+ Pushed to Rubygems:
38
+
39
+ https://rubygems.org/gems/oboe/versions/2.7.9.6
40
+ https://rubygems.org/gems/oboe/versions/2.7.9.6-java
41
+
7
42
  # oboe 2.7.8.1
8
43
 
9
44
  This patch release includes:
@@ -12,8 +12,9 @@ module Oboe
12
12
  @@config = {}
13
13
 
14
14
  @@instrumentation = [:action_controller, :action_view, :active_record,
15
- :cassandra, :dalli, :em_http_request, :faraday, :nethttp, :memcached,
16
- :memcache, :mongo, :moped, :rack, :redis, :resque, :sequel, :typhoeus]
15
+ :cassandra, :dalli, :em_http_request, :faraday, :grape, :nethttp,
16
+ :memcached, :memcache, :mongo, :moped, :rack, :redis, :resque,
17
+ :sequel, :typhoeus]
17
18
  ##
18
19
  # Return the raw nested hash.
19
20
  #
@@ -40,6 +41,7 @@ module Oboe
40
41
  Oboe::Config[:cassandra][:collect_backtraces] = true
41
42
  Oboe::Config[:dalli][:collect_backtraces] = false
42
43
  Oboe::Config[:faraday][:collect_backtraces] = false
44
+ Oboe::Config[:grape][:collect_backtraces] = true
43
45
  Oboe::Config[:em_http_request][:collect_backtraces] = false
44
46
  Oboe::Config[:memcache][:collect_backtraces] = false
45
47
  Oboe::Config[:memcached][:collect_backtraces] = false
@@ -47,12 +47,35 @@ module Oboe
47
47
  module Middleware
48
48
  module Error
49
49
  def self.included(klass)
50
- ::Oboe::Util.method_alias(klass, :call, ::Grape::Middleware::Error)
50
+ ::Oboe::Util.method_alias(klass, :error_response, ::Grape::Middleware::Error)
51
51
  end
52
52
 
53
- def call_with_oboe(boom)
54
- Oboe::API.log_exception(nil, boom) if Oboe.tracing?
55
- call_without_oboe(boom)
53
+ def error_response_with_oboe(error = {})
54
+ status, headers, body = error_response_without_oboe(error)
55
+
56
+ if Oboe.tracing?
57
+ # Since Grape uses throw/catch and not Exceptions, we manually log
58
+ # the error here.
59
+ kvs = {}
60
+ kvs[:ErrorClass] = 'GrapeError'
61
+ kvs[:ErrorMsg] = error[:message] ? error[:message] : "No message given."
62
+ kvs[:Backtrace] = ::Oboe::API.backtrace if Oboe::Config[:grape][:collect_backtraces]
63
+
64
+ ::Oboe::API.log(nil, 'error', kvs)
65
+
66
+ # Since calls to error() are handled similar to abort in Grape. We
67
+ # manually log the rack exit here since the original code won't
68
+ # be returned to
69
+ xtrace = Oboe::API.log_end('rack', :Status => status)
70
+
71
+ if headers && Oboe::XTrace.valid?(xtrace)
72
+ unless defined?(JRUBY_VERSION) && Oboe.is_continued_trace?
73
+ headers['X-Trace'] = xtrace if headers.is_a?(Hash)
74
+ end
75
+ end
76
+ end
77
+
78
+ [status, headers, body]
56
79
  end
57
80
  end
58
81
  end
@@ -161,6 +161,7 @@ module Oboe
161
161
  platform_info['Ruby.Moped.Version'] = "Moped-#{::Moped::VERSION}" if defined?(::Moped)
162
162
  platform_info['Ruby.Redis.Version'] = "Redis-#{::Redis::VERSION}" if defined?(::Redis)
163
163
  platform_info['Ruby.Resque.Version'] = "Resque-#{::Resque::VERSION}" if defined?(::Resque)
164
+ platform_info['Ruby.Typhoeus.Version'] = "Typhoeus-#{::Typhoeus::VERSION}" if defined?(::Typhoeus::VERSION)
164
165
 
165
166
  # Special case since the Mongo 1.x driver doesn't embed the version number in the gem directly
166
167
  if ::Gem.loaded_specs.key?('mongo')
@@ -171,6 +172,7 @@ module Oboe
171
172
  platform_info['Ruby.Mysql.Version'] = Mysql::GemVersion::VERSION if defined?(Mysql::GemVersion::VERSION)
172
173
  platform_info['Ruby.PG.Version'] = PG::VERSION if defined?(PG::VERSION)
173
174
  platform_info['Ruby.Mysql2.Version'] = Mysql2::VERSION if defined?(Mysql2::VERSION)
175
+ platform_info['Ruby.Sequel.Version'] = ::Sequel::VERSION if defined?(::Sequel::VERSION)
174
176
 
175
177
  # Report the server in use (if possible)
176
178
  if defined?(::Unicorn)
@@ -8,7 +8,7 @@ module Oboe
8
8
  module Version
9
9
  MAJOR = 2
10
10
  MINOR = 7
11
- PATCH = 10
11
+ PATCH = 11
12
12
  BUILD = 1
13
13
 
14
14
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -40,6 +40,34 @@ if defined?(Oboe::Config)
40
40
  # avoid collecting and reporting query literals to TraceView.
41
41
  # Oboe::Config[:sanitize_sql] = false
42
42
 
43
+ # Do Not Trace
44
+ # These two values allow you to configure specific URL patterns to
45
+ # never be traced. By default, this is set to common static file
46
+ # extensions but you may want to customize this list for your needs.
47
+ #
48
+ # dnt_regexp and dnt_opts is passed to Regexp.new to create
49
+ # a regular expression object. That is then used to match against
50
+ # the incoming request path.
51
+ #
52
+ # The path string originates from the rack layer and is retrieved
53
+ # as follows:
54
+ #
55
+ # req = ::Rack::Request.new(env)
56
+ # path = URI.unescape(req.path)
57
+ #
58
+ # Usage:
59
+ # Oboe::Config[:dnt_regexp] = "lobster$"
60
+ # Oboe::Config[:dnt_opts] = Regexp::IGNORECASE
61
+ #
62
+ # This will ignore all requests that end with the string lobster
63
+ # regardless of case
64
+ #
65
+ # Requests with positive matches (non nil) will not be traced.
66
+ # See lib/oboe/util.rb: Oboe::Util.static_asset?
67
+ #
68
+ # Oboe::Config[:dnt_regexp] = "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|ttf|woff|svg|less)$"
69
+ # Oboe::Config[:dnt_opts] = Regexp::IGNORECASE
70
+
43
71
  #
44
72
  # Enabling/Disabling Instrumentation
45
73
  #
@@ -13,6 +13,10 @@ class GrapeSimple < Grape::API
13
13
  raise Exception.new("This should have http status code 500!")
14
14
  end
15
15
 
16
+ get "/error" do
17
+ error!("This is a error with 'error'!")
18
+ end
19
+
16
20
  get "/breakstring" do
17
21
  raise "This should have http status code 500!"
18
22
  end
@@ -12,6 +12,9 @@ if RUBY_VERSION >= '1.9.3'
12
12
 
13
13
  r = get "/json_endpoint"
14
14
 
15
+ r.status.must_equal 200
16
+ r.headers.key?('X-Trace').must_equal true
17
+
15
18
  traces = get_all_traces
16
19
  traces.count.must_equal 4
17
20
 
@@ -28,7 +31,7 @@ if RUBY_VERSION >= '1.9.3'
28
31
  r.headers['X-Trace'].must_equal traces[3]['X-Trace']
29
32
  end
30
33
 
31
- it "should trace a request with an error" do
34
+ it "should trace a request with an exception" do
32
35
  @app = GrapeSimple
33
36
 
34
37
  begin
@@ -52,5 +55,31 @@ if RUBY_VERSION >= '1.9.3'
52
55
  traces[3]['ErrorMsg'].must_equal "This should have http status code 500!"
53
56
  traces[4]['Label'].must_equal "exit"
54
57
  end
58
+
59
+ it "should trace a request with an error" do
60
+ @app = GrapeSimple
61
+
62
+ r = get "/error"
63
+
64
+ traces = get_all_traces
65
+ traces.count.must_equal 5
66
+
67
+ r.status.must_equal 500
68
+ r.headers.key?('X-Trace').must_equal true
69
+
70
+ validate_outer_layers(traces, 'rack')
71
+
72
+ traces[0]['Layer'].must_equal "rack"
73
+ traces[1]['Layer'].must_equal "grape"
74
+ traces[2]['Layer'].must_equal "grape"
75
+ traces[2].has_key?('Controller').must_equal true
76
+ traces[2].has_key?('Action').must_equal true
77
+ traces[3]['Label'].must_equal "error"
78
+ traces[3]['ErrorClass'].must_equal "GrapeError"
79
+ traces[3]['ErrorMsg'].must_equal "This is a error with 'error'!"
80
+ traces[4]['Layer'].must_equal "rack"
81
+ traces[4]['Label'].must_equal "exit"
82
+ traces[4]['Status'].must_equal "500"
83
+ end
55
84
  end
56
85
  end
@@ -23,7 +23,7 @@ describe Oboe::Config do
23
23
  instrumentation = Oboe::Config.instrumentation_list
24
24
 
25
25
  # Verify the number of individual instrumentations
26
- instrumentation.count.must_equal 17
26
+ instrumentation.count.must_equal 18
27
27
 
28
28
  Oboe::Config[:action_controller][:enabled].must_equal true
29
29
  Oboe::Config[:action_view][:enabled].must_equal true
@@ -32,6 +32,7 @@ describe Oboe::Config do
32
32
  Oboe::Config[:dalli][:enabled].must_equal true
33
33
  Oboe::Config[:em_http_request][:enabled].must_equal false
34
34
  Oboe::Config[:faraday][:enabled].must_equal true
35
+ Oboe::Config[:grape][:enabled].must_equal true
35
36
  Oboe::Config[:nethttp][:enabled].must_equal true
36
37
  Oboe::Config[:memcached][:enabled].must_equal true
37
38
  Oboe::Config[:memcache][:enabled].must_equal true
@@ -48,6 +49,7 @@ describe Oboe::Config do
48
49
  Oboe::Config[:dalli][:log_args].must_equal true
49
50
  Oboe::Config[:em_http_request][:log_args].must_equal true
50
51
  Oboe::Config[:faraday][:log_args].must_equal true
52
+ Oboe::Config[:grape][:log_args].must_equal true
51
53
  Oboe::Config[:nethttp][:log_args].must_equal true
52
54
  Oboe::Config[:memcached][:log_args].must_equal true
53
55
  Oboe::Config[:memcache][:log_args].must_equal true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oboe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.10.1
4
+ version: 2.7.11.1
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: 2015-02-02 00:00:00.000000000 Z
12
+ date: 2015-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.4.5
186
+ rubygems_version: 2.2.2
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: AppNeta TraceView performance instrumentation gem for Ruby