newrelic_rpm 2.13.4.rum6 → 2.13.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of newrelic_rpm might be problematic. Click here for more details.

metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 7
5
- version: 2.13.4.rum6
4
+ hash: 51
5
+ prerelease: false
6
+ segments:
7
+ - 2
8
+ - 13
9
+ - 4
10
+ version: 2.13.4
6
11
  platform: ruby
7
12
  authors:
8
13
  - Bill Kayser
@@ -11,7 +16,7 @@ autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
18
 
14
- date: 2011-03-29 00:00:00 -07:00
19
+ date: 2010-12-09 00:00:00 -08:00
15
20
  default_executable:
16
21
  dependencies:
17
22
  - !ruby/object:Gem::Dependency
@@ -22,6 +27,9 @@ dependencies:
22
27
  requirements:
23
28
  - - ">="
24
29
  - !ruby/object:Gem::Version
30
+ hash: 3
31
+ segments:
32
+ - 0
25
33
  version: "0"
26
34
  type: :development
27
35
  version_requirements: *id001
@@ -33,6 +41,9 @@ dependencies:
33
41
  requirements:
34
42
  - - ">="
35
43
  - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
36
47
  version: "0"
37
48
  type: :development
38
49
  version_requirements: *id002
@@ -44,6 +55,9 @@ dependencies:
44
55
  requirements:
45
56
  - - ">="
46
57
  - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
47
61
  version: "0"
48
62
  type: :development
49
63
  version_requirements: *id003
@@ -57,9 +71,9 @@ description: |
57
71
 
58
72
  email: support@newrelic.com
59
73
  executables:
60
- - newrelic_cmd
61
- - newrelic
62
74
  - mongrel_rpm
75
+ - newrelic
76
+ - newrelic_cmd
63
77
  extensions: []
64
78
 
65
79
  extra_rdoc_files:
@@ -79,7 +93,6 @@ files:
79
93
  - lib/conditional_vendored_metric_parser.rb
80
94
  - lib/new_relic/agent.rb
81
95
  - lib/new_relic/agent/agent.rb
82
- - lib/new_relic/agent/browser_monitoring.rb
83
96
  - lib/new_relic/agent/busy_calculator.rb
84
97
  - lib/new_relic/agent/chained_call.rb
85
98
  - lib/new_relic/agent/error_collector.rb
@@ -142,7 +155,6 @@ files:
142
155
  - lib/new_relic/metric_spec.rb
143
156
  - lib/new_relic/metrics.rb
144
157
  - lib/new_relic/noticed_error.rb
145
- - lib/new_relic/rack/browser_monitoring.rb
146
158
  - lib/new_relic/rack/developer_mode.rb
147
159
  - lib/new_relic/rack/metric_app.rb
148
160
  - lib/new_relic/rack/mongrel_rpm.ru
@@ -155,6 +167,7 @@ files:
155
167
  - lib/new_relic/transaction_sample.rb
156
168
  - lib/new_relic/url_rule.rb
157
169
  - lib/new_relic/version.rb
170
+ - lib/new_relic_api.rb
158
171
  - lib/newrelic_rpm.rb
159
172
  - lib/tasks/all.rb
160
173
  - lib/tasks/install.rake
@@ -277,24 +290,34 @@ has_rdoc: true
277
290
  homepage: http://www.github.com/newrelic/rpm
278
291
  licenses: []
279
292
 
