strelka-newrelic 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +6 -0
- data/lib/strelka/app/newrelic.rb +6 -11
- data/spec/strelka/app/newrelic_spec.rb +3 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzhkMjlkYzVmY2Y2MTBlNGQyYWM1NmM4OWVmNTgzMTQ3ZGNlMzAxOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzIxMzMzNWMwMmZiMzIyZTMyOThiN2MwYjYyNTI1Y2VjMjFiYTdhYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODk3NjIwNDBhNmM1OGQ1ZDk3ZDE3OGY4MzIzZWI5MzY0M2E3MTFiMDFiNDZi
|
10
|
+
MjE0ZjFjODg5NGM4NjIwOTVmMDE5YWQ5ZmZmYTNjMWM0MGFkNjUwYTJiOWYy
|
11
|
+
ZGM3NmQwYjkzYjM0ODFmNjMzMDlmZWQ5OGRhOWJiYzE0NjNhMWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTQxOThjZmU0YzRiNTk5OWM0MTJiNzBjNDM4ZDhmOGZiNTY4ZTU4OTM0ZmZk
|
14
|
+
ZjE5Njg5YzYzZmQ2NDM4ZGZkZGQ1MzkwNzkwYjBjYjkzYTEyZjU3YjA1Mzkz
|
15
|
+
ZmJiNTc2ZDNhNTFhODM1OWFiN2EzYWUxMWUyNDkyZDE5M2E5NWM=
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/lib/strelka/app/newrelic.rb
CHANGED
@@ -35,10 +35,10 @@ module Strelka::App::NewRelic
|
|
35
35
|
|
36
36
|
|
37
37
|
# Library version constant
|
38
|
-
VERSION = '0.0.
|
38
|
+
VERSION = '0.0.3'
|
39
39
|
|
40
40
|
# Version-control revision constant
|
41
|
-
REVISION = %q$Revision:
|
41
|
+
REVISION = %q$Revision: 92021b97f0c5 $
|
42
42
|
|
43
43
|
|
44
44
|
|
@@ -90,6 +90,9 @@ module Strelka::App::NewRelic
|
|
90
90
|
response = nil
|
91
91
|
self.log.debug "[:newrelic] Instrumenting with NewRelic."
|
92
92
|
|
93
|
+
request.notes[:rum_header] = NewRelic::Agent.browser_timing_header
|
94
|
+
request.notes[:rum_footer] = NewRelic::Agent.browser_timing_footer
|
95
|
+
|
93
96
|
txname = if !request.notes[:routing][:route].empty?
|
94
97
|
note = request.notes[:routing][:route]
|
95
98
|
self.log.debug "Making route name out of the route notes: %p" % [ note ]
|
@@ -105,18 +108,10 @@ module Strelka::App::NewRelic
|
|
105
108
|
request: request,
|
106
109
|
category: 'Controller/Strelka',
|
107
110
|
}
|
108
|
-
|
111
|
+
return self.perform_action_with_newrelic_trace( options ) do
|
109
112
|
super
|
110
113
|
end
|
111
114
|
|
112
|
-
self.log.debug "Response is: %p" % [ response ]
|
113
|
-
if response && response.respond_to?( :notes ) && response.notes
|
114
|
-
response.notes[:rum_header] = NewRelic::Agent.browser_timing_header
|
115
|
-
response.notes[:rum_footer] = NewRelic::Agent.browser_timing_footer
|
116
|
-
self.log.debug " response notes: %p" % [ response.notes ]
|
117
|
-
end
|
118
|
-
|
119
|
-
return response
|
120
115
|
rescue => err
|
121
116
|
NewRelic::Agent.notice_error( err.message )
|
122
117
|
raise
|
@@ -155,10 +155,12 @@ describe Strelka::App::NewRelic do
|
|
155
155
|
response.notes[:rum_footer].should =~ /NREUMQ/
|
156
156
|
end
|
157
157
|
|
158
|
-
it "
|
158
|
+
it "sets browser timings even with a template response" do
|
159
159
|
request = @request_factory.get( '/template' )
|
160
160
|
response = @app.new.start_newrelic_agent.handle( request )
|
161
161
|
response.status.should == HTTP::OK
|
162
|
+
response.notes[:rum_header].should =~ /NREUMQ/
|
163
|
+
response.notes[:rum_footer].should =~ /NREUMQ/
|
162
164
|
end
|
163
165
|
|
164
166
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|