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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTljNGIxOWQxNDg4MDYxMWViN2UxNDQwYmFiMmQ5Yjc1Y2VlMGNmZg==
4
+ MzhkMjlkYzVmY2Y2MTBlNGQyYWM1NmM4OWVmNTgzMTQ3ZGNlMzAxOQ==
5
5
  data.tar.gz: !binary |-
6
- ODE5MWNmYjdkNTNhMTkxZjcyMzczYjhhZmM4ZDlmOWJjZTBkZjNhYg==
6
+ NzIxMzMzNWMwMmZiMzIyZTMyOThiN2MwYjYyNTI1Y2VjMjFiYTdhYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2EyNDM4YWY4MTY2MWE0YjcyNTNkNWNlYWMzOTllNWY3OWRhZjY2MWQ4YmJk
10
- NzVhMTIyZjZiYTI1OGUwZmMyMjhjMDlhNDhhODk2NjhjOTVkYTgyZTk2ZTBh
11
- YzVkMWUxNjhhYWJkMGVlODNiYTFlZWY2NWM3ZDBiNjBjZmZlOGU=
9
+ ODk3NjIwNDBhNmM1OGQ1ZDk3ZDE3OGY4MzIzZWI5MzY0M2E3MTFiMDFiNDZi
10
+ MjE0ZjFjODg5NGM4NjIwOTVmMDE5YWQ5ZmZmYTNjMWM0MGFkNjUwYTJiOWYy
11
+ ZGM3NmQwYjkzYjM0ODFmNjMzMDlmZWQ5OGRhOWJiYzE0NjNhMWE=
12
12
  data.tar.gz: !binary |-
13
- Y2VkNjM3ZGVhYWFiZjlkN2NhNWI1YmM2NjlkYmY1ODc2NmI4YWU1MGFhMjgx
14
- MzRkMmQyNjFjNWJkMTFjNGMxYmYxZDViOTJjY2Y1OTlkYzUzOThkNjJlOGIx
15
- NTk0YTliZmFjMjM1NGZkNjBjZjFmMDJlOGYwOTk4ZmYyMjJhYTQ=
13
+ MTQxOThjZmU0YzRiNTk5OWM0MTJiNzBjNDM4ZDhmOGZiNTY4ZTU4OTM0ZmZk
14
+ ZjE5Njg5YzYzZmQ2NDM4ZGZkZGQ1MzkwNzkwYjBjYjkzYTEyZjU3YjA1Mzkz
15
+ ZmJiNTc2ZDNhNTFhODM1OWFiN2EzYWUxMWUyNDkyZDE5M2E5NWM=
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ == v0.0.3 [2013-04-01] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Enhancement:
4
+ - Use the request notes for browser-timing headers.
5
+
6
+
1
7
  == v0.0.2 [2013-04-01] Michael Granger <ged@FaerieMUD.org>
2
8
 
3
9
  Bugfixes:
@@ -35,10 +35,10 @@ module Strelka::App::NewRelic
35
35
 
36
36
 
37
37
  # Library version constant
38
- VERSION = '0.0.2'
38
+ VERSION = '0.0.3'
39
39
 
40
40
  # Version-control revision constant
41
- REVISION = %q$Revision: 95dd2b5fc474 $
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
- response = self.perform_action_with_newrelic_trace( options ) do
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 "only tries to add browser timing JS to the response if it's got notes" do
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strelka-newrelic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
metadata.gz.sig CHANGED
Binary file