oboe 2.6.2.0 → 2.6.3.0

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: 910571cb0ab799c3a6a2aa4ab7e3c9e4fce88032
4
- data.tar.gz: 0ae240f38177e6eaef045e4fab5acbdb94eeb375
3
+ metadata.gz: 849242c14c945d9a5687e47d042729a919a29589
4
+ data.tar.gz: 3b21c37c48ea8b1813d9268b2c0acc10de8b4a34
5
5
  SHA512:
6
- metadata.gz: 7328be6f93b8288d0ea86ca10f74f60ed7b30af07fc0e3f29faab9811fcbee3f61c3491d6618388169144575547129cf94fba948af7cc3a4599a80b4dcecb490
7
- data.tar.gz: 0ec98782356c87a08eedcabb964bf21be6536a1c29dfb5abc334e357a3f93ece4190f2da0120d93a20a1060c14e110a433fe598e02a2ba9d7e01cdbaf21f9b36
6
+ metadata.gz: cc0243bcd66501f11e95eae0401b94721881e29baabf218286a5f78b440db4426b20a8e4ea3c0b91aac3bd46452b5943c25a7d841f1a0d44e7351451793cff0c
7
+ data.tar.gz: 5ccdaa4436264e9d2775909dfc4d9a8fca1dae95ba98e112339061df7e6c6342653796110a02508237bc50d70ad26991dc6ced62e952306f68f4dcaebba7b59a
data/.gitignore CHANGED
@@ -6,4 +6,3 @@ ext/oboe_metal/Makefile
6
6
  ext/oboe_metal/mkmf.log
7
7
  ext/oboe_metal/oboe_metal.so
8
8
  ext/oboe_metal/oboe_wrap.o
9
- Gemfile.lock
@@ -1,3 +1,15 @@
1
+
2
+ # oboe 2.6.2.0 (03/24/14)
3
+
4
+ * This patch release improves webserver detection on Heroku and adds in some c extension protections. A oboe-heroku gem release will follow this release.
5
+
6
+ # oboe 2.6.1.0 (03/12/14)
7
+
8
+ This is a patch release to address "Unsupported digest algorithm (SHA256)" occurring under certain cases on Heroku. A oboe-heroku gem release will follow this release.
9
+
10
+ * Support delayed Reporter Initialization for Forking Webservers
11
+ * README syntax fixes
12
+
1
13
  # oboe 2.5.0.7 (02/13/14)
2
14
 
3
15
  * Added new Redis redis-rb gem (>= 3.0.0) instrumentation
data/Gemfile CHANGED
@@ -29,7 +29,7 @@ gem 'redis'
29
29
 
30
30
  # Instrumented Frameworks
31
31
  gem 'sinatra'
32
- gem 'padrino' unless (RUBY_VERSION =~ /^1.8/) == 0
32
+ gem 'padrino', '0.12.0' unless (RUBY_VERSION =~ /^1.8/) == 0
33
33
 
34
34
  # Import dependencies from oboe.gemspec
35
35
  gemspec :name => 'oboe'