280
- post_install_message: "\n\
281
- PLEASE NOTE:\n\n\
282
- Developer Mode is now a Rack middleware.\n\n\
283
- RPM Developer Mode is no longer available in Rails 2.1 and earlier.\n\
284
- However, starting in version 2.12 you can use Developer Mode in any\n\
285
- Rack based framework, in addition to Rails. To install developer mode\n\
286
- in a non-Rails application, just add NewRelic::Rack::DeveloperMode to\n\
287
- your middleware stack.\n\n\
288
- If you are using JRuby, we recommend using at least version 1.4 or \n\
289
- later because of issues with the implementation of the timeout library.\n\n\
290
- Refer to the README.md file for more information.\n\n\
291
- Please see http://support.newrelic.com/faqs/docs/ruby-agent-release-notes\n\
292
- for a complete description of the features and enhancements available\n\
293
- in version 2.13 of the Ruby Agent.\n\n\
294
- For details on this specific release, refer to the CHANGELOG file.\n\n\
295
- Notice: Developer Mode now supports only Rails 2.3+ - refer to README\n\
296
- for instructions for previous versions\n\n"
293
+ post_install_message: |+
294
+
295
+ PLEASE NOTE:
296
+
297
+ Developer Mode is now a Rack middleware.
298
+
299
+ RPM Developer Mode is no longer available in Rails 2.1 and earlier.
300
+ However, starting in version 2.12 you can use Developer Mode in any
301
+ Rack based framework, in addition to Rails. To install developer mode
302
+ in a non-Rails application, just add NewRelic::Rack::DeveloperMode to
303
+ your middleware stack.
304
+
305
+ If you are using JRuby, we recommend using at least version 1.4 or
306
+ later because of issues with the implementation of the timeout library.
307
+
308
+ Refer to the README.md file for more information.
309
+
310
+ Please see http://support.newrelic.com/faqs/docs/ruby-agent-release-notes
311
+ for a complete description of the features and enhancements available
312
+ in version 2.13 of the Ruby Agent.
313
+
314
+ For details on this specific release, refer to the CHANGELOG file.
315
+
316
+ Notice: Developer Mode now supports only Rails 2.3+ - refer to README
317
+ for instructions for previous versions
318
+
297
319
  rdoc_options:
320
+ - --charset=UTF-8
298
321
  - --line-numbers
299
322
  - --inline-source
300
323
  - --title
@@ -306,17 +329,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
306
329
  requirements:
307
330
  - - ">="
308
331
  - !ruby/object:Gem::Version
332
+ hash: 3
333
+ segments:
334
+ - 0
309
335
  version: "0"
310
336
  required_rubygems_version: !ruby/object:Gem::Requirement
311
337
  none: false
312
338
  requirements:
313
339
  - - ">="
314
340
  - !ruby/object:Gem::Version
341
+ hash: 3
342
+ segments:
343
+ - 0
315
344
  version: "0"
316
345
  requirements: []
317
346
 
318
347
  rubyforge_project:
319
- rubygems_version: 1.5.0
348
+ rubygems_version: 1.3.7
320
349
  signing_key:
321
350
  specification_version: 3
322
351
  summary: New Relic Ruby Performance Monitoring Agent
