newrelic_rpm 3.1.0.djlogging2 → 3.1.0
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.
- data/CHANGELOG +4 -3
- data/README.rdoc +2 -2
- data/cert/cacert.pem +118 -151
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +2 -10
- data/lib/new_relic/agent/stats_engine/transactions.rb +6 -0
- data/lib/new_relic/control/configuration.rb +5 -0
- data/lib/new_relic/control/logging_methods.rb +1 -1
- data/lib/new_relic/data_serialization.rb +17 -4
- data/lib/new_relic/delayed_job_injection.rb +4 -12
- data/lib/new_relic/rack/browser_monitoring.rb +9 -8
- data/lib/new_relic/version.rb +1 -1
- data/newrelic_rpm.gemspec +3 -2
- data/test/new_relic/control_test.rb +30 -8
- data/test/new_relic/data_serialization_test.rb +13 -0
- data/test/new_relic/rack/browser_monitoring_test.rb +84 -0
- metadata +6 -6
data/CHANGELOG
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
v3.1.0
|
2
|
-
*
|
3
|
-
processes
|
4
|
-
|
2
|
+
* Support for aggregating data from short-running
|
3
|
+
processes to reduce reporting overhead
|
4
|
+
* Numerous bug fixes
|
5
|
+
* Increased unit test coverage
|
5
6
|
|
6
7
|
v3.0.1
|
7
8
|
* Updated Real User Monitoring to reduce javascript size and improve
|
data/README.rdoc
CHANGED
@@ -13,7 +13,7 @@ The New Relic Ruby Agent runs in one of two modes:
|
|
13
13
|
|
14
14
|
Low overhead instrumentation that captures detailed information on
|
15
15
|
your application running in production and transmits them to
|
16
|
-
|
16
|
+
newrelic.com where you can monitor them in real time.
|
17
17
|
|
18
18
|
==== Developer Mode
|
19
19
|
|
@@ -39,7 +39,7 @@ Environments" section under "Getting Started".
|
|
39
39
|
|
40
40
|
= Getting Started
|
41
41
|
|
42
|
-
Install the
|
42
|
+
Install the Ruby Agent as a gem. If you are using Rails you can
|
43
43
|
install the gem as a plug-in--details below.
|
44
44
|
|
45
45
|
gem install newrelic_rpm
|
data/cert/cacert.pem
CHANGED
@@ -1,151 +1,118 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
-----END CERTIFICATE-----
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
OyVhV6O4PXNdlsj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6ZgwiFA
|
32
|
+
Vvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7S4wMcoKK+xfNAGw6EzywhIdLFnopsk/b
|
33
|
+
HdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQF
|
34
|
+
MAMBAf8wHQYDVR0OBBYEFHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNH
|
35
|
+
K266ZUapEBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6tdEPx7
|
36
|
+
srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv/NgdRN3ggX+d6Yvh
|
37
|
+
ZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywNA0ZF66D0f0hExghAzN4bcLUprbqL
|
38
|
+
OzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkC
|
39
|
+
x1YAzUm5s2x7UwQa4qjJqhIFI8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF
|
40
|
+
H4z1Ir+rzoPz4iIprn2DQKi6bA==
|
41
|
+
-----END CERTIFICATE-----
|
42
|
+
|
43
|
+
GeoTrust Universal CA
|
44
|
+
=====================
|
45
|
+
-----BEGIN CERTIFICATE-----
|
46
|
+
MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
|
47
|
+
R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1
|
48
|
+
MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0I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7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
|
62
|
+
aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2
|
63
|
+
qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL
|
64
|
+
oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK
|
65
|
+
xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF
|
66
|
+
KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2
|
67
|
+
DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK
|
68
|
+
xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU
|
69
|
+
p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
|
70
|
+
P/rmMuGNG2+k5o7Y+SlIis5z/iw=
|
71
|
+
-----END CERTIFICATE-----
|
72
|
+
|
73
|
+
GeoTrust Universal CA 2
|
74
|
+
=======================
|
75
|
+
-----BEGIN CERTIFICATE-----
|
76
|
+
MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
|
77
|
+
R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0
|
78
|
+
MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQY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ation/controller_instrumentation'
|
|
2
2
|
|
3
3
|
DependencyDetection.defer do
|
4
4
|
depends_on do
|
5
|
-
|
6
|
-
NewRelic::Control.instance.log.info('Delayed Job instrumentation disabled, edit the "disable_dj" parameter in your newrelic.yml to change this') unless value
|
7
|
-
value
|
5
|
+
!NewRelic::Control.instance['disable_dj']
|
8
6
|
end
|
9
7
|
|
10
8
|
depends_on do
|
11
|
-
|
12
|
-
NewRelic::Control.instance.log.info('Delayed Job not defined, skipping instrumentation') unless value
|
13
|
-
value
|
9
|
+
defined?(::Delayed) && defined?(::Delayed::Job)
|
14
10
|
end
|
15
11
|
|
16
12
|
executes do
|
17
13
|
Delayed::Job.class_eval do
|
18
|
-
NewRelic::Control.instance.log.info('Installing controller instrumentation into Delayed::Job')
|
19
14
|
include NewRelic::Agent::Instrumentation::ControllerInstrumentation
|
20
15
|
if self.instance_methods.include?('name')
|
21
16
|
add_transaction_tracer "invoke_job", :category => 'OtherTransaction/DelayedJob', :path => '#{self.name}'
|
@@ -27,10 +22,8 @@ DependencyDetection.defer do
|
|
27
22
|
|
28
23
|
executes do
|
29
24
|
Delayed::Job.instance_eval do
|
30
|
-
NewRelic::Control.instance.log.info('Attempting to install after_fork hook for Delayed Job')
|
31
25
|
if self.respond_to?('after_fork')
|
32
26
|
if method_defined?(:after_fork)
|
33
|
-
NewRelic::Control.instance.log.info('Delayed::Job.after_fork is defined, aliasing our method and calling the old one')
|
34
27
|
def after_fork_with_newrelic
|
35
28
|
NewRelic::Agent.after_fork(:force_reconnect => true)
|
36
29
|
after_fork_without_newrelic
|
@@ -39,7 +32,6 @@ DependencyDetection.defer do
|
|
39
32
|
alias_method :after_fork_without_newrelic, :after_fork
|
40
33
|
alias_method :after_fork, :after_fork_with_newrelic
|
41
34
|
else
|
42
|
-
NewRelic::Control.instance.log.info('Delayed::Job.after_fork is not defined, defining our after_fork hook')
|
43
35
|
def after_fork
|
44
36
|
NewRelic::Agent.after_fork(:force_reconnect => true)
|
45
37
|
super
|
@@ -153,6 +153,12 @@ module Agent
|
|
153
153
|
elapsed = (gc_time - @last_gc_timestamp).to_f
|
154
154
|
@last_gc_timestamp = gc_time
|
155
155
|
@last_gc_count = gc_collections
|
156
|
+
|
157
|
+
if defined?(GC::Profiler)
|
158
|
+
GC::Profiler.clear
|
159
|
+
@last_gc_timestamp = 0
|
160
|
+
end
|
161
|
+
|
156
162
|
if num_calls > 0
|
157
163
|
# µs to seconds
|
158
164
|
elapsed = elapsed / 1000000.0
|
@@ -3,8 +3,12 @@ module NewRelic
|
|
3
3
|
class DataSerialization
|
4
4
|
module ClassMethods
|
5
5
|
def should_send_data?
|
6
|
-
|
7
|
-
|
6
|
+
NewRelic::Control.instance.disable_serialization? || (File.size(file_path) >= max_size)
|
7
|
+
rescue Exception => e
|
8
|
+
# This is not what we really should do here, but the fail-safe
|
9
|
+
# behavior is to do what the older agent did: send data every
|
10
|
+
# time we think we might want to send data.
|
11
|
+
true
|
8
12
|
end
|
9
13
|
|
10
14
|
def read_and_write_to_file
|
@@ -17,8 +21,16 @@ module NewRelic
|
|
17
21
|
|
18
22
|
private
|
19
23
|
|
24
|
+
def open_arguments
|
25
|
+
if defined?(Encoding)
|
26
|
+
[file_path, File::RDWR | File::CREAT, {:internal_encoding => nil}]
|
27
|
+
else
|
28
|
+
[file_path, File::RDWR | File::CREAT]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
20
32
|
def with_locked_store
|
21
|
-
File.open(
|
33
|
+
File.open(*open_arguments) do |f|
|
22
34
|
f.flock(File::LOCK_EX)
|
23
35
|
begin
|
24
36
|
yield(f)
|
@@ -27,7 +39,8 @@ module NewRelic
|
|
27
39
|
end
|
28
40
|
end
|
29
41
|
rescue Exception => e
|
30
|
-
|
42
|
+
NewRelic::Control.instance.log.error("Error serializing data to disk: #{e.inspect}")
|
43
|
+
NewRelic::Control.instance.log.debug(e.backtrace.split("\n"))
|
31
44
|
end
|
32
45
|
|
33
46
|
def get_data_from_file(f)
|
@@ -13,31 +13,23 @@ end
|
|
13
13
|
|
14
14
|
DependencyDetection.defer do
|
15
15
|
depends_on do
|
16
|
-
|
17
|
-
value = defined?(::Delayed) && defined?(::Delayed::Worker)
|
18
|
-
NewRelic::Control.instance.log.info("Delayed Job and Delayed Worker instrumentation #{value ? 'is' : 'is not'} being installed")
|
19
|
-
value
|
16
|
+
defined?(::Delayed) && defined?(::Delayed::Worker)
|
20
17
|
end
|
21
18
|
|
22
19
|
executes do
|
23
20
|
Delayed::Worker.class_eval do
|
24
21
|
def initialize_with_new_relic(*args)
|
25
|
-
|
26
|
-
value = initialize_without_new_relic(*args)
|
27
|
-
NewRelic::Control.instance.log.info("Beginning New Relic Delayed Job initialization")
|
22
|
+
initialize_without_new_relic(*args)
|
28
23
|
worker_name = case
|
29
24
|
when self.respond_to?(:name) then self.name
|
30
25
|
when self.class.respond_to?(:default_name) then self.class.default_name
|
31
26
|
end
|
32
27
|
dispatcher_instance_id = worker_name || "host:#{Socket.gethostname} pid:#{Process.pid}" rescue "pid:#{Process.pid}"
|
33
|
-
|
34
|
-
NewRelic::Control.instance.log.info(log_message)
|
35
|
-
say log_message
|
28
|
+
say "New Relic Ruby Agent Monitoring DJ worker #{dispatcher_instance_id}"
|
36
29
|
NewRelic::DelayedJobInjection.worker_name = worker_name
|
37
30
|
NewRelic::Control.instance.init_plugin :dispatcher => :delayed_job, :dispatcher_instance_id => dispatcher_instance_id
|
38
31
|
end
|
39
|
-
|
40
|
-
NewRelic::Control.instance.log.debug("Aliasing initialize method to hook our instrumentation into Delayed::Worker#initialize")
|
32
|
+
|
41
33
|
alias initialize_without_new_relic initialize
|
42
34
|
alias initialize initialize_with_new_relic
|
43
35
|
end
|
@@ -37,20 +37,21 @@ module NewRelic::Rack
|
|
37
37
|
def autoinstrument_source(response, headers)
|
38
38
|
source = nil
|
39
39
|
response.each {|fragment| (source) ? (source << fragment) : (source = fragment)}
|
40
|
-
|
40
|
+
return nil unless source
|
41
|
+
|
41
42
|
body_start = source.index("<body")
|
42
43
|
body_close = source.rindex("</body>")
|
43
44
|
|
44
45
|
if body_start && body_close
|
45
46
|
footer = NewRelic::Agent.browser_timing_footer
|
46
47
|
header = NewRelic::Agent.browser_timing_header
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
head_pos =
|
48
|
+
|
49
|
+
if source.include?('X-UA-Compatible')
|
50
|
+
# put at end of header if UA-Compatible meta tag found
|
51
|
+
head_pos = source.index("</head>")
|
52
|
+
elsif head_open = source.index("<head")
|
53
|
+
# put at the beginning of the header
|
54
|
+
head_pos = source.index(">", head_open) + 1
|
54
55
|
else
|
55
56
|
# put the header right above body start
|
56
57
|
head_pos = body_start
|
data/lib/new_relic/version.rb
CHANGED
@@ -4,7 +4,7 @@ module NewRelic
|
|
4
4
|
MAJOR = 3
|
5
5
|
MINOR = 1
|
6
6
|
TINY = 0
|
7
|
-
BUILD =
|
7
|
+
BUILD = nil #'0' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
|
8
8
|
STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
|
9
9
|
end
|
10
10
|
|
data/newrelic_rpm.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{newrelic_rpm}
|
8
|
-
s.version = "3.1.0
|
8
|
+
s.version = "3.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bill Kayser", "Justin George"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-06-15}
|
13
13
|
s.description = %q{New Relic is a performance management system, developed by New Relic,
|
14
14
|
Inc (http://www.newrelic.com). New Relic provides you with deep
|
15
15
|
information about the performance of your web application as it runs
|
@@ -186,6 +186,7 @@ http://github.com/newrelic/rpm/
|
|
186
186
|
"test/new_relic/metric_data_test.rb",
|
187
187
|
"test/new_relic/metric_spec_test.rb",
|
188
188
|
"test/new_relic/rack/all_test.rb",
|
189
|
+
"test/new_relic/rack/browser_monitoring_test.rb",
|
189
190
|
"test/new_relic/rack/developer_mode_test.rb",
|
190
191
|
"test/new_relic/stats_test.rb",
|
191
192
|
"test/new_relic/transaction_analysis/segment_summary_test.rb",
|
@@ -17,15 +17,37 @@ class NewRelic::ControlTest < Test::Unit::TestCase
|
|
17
17
|
assert @c.cert_file_path
|
18
18
|
assert_equal File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'cert', 'cacert.pem')), @c.cert_file_path
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
|
+
# This test does not actually use the ruby agent in any way - it's
|
22
|
+
# testing that the CA file we ship actually validates our server's
|
23
|
+
# certificate. It's used for customers who enable verify_certificate
|
21
24
|
def test_cert_file
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
require 'socket'
|
26
|
+
require 'openssl'
|
27
|
+
|
28
|
+
s = TCPSocket.new 'collector.newrelic.com', 443
|
29
|
+
ctx = OpenSSL::SSL::SSLContext.new
|
30
|
+
ctx.ca_file = @c.cert_file_path
|
31
|
+
ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
32
|
+
s = OpenSSL::SSL::SSLSocket.new s, ctx
|
33
|
+
s.connect
|
34
|
+
# should not raise an error
|
35
|
+
end
|
36
|
+
|
37
|
+
# see above, but for staging, as well. This allows us to test new
|
38
|
+
# certificates in a non-customer-facing place before setting them
|
39
|
+
# live.
|
40
|
+
def test_staging_cert_file
|
41
|
+
require 'socket'
|
42
|
+
require 'openssl'
|
43
|
+
|
44
|
+
s = TCPSocket.new 'staging-collector.newrelic.com', 443
|
45
|
+
ctx = OpenSSL::SSL::SSLContext.new
|
46
|
+
ctx.ca_file = @c.cert_file_path
|
47
|
+
ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
48
|
+
s = OpenSSL::SSL::SSLSocket.new s, ctx
|
49
|
+
s.connect
|
50
|
+
# should not raise an error
|
29
51
|
end
|
30
52
|
|
31
53
|
def test_monitor_mode
|
@@ -54,4 +54,17 @@ class NewRelic::DataSerializationTest < Test::Unit::TestCase
|
|
54
54
|
end
|
55
55
|
assert(NewRelic::DataSerialization.should_send_data?, 'Should be over limit')
|
56
56
|
end
|
57
|
+
|
58
|
+
def test_should_send_data_disabled
|
59
|
+
NewRelic::Control.instance.expects(:disable_serialization?).returns(true)
|
60
|
+
assert(NewRelic::DataSerialization.should_send_data?, 'should send data when disabled')
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_should_send_data_under_limit
|
64
|
+
NewRelic::DataSerialization.expects(:max_size).returns(50)
|
65
|
+
NewRelic::DataSerialization.read_and_write_to_file do
|
66
|
+
"a" * 5
|
67
|
+
end
|
68
|
+
assert(!NewRelic::DataSerialization.should_send_data?, 'Should be under the limit')
|
69
|
+
end
|
57
70
|
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__),'..', '..',
|
2
|
+
'test_helper'))
|
3
|
+
require 'rack/test'
|
4
|
+
require 'new_relic/rack/browser_monitoring'
|
5
|
+
|
6
|
+
ENV['RACK_ENV'] = 'test'
|
7
|
+
|
8
|
+
class BrowserMonitoringTest < Test::Unit::TestCase
|
9
|
+
include Rack::Test::Methods
|
10
|
+
|
11
|
+
def app
|
12
|
+
@doc ||= <<-EOL
|
13
|
+
<html>
|
14
|
+
<head>
|
15
|
+
<title>im a title</title>
|
16
|
+
<meta some-crap="1"/>
|
17
|
+
<script>
|
18
|
+
junk
|
19
|
+
</script>
|
20
|
+
</head>
|
21
|
+
<body>im some body text</body>
|
22
|
+
</html>
|
23
|
+
EOL
|
24
|
+
mock_app = lambda do |env|
|
25
|
+
[200, {'Content-Type' => 'text/html'}, Rack::Response.new(@doc)]
|
26
|
+
end
|
27
|
+
NewRelic::Rack::BrowserMonitoring.new(mock_app)
|
28
|
+
end
|
29
|
+
|
30
|
+
def setup
|
31
|
+
NewRelic::Agent.stubs(:browser_timing_header) \
|
32
|
+
.returns("<script>header</script>")
|
33
|
+
NewRelic::Agent.stubs(:browser_timing_footer) \
|
34
|
+
.returns("<script>footer</script>")
|
35
|
+
end
|
36
|
+
|
37
|
+
def teardown
|
38
|
+
mocha_teardown
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_should_only_instrument_successfull_html_requests
|
42
|
+
assert app.should_instrument?(200, {'Content-Type' => 'text/html'})
|
43
|
+
assert !app.should_instrument?(500, {'Content-Type' => 'text/html'})
|
44
|
+
assert !app.should_instrument?(200, {'Content-Type' => 'text/xhtml'})
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_insert_timing_header_right_after_open_head_if_no_meta_tags
|
48
|
+
get '/'
|
49
|
+
|
50
|
+
assert(last_response.body.include?("head>#{NewRelic::Agent.browser_timing_header}"), last_response.body)
|
51
|
+
@doc = nil
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_insert_timing_header_right_before_head_close_if_ua_compatible_found
|
55
|
+
@doc = <<-EOL
|
56
|
+
<html>
|
57
|
+
<head>
|
58
|
+
<title>im a title</title>
|
59
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
60
|
+
<script>
|
61
|
+
junk
|
62
|
+
</script>
|
63
|
+
</head>
|
64
|
+
<body>im some body text</body>
|
65
|
+
</html>
|
66
|
+
EOL
|
67
|
+
get '/'
|
68
|
+
|
69
|
+
assert(last_response.body.include?("#{NewRelic::Agent.browser_timing_header}</head>"), last_response.body)
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_insert_timing_footer_right_before_html_body_close
|
73
|
+
get '/'
|
74
|
+
|
75
|
+
assert(last_response.body.include?("#{NewRelic::Agent.browser_timing_footer}</body>"), last_response.body)
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_should_not_throw_exception_on_empty_reponse
|
79
|
+
@doc = ''
|
80
|
+
get '/'
|
81
|
+
|
82
|
+
assert last_response.ok?
|
83
|
+
end
|
84
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 3
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 1
|
9
9
|
- 0
|
10
|
-
|
11
|
-
version: 3.1.0.djlogging2
|
10
|
+
version: 3.1.0
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Bill Kayser
|
@@ -17,7 +16,7 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2011-
|
19
|
+
date: 2011-06-15 00:00:00 -07:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -243,6 +242,7 @@ files:
|
|
243
242
|
- test/new_relic/metric_data_test.rb
|
244
243
|
- test/new_relic/metric_spec_test.rb
|
245
244
|
- test/new_relic/rack/all_test.rb
|
245
|
+
- test/new_relic/rack/browser_monitoring_test.rb
|
246
246
|
- test/new_relic/rack/developer_mode_test.rb
|
247
247
|
- test/new_relic/stats_test.rb
|
248
248
|
- test/new_relic/transaction_analysis/segment_summary_test.rb
|
@@ -390,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
390
390
|
requirements: []
|
391
391
|
|
392
392
|
rubyforge_project:
|
393
|
-
rubygems_version: 1.
|
393
|
+
rubygems_version: 1.4.2
|
394
394
|
signing_key:
|
395
395
|
specification_version: 3
|
396
396
|
summary: New Relic Ruby Agent
|