@@ -0,0 +1,177 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ oboe (2.6.3.dev8)
5
+ json
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (3.2.17)
11
+ i18n (~> 0.6, >= 0.6.4)
12
+ multi_json (~> 1.0)
13
+ ansi (1.4.3)
14
+ appraisal (1.0.0)
15
+ bundler
16
+ rake
17
+ thor (>= 0.14.0)
18
+ archive-tar-minitar (0.5.2)
19
+ bson (1.9.2)
20
+ bson_ext (1.9.2)
21
+ bson (~> 1.9.2)
22
+ builder (3.2.2)
23
+ byebug (2.7.0)
24
+ columnize (~> 0.3)
25
+ debugger-linecache (~> 1.2)
26
+ cassandra (0.23.0)
27
+ json
28
+ rake
29
+ simple_uuid (~> 0.3)
30
+ thrift_client (~> 0.7, < 0.9)
31
+ coderay (1.1.0)
32
+ columnize (0.3.6)
33
+ dalli (2.7.0)
34
+ debugger-linecache (1.2.0)
35
+ hashie (2.0.5)
36
+ http_router (0.11.1)
37
+ rack (>= 1.0.0)
38
+ url_mount (~> 0.2.1)
39
+ i18n (0.6.9)
40
+ json (1.8.1)
41
+ linecache (0.46)
42
+ rbx-require-relative (> 0.0.4)
43
+ linecache19 (0.5.12)
44
+ ruby_core_source (>= 0.1.4)
45
+ mail (2.5.4)
46
+ mime-types (~> 1.16)
47
+ treetop (~> 1.4.8)
48
+ memcache-client (1.8.5)
49
+ method_source (0.8.2)
50
+ mime-types (1.25.1)
51
+ minitest (5.3.2)
52
+ minitest-reporters (1.0.2)
53
+ ansi
54
+ builder
55
+ minitest (>= 5.0)
56
+ powerbar
57
+ moneta (0.7.20)
58
+ mongo (1.9.2)
59
+ bson (~> 1.9.2)
60
+ mono_logger (1.1.0)
61
+ moped (1.5.2)
62
+ multi_json (1.9.2)
63
+ padrino (0.12.0)
64
+ padrino-admin (= 0.12.0)
65
+ padrino-cache (= 0.12.0)
66
+ padrino-core (= 0.12.0)
67
+ padrino-gen (= 0.12.0)
68
+ padrino-helpers (= 0.12.0)
69
+ padrino-mailer (= 0.12.0)
70
+ padrino-admin (0.12.0)
71
+ padrino-core (= 0.12.0)
72
+ padrino-helpers (= 0.12.0)
73
+ padrino-cache (0.12.0)
74
+ moneta (~> 0.7.0)
75
+ padrino-core (= 0.12.0)
76
+ padrino-helpers (= 0.12.0)
77
+ padrino-core (0.12.0)
78
+ activesupport (>= 3.1)
79
+ http_router (~> 0.11.0)
80
+ rack-protection (>= 1.5.0)
81
+ sinatra (~> 1.4.2)
82
+ thor (~> 0.17.0)
83
+ tilt (~> 1.4.1)
84
+ padrino-gen (0.12.0)
85
+ bundler (~> 1.0)
86
+ padrino-core (= 0.12.0)
87
+ padrino-helpers (0.12.0)
88
+ i18n (~> 0.6, >= 0.6.7)
89
+ padrino-core (= 0.12.0)
90
+ padrino-mailer (0.12.0)
91
+ mail (~> 2.5.3)
92
+ padrino-core (= 0.12.0)
93
+ perftools.rb (2.0.1)
94
+ polyglot (0.3.4)
95
+ powerbar (1.0.11)
96
+ ansi (~> 1.4.0)
97
+ hashie (>= 1.1.0)
98
+ pry (0.9.12.6)
99
+ coderay (~> 1.0)
100
+ method_source (~> 0.8)
101
+ slop (~> 3.4)
102
+ rack (1.5.2)
103
+ rack-protection (1.5.2)
104
+ rack
105
+ rack-test (0.6.2)
106
+ rack (>= 1.0)
107
+ rake (10.2.2)
108
+ rbx-require-relative (0.0.9)
109
+ redis (3.0.7)
110
+ redis-namespace (1.4.1)
111
+ redis (~> 3.0.4)
112
+ resque (1.25.2)
113
+ mono_logger (~> 1.0)
114
+ multi_json (~> 1.0)
115
+ redis-namespace (~> 1.3)
116
+ sinatra (>= 0.9.2)
117
+ vegas (~> 0.1.2)
118
+ ruby-debug (0.10.4)
119
+ columnize (>= 0.1)
120
+ ruby-debug-base (~> 0.10.4.0)
121
+ ruby-debug-base (0.10.4)
122
+ linecache (>= 0.3)
123
+ ruby-debug-base19 (0.11.25)
124
+ columnize (>= 0.3.1)
125
+ linecache19 (>= 0.5.11)
126
+ ruby_core_source (>= 0.1.4)
127
+ ruby-debug19 (0.11.6)
128
+ columnize (>= 0.3.1)
129
+ linecache19 (>= 0.5.11)
130
+ ruby-debug-base19 (>= 0.11.19)
131
+ ruby_core_source (0.1.5)
132
+ archive-tar-minitar (>= 0.5.2)
133
+ simple_uuid (0.4.0)
134
+ sinatra (1.4.4)
135
+ rack (~> 1.4)
136
+ rack-protection (~> 1.4)
137
+ tilt (~> 1.3, >= 1.3.4)
138
+ slop (3.5.0)
139
+ thor (0.17.0)
140
+ thrift (0.8.0)
141
+ thrift_client (0.8.4)
142
+ thrift (~> 0.8.0)
143
+ tilt (1.4.1)
144
+ treetop (1.4.15)
145
+ polyglot
146
+ polyglot (>= 0.3.1)
147
+ url_mount (0.2.1)
148
+ rack
149
+ vegas (0.1.11)
150
+ rack (>= 1.0.0)
151
+
152
+ PLATFORMS
153
+ ruby
154
+
155
+ DEPENDENCIES
156
+ appraisal
157
+ bson
158
+ bson_ext
159
+ byebug
160
+ cassandra
161
+ dalli
162
+ memcache-client
163
+ minitest
164
+ minitest-reporters
165
+ mongo
166
+ moped
167
+ oboe!
168
+ padrino (= 0.12.0)
169
+ perftools.rb
170
+ pry
171
+ rack-test
172
+ rake
173
+ redis
174
+ resque
175
+ ruby-debug
176
+ ruby-debug19
177
+ sinatra
@@ -35,8 +35,8 @@ module OboeMethodProfiling
35
35
  code = "def _oboe_profiled_#{method_name}(*args, &block)