@@ -1,81 +0,0 @@
1
- require 'base64'
2
-
3
- module NewRelic
4
- module Agent
5
- class BeaconConfiguration
6
- attr_reader :browser_timing_header
7
- attr_reader :application_id
8
- attr_reader :browser_monitoring_key
9
- attr_reader :beacon
10
-
11
- def initialize(connect_data)
12
- @browser_monitoring_key = connect_data['browser_key']
13
- @application_id = connect_data['application_id']
14
- @beacon = connect_data['beacon']
15
-
16
- @browser_timing_header = build_browser_timing_header(connect_data)
17
- end
18
-
19
- def build_browser_timing_header(connect_data)
20
- return "" if @browser_monitoring_key.nil?
21
-
22
- episodes_url = connect_data['episodes_url']
23
- load_episodes_file = connect_data['rum.load_episodes_file']
24
- load_episodes_file = true if load_episodes_file.nil?
25
-
26
- load_js = load_episodes_file ? "(function(){var d=document;var e=d.createElement(\"script\");e.type=\"text/javascript\";e.async=true;e.src=\"#{episodes_url}\";var s=d.getElementsByTagName(\"script\")[0];s.parentNode.insertBefore(e,s);})()" : ""
27
-
28
- "<script>var NREUMQ=[];NREUMQ.push([\"mark\",\"firstbyte\",new Date().getTime()]);#{load_js}</script>"
29
- end
30
- end
31
-
32
- module BrowserMonitoring
33
-
34
- def browser_timing_header
35
- return "" if NewRelic::Agent.instance.beacon_configuration.nil?
36
- NewRelic::Agent.instance.beacon_configuration.browser_timing_header
37
- end
38
-
39
- def browser_timing_footer
40
- config = NewRelic::Agent.instance.beacon_configuration
41
- return "" if config.nil?
42
- license_key = config.browser_monitoring_key
43
-
44
- return "" if license_key.nil?
45
-
46
- application_id = config.application_id
47
- beacon = config.beacon
48
-
49
- transaction_name = Thread::current[:newrelic_scope_name] || "<unknown>"
50
- frame = Thread.current[:newrelic_metric_frame]
51
-
52
- if frame && frame.start
53
- obf = obfuscate(transaction_name)
54
-
55
- # HACK ALERT - there's probably a better way for us to get the queue-time
56
- queue_time = ((Thread.current[:queue_time] || 0).to_f * 1000.0).round
57
- app_time = ((Time.now - frame.start).to_f * 1000.0).round
58
-
59
- <<-eos
60
- <script type="text/javascript" charset="utf-8">NREUMQ.push(["nrf2","#{beacon}","#{license_key}",#{application_id},"#{obf}",#{queue_time},#{app_time}])</script>
61
- eos
62
- else
63
- ""
64
- end
65
- end
66
-
67
- private
68
-
69
- def obfuscate(text)
70
- obfuscated = ""
71
- @@license_bytes ||= NewRelic::Control.instance.license_key.bytes.to_a
72
-
73
- text.bytes.each_with_index do |byte, i|
74
- obfuscated.concat((byte ^ @@license_bytes[i % 13]))
75
- end
76
-
77
- [obfuscated].pack("m0").chomp
78
- end
79
- end
80
- end
81
- end
@@ -1,61 +0,0 @@
1
- require 'rack'
2
-
3
- module NewRelic::Rack
4
- class BrowserMonitoring
5
-
6
- def initialize(app, options = {})
7
- @app = app
8
- end
9
-
10
- # method required by Rack interface
11
- def call(env)
12
- result = @app.call(env) # [status, headers, response]
13
-
14
- if (NewRelic::Agent.browser_timing_header != "") && should_instrument?(result[0], result[1])
15
- response_string = autoinstrument_source(result[2], result[1])
16
-
17
- if (response_string)
18
- Rack::Response.new(response_string, result[0], result[1]).finish
19
- else
20
- result
21
- end
22
- else
23
- result
24
- end
25
- end
26
-
27
- def should_instrument?(status, headers)
28
- status == 200 && headers["Content-Type"] && headers["Content-Type"].include?("text/html")
29
- end
30
-
31
- def autoinstrument_source(response, headers)
32
- source = nil
33
- response.each {|fragment| (source) ? (source << f) : (source = fragment)}
34
-
35
- body_start = source.index("<body")
36
- body_close = source.rindex("</body>")
37
-
38
- if body_start && body_close
39
- footer = NewRelic::Agent.browser_timing_footer
40
- header = NewRelic::Agent.browser_timing_header
41
-
42
- head_open = source.index("<head")
43
-
44
- if head_open
45
- head_close = source.index(">", head_open)
46
-
47
- head_pos = head_close + 1
48
- else
49
- # put the header right above body start
50
- head_pos = body_start
51
- end
52
-
53
- source = source[0..(head_pos-1)] + header + source[head_pos..(body_close-1)] + footer + source[body_close..-1]
54
-
55
- headers['Content-Length'] = source.length.to_s if headers['Content-Length']
56
- end
57
-
58
- source
59
- end
60
- end
61
- end