36
36
  entry_kvs = {}
37
37
  entry_kvs['Language'] = 'ruby'
38
- entry_kvs['ProfileName'] = '#{profile_name}'
39
- entry_kvs['FunctionName'] = '#{method_name}'
38
+ entry_kvs['ProfileName'] = '#{Oboe::Util.prettify(profile_name)}'
39
+ entry_kvs['FunctionName'] = '#{Oboe::Util.prettify(method_name)}'
40
40
  entry_kvs['File'] = '#{file}'
41
41
  entry_kvs['LineNumber'] = '#{line}'
42
42
  entry_kvs['Args'] = Oboe::API.pps(*args) if #{store_args}
@@ -48,7 +48,7 @@ module OboeMethodProfiling
48
48
 
49
49
  exit_kvs = {}
50
50
  exit_kvs['Language'] = 'ruby'
51
- exit_kvs['ProfileName'] = '#{profile_name}'
51
+ exit_kvs['ProfileName'] = '#{Oboe::Util.prettify(profile_name)}'
52
52
  exit_kvs['ReturnValue'] = Oboe::API.pps(ret) if #{store_return}
53
53
 
54
54
  Oboe::Context.log(nil, 'profile_exit', exit_kvs)
@@ -60,7 +60,7 @@ module Oboe
60
60
  #
61
61
  # Returns nothing.
62
62
  def log_start(layer, xtrace, opts={})
63
- return if Oboe.never?
63
+ return if Oboe.never? or (opts.has_key?(:URL) and ::Oboe::Util.static_asset?(opts[:URL]))
64
64
 
65
65
  if xtrace
66
66
  Oboe::Context.fromString(xtrace)
@@ -68,7 +68,7 @@ module Oboe
68
68
 
69
69
  if Oboe.tracing?
70
70
  log_entry(layer, opts)
71
- elsif Oboe.sample?(opts.merge(:layer => layer, :xtrace => xtrace)) or opts.has_key?('Force')
71
+ elsif Oboe.always? and (Oboe.sample?(opts.merge(:layer => layer, :xtrace => xtrace)) or opts.has_key?('Force'))
72
72
  log_event(layer, 'entry', Oboe::Context.startTrace, opts)
73
73
  end
74
74
  end
@@ -17,7 +17,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
17
17
  def render_partial
18
18
  entry_kvs = {}
19
19
  begin
20
- name = @options[:partial].to_s if @options.is_a?(Hash)
20
+ name = Oboe::Util.prettify(@options[:partial]) if @options.is_a?(Hash)
21
21
  entry_kvs[:FunctionName] = :render_partial
22
22
  entry_kvs[:Class] = :PartialRenderer
23
23
  entry_kvs[:Module] = :ActionView
@@ -35,7 +35,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
35
35
  def render_collection
36
36
  entry_kvs = {}
37
37
  begin
38
- name = @path.to_s
38
+ name = Oboe::Util.prettify(@path)
39
39
  entry_kvs[:FunctionName] = :render_collection
40
40
  entry_kvs[:Class] = :PartialRenderer
41
41
  entry_kvs[:Module] = :ActionView
@@ -13,7 +13,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
13
13
  if options.has_key?(:partial) and options[:partial].is_a?(String)
14
14
  entry_kvs = {}
15
15
  begin
16
- name = options[:partial].to_s if options.is_a?(Hash)
16
+ name = Oboe::Util.prettify(options[:partial]) if options.is_a?(Hash)
17
17
  entry_kvs[:FunctionName] = :render_partial
18
18
  entry_kvs[:Class] = :Partials
19
19
  entry_kvs[:Module] = :ActionView
@@ -10,7 +10,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
10
10
  def render_partial(object = @object)
11
11
  entry_kvs = {}
12
12
  begin
13
- name = @options[:partial].to_s if @options.is_a?(Hash)
13
+ name = Oboe::Util.prettify(@options[:partial]) if @options.is_a?(Hash)
14
14
  entry_kvs[:FunctionName] = :render_partial
15
15
  entry_kvs[:Class] = :PartialRenderer
16
16
  entry_kvs[:Module] = 'ActionView::Partials'
@@ -28,7 +28,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
28
28
  def render_collection
29
29
  entry_kvs = {}
30
30
  begin
31
- name = @path
31
+ name = Oboe::Util.prettify(@path)
32
32
  entry_kvs[:FunctionName] = :render_collection
33
33
  entry_kvs[:Class] = :PartialRenderer
34
34
  entry_kvs[:Module] = 'ActionView::Partials'
@@ -11,12 +11,10 @@ module Oboe
11
11
  @app = app
12
12
  end
13
13
 
14
- def collect(env)
14
+ def collect(req, env)
15
15
  report_kvs = {}
16
16
 
17
17
  begin
18
- req = ::Rack::Request.new(env)
19
-
20
18
  if Oboe.always?
21
19
  # Only report these KVs under tracing_mode 'always' (never for 'through')
22
20
  report_kvs[:SampleRate] = Oboe.sample_rate
@@ -53,7 +51,11 @@ module Oboe
53
51
  end
54
52
 
55
53
  def call(env)
54
+ req = ::Rack::Request.new(env)
55
+
56
56
  report_kvs = {}
57
+ report_kvs[:URL] = URI.unescape(req.path)
58
+
57
59
  xtrace = env.is_a?(Hash) ? env['HTTP_X_TRACE'] : nil
58
60
 
59
61
  result, xtrace = Oboe::API.start_trace('rack', xtrace, report_kvs) do
@@ -61,7 +63,7 @@ module Oboe
61
63
  status, headers, response = @app.call(env)
62
64
 
63
65
  if Oboe.tracing?
64
- report_kvs = collect(env)
66
+ report_kvs = collect(req, env)
65
67
  Oboe::API.log(nil, 'info', report_kvs.merge!({ :Status => status }))
66
68
  end
67
69
 
@@ -5,7 +5,7 @@ module Oboe
5
5
  module Util
6
6
  class << self
7
7
  ##
8
- # oboe_alias
8
+ # method_alias
9
9
  #
10
10
  # Centralized utility method to alias a method on an arbitrary
11
11
  # class or module.
@@ -45,7 +45,7 @@ module Oboe
45
45
  end
46
46
 
47
47
  ##
48
- # oboe_send_include
48
+ # send_include
49
49
  #
50
50
  # Centralized utility method to send a include call for an
51
51
  # arbitrary class
@@ -54,6 +54,33 @@ module Oboe
54
54
  target_cls.send(:include, cls)
55
55
  end
56
56
  end
57
+
58
+ ##
59
+ # static_asset?
60
+ #
61
+ # Given a path, this method determines whether it is a static asset or not (based
62
+ # solely on filename)
63
+ #
64
+ def static_asset?(path)
65
+ return (path =~ /\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|ttf|woff|svg|less)$/i)
66
+ end
67
+
68
+ ##
69
+ # prettify
70
+ #
71
+ # Even to my surprise, 'prettify' is a real word:
72
+ # transitive v. To make pretty or prettier, especially in a superficial or insubstantial way.
73
+ # from The American Heritage® Dictionary of the English Language, 4th Edition
74
+ #
75
+ # This method makes things 'purty' for reporting.
76
+ def prettify(x)
77
+ if (x.to_s =~ /^#</) == 0
78
+ x.class.to_s
79
+ else
80
+ x.to_s
81
+ end
82
+ end
83
+
57
84
  end
58
85
  end
59
86
  end
@@ -5,7 +5,7 @@ module Oboe
5
5
  module Version
6
6
  MAJOR = 2
7
7
  MINOR = 6
8
- PATCH = 2
8
+ PATCH = 3
9
9
  BUILD = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -78,22 +78,25 @@ module Oboe
78
78
 
79
79
  class << self
80
80
  def sample?(opts = {})
81
- # Assure defaults since SWIG enforces Strings
82
- opts[:layer] ||= ''
83
- opts[:xtrace] ||= ''
84
- opts['X-TV-Meta'] ||= ''
85
-
86
- rv = Oboe::Context.sampleRequest(opts[:layer], opts[:xtrace], opts['X-TV-Meta'])
87
-
88
- # For older liboboe that returns true/false, just return that.
89
- return rv if [TrueClass, FalseClass].include?(rv.class) or (rv == 0)
90
-
91
- # liboboe version > 1.3.1 returning a bit masked integer with SampleRate and
92
- # source embedded
93
- Oboe.sample_rate = (rv & SAMPLE_RATE_MASK)
94
- Oboe.sample_source = (rv & SAMPLE_SOURCE_MASK) >> 24
95
-
96
- rv
81
+ begin
82
+ # Assure defaults since SWIG enforces Strings
83
+ layer = opts[:layer] ? opts[:layer].strip : ''
84
+ xtrace = opts[:xtrace] ? opts[:xtrace].strip : ''
85
+ tv_meta = opts['X-TV-Meta'] ? opts['X-TV-Meta'].strip : ''
86
+
87
+ rv = Oboe::Context.sampleRequest(layer, xtrace, tv_meta)
88
+
89
+ # For older liboboe that returns true/false, just return that.
90
+ return rv if [TrueClass, FalseClass].include?(rv.class) or (rv == 0)
91
+
92
+ # liboboe version > 1.3.1 returning a bit masked integer with SampleRate and
93
+ # source embedded
94
+ Oboe.sample_rate = (rv & SAMPLE_RATE_MASK)
95
+ Oboe.sample_source = (rv & SAMPLE_SOURCE_MASK) >> 24
96
+ rescue StandardError => e
97
+ Oboe.logger.debug "[oboe/error] sample? error: #{e.inspect}"
98
+ false
99
+ end
97
100
  end
98
101
 
99
102
  def set_tracing_mode(mode)
@@ -8,6 +8,7 @@ PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
8
8
  #
9
9
 
10
10
  class SimpleDemo < Padrino::Application
11
+ set :public_folder, File.dirname(__FILE__)
11
12
  set :reload, true
12
13
  before { true }
13
14
  after { true }
@@ -37,3 +38,4 @@ end
37
38
  #
38
39
 
39
40
  Padrino.load!
41
+
@@ -3,10 +3,7 @@ require 'rack/test'
3
3
  require 'rack/lobster'
4
4
  require 'oboe/inst/rack'
5
5
 
6
- Oboe::Config[:tracing_mode] = 'always'
7
- Oboe::Config[:sample_rate] = 1e6
8
-
9
- class RackTestApp < MiniTest::Unit::TestCase
6
+ class RackTestApp < Minitest::Test
10
7
  include Rack::Test::Methods
11
8
 
12
9
  def app
@@ -51,5 +48,16 @@ class RackTestApp < MiniTest::Unit::TestCase
51
48
  assert last_response.ok?
52
49
  assert last_response['X-Trace']
53
50
  end
51
+
52
+ def test_dont_trace_static_assets
53
+ clear_all_traces
54
+
55
+ get "/assets/static_asset.png"
56
+
57
+ traces = get_all_traces
58
+ assert traces.empty?
59
+
60
+ assert last_response.status == 404
61
+ end
54
62
  end
55
63
 
@@ -7,6 +7,8 @@ ENV["RACK_ENV"] = "test"
7
7
  # not defined under Ruby 1.8.7 and 1.9.3
8
8
  RUBY_ENGINE = "ruby" unless defined?(RUBY_ENGINE)
9
9
 
10
+ Minitest::Spec.new 'pry'
11
+
10
12
  unless RUBY_VERSION =~ /^1.8/
11
13
  MiniTest::Reporters.use! MiniTest::Reporters::SpecReporter.new
12
14
  end
@@ -6,7 +6,7 @@ require 'oboe/inst/rack'
6
6
  Oboe::Config[:tracing_mode] = 'always'
7
7
  Oboe::Config[:sample_rate] = 1e6
8
8
 
9
- class RackTestApp < MiniTest::Unit::TestCase
9
+ class RackTestApp < Minitest::Test
10
10
  include Rack::Test::Methods
11
11
 
12
12
  def app
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.6.2.0
4
+ version: 2.6.3.0
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: 2014-03-24 00:00:00.000000000 Z
12
+ date: 2014-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -52,6 +52,7 @@ files:
52
52
  - Appraisals
53
53
  - CHANGELOG.md
54
54
  - Gemfile
55
+ - Gemfile.lock
55
56
  - LICENSE
56
57
  - README.md
57
58
  - Rakefile
@@ -148,7 +149,7 @@ files:
148
149
  - test/minitest_helper.rb
149
150
  - test/profiling/method_test.rb
150
151
  - test/support/config_test.rb
151
- - test/support/srv1_localset_test.rb
152
+ - test/support/liboboe_settings_test.rb
152
153
  - test/support/xtrace_test.rb
153
154
  homepage: http://www.appneta.com/products/traceview/
154
155
  licenses:
@@ -197,7 +198,7 @@ test_files:
197
198
  - test/instrumentation/cassandra_test.rb
198
199
  - test/instrumentation/memcached_test.rb
199
200
  - test/profiling/method_test.rb
200
- - test/support/srv1_localset_test.rb
201
+ - test/support/liboboe_settings_test.rb
201
202
  - test/support/config_test.rb
202
203
  - test/support/xtrace_test.rb
203
204
  has_rdoc: