newrelic_rpm 2.10.3 → 2.10.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.

data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ v2.10.4
2
+ * Fix incompatibility with Capistrano 2.5.16
3
+ * Strip down URLs reported in transactions and errors to path only.
4
+
1
5
  v2.10.3
2
6
  * optimization to reduce overhead: move background samplers into foreground thread
3
7
  * change default config file to ignore RoutingErrors
@@ -318,8 +318,8 @@ module NewRelic
318
318
  category = 'Controller'
319
319
  path = newrelic_metric_path
320
320
  available_params = self.respond_to?(:params) ? self.params : {}
321
- frame_data.request = self.request if self.respond_to? :request
322
321
  end
322
+ frame_data.request ||= self.request if self.respond_to? :request
323
323
  frame_data.push(category, path)
324
324
  frame_data.filtered_params = (respond_to? :filter_parameters) ? filter_parameters(available_params) : available_params
325
325
  frame_data
@@ -9,7 +9,12 @@ module NewRelic::Agent::Instrumentation
9
9
  attr_accessor :start, :apdex_start, :exception,
10
10
  :filtered_params, :force_flag,
11
11
  :jruby_cpu_start, :process_cpu_start, :database_metric_name
12
-
12
+
13
+ # Give the current metric frame a request context. Use this to
14
+ # get the URI and referer. The request is interpreted loosely
15
+ # as a Rack::Request or an ActionController::AbstractRequest.
16
+ attr_accessor :request
17
+
13
18
  # Return the currently active metric frame, or nil. Call with +true+
14
19
  # to create a new metric frame if one is not already on the thread.
15
20
  def self.current(create_if_empty=nil)
@@ -55,24 +60,17 @@ module NewRelic::Agent::Instrumentation
55
60
  def self.abort_transaction!
56
61
  current.abort_transaction! if current
57
62
  end
58
-
59
- # Give the current metric frame a request context. Use this to
60
- # get the URI and referer. The request is interpreted loosely
61
- # as a Rack::Request or an ActionController::AbstractRequest.
62
- def request=(request)
63
- @request = request
64
- end
65
63
 
66
64
  # For the current web transaction, return the path of the URI minus the host part and query string, or nil.
67
65
  def uri
68
66
  return @uri if @uri || @request.nil?
69
67
  approximate_uri = case
70
- when @request.respond_to?(:url) then @request.url
71
- when @request.respond_to?(:uri) then @request.uri
72
68
  when @request.respond_to?(:fullpath) then @request.fullpath
73
69
  when @request.respond_to?(:path) then @request.path
70
+ when @request.respond_to?(:uri) then @request.uri
71
+ when @request.respond_to?(:url) then @request.url
74
72
  end
75
- @uri = approximate_uri.split('?').first || '/' if approximate_uri
73
+ @uri = approximate_uri[%r{^(https?://.*?)?(/[^?]*)}, 2] || '/' if approximate_uri
76
74
  end
77
75
 
78
76
  # For the current web transaction, return the full referer, minus the host string, or nil.
@@ -70,7 +70,7 @@ make_notify_task = lambda do
70
70
  end
71
71
  end
72
72
  require 'capistrano/version'
73
- if Capistrano::Version::MAJOR < 2
73
+ if defined?(Capistrano::Version::MAJOR) && Capistrano::Version::MAJOR < 2
74
74
  STDERR.puts "Unable to load #{__FILE__}\nNew Relic Capistrano hooks require at least version 2.0.0"
75
75
  else
76
76
  instance = Capistrano::Configuration.instance
@@ -3,7 +3,7 @@ module NewRelic
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 2
5
5
  MINOR = 10
6
- TINY = 3
6
+ TINY = 4
7
7
  EXPERIMENTAL = nil
8
8
  STRING = [MAJOR, MINOR, TINY, EXPERIMENTAL].compact.join('.')
9
9
  end
@@ -0,0 +1,210 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{newrelic_rpm}
8
+ s.version = "2.10.4"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Bill Kayser"]
12
+ s.date = %q{2010-02-16}
13
+ s.description = %q{New Relic RPM is a Ruby performance management system, developed by
14
+ New Relic, Inc (http://www.newrelic.com). RPM provides you with deep
15
+ information about the performance of your Ruby on Rails or Merb
16
+ application as it runs in production. The New Relic Agent is
17
+ dual-purposed as a either a Rails plugin or a Gem, hosted on
18
+ http://github.com/newrelic/rpm/tree/master.
19
+ }
20
+ s.email = %q{support@newrelic.com}
21
+ s.executables = ["mongrel_rpm", "newrelic_cmd"]
22
+ s.extra_rdoc_files = [
23
+ "CHANGELOG",
24
+ "LICENSE",
25
+ "README.md"
26
+ ]
27
+ s.files = [
28
+ "CHANGELOG",
29
+ "LICENSE",
30
+ "README.md",
31
+ "bin/mongrel_rpm",
32
+ "bin/newrelic_cmd",
33
+ "cert/cacert.pem",
34
+ "install.rb",
35
+ "lib/new_relic/agent.rb",
36
+ "lib/new_relic/agent/agent.rb",
37
+ "lib/new_relic/agent/busy_calculator.rb",
38
+ "lib/new_relic/agent/chained_call.rb",
39
+ "lib/new_relic/agent/collection_helper.rb",
40
+ "lib/new_relic/agent/error_collector.rb",
41
+ "lib/new_relic/agent/instrumentation/active_merchant.rb",
42
+ "lib/new_relic/agent/instrumentation/active_record_instrumentation.rb",
43
+ "lib/new_relic/agent/instrumentation/authlogic.rb",
44
+ "lib/new_relic/agent/instrumentation/controller_instrumentation.rb",
45
+ "lib/new_relic/agent/instrumentation/data_mapper.rb",
46
+ "lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb",
47
+ "lib/new_relic/agent/instrumentation/memcache.rb",
48
+ "lib/new_relic/agent/instrumentation/merb/controller.rb",
49
+ "lib/new_relic/agent/instrumentation/merb/errors.rb",
50
+ "lib/new_relic/agent/instrumentation/metric_frame.rb",
51
+ "lib/new_relic/agent/instrumentation/net.rb",
52
+ "lib/new_relic/agent/instrumentation/passenger_instrumentation.rb",
53
+ "lib/new_relic/agent/instrumentation/rack.rb",
54
+ "lib/new_relic/agent/instrumentation/rails/action_controller.rb",
55
+ "lib/new_relic/agent/instrumentation/rails/action_web_service.rb",
56
+ "lib/new_relic/agent/instrumentation/rails/errors.rb",
57
+ "lib/new_relic/agent/instrumentation/sinatra.rb",
58
+ "lib/new_relic/agent/method_tracer.rb",
59
+ "lib/new_relic/agent/sampler.rb",
60
+ "lib/new_relic/agent/samplers/cpu_sampler.rb",
61
+ "lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb",
62
+ "lib/new_relic/agent/samplers/memory_sampler.rb",
63
+ "lib/new_relic/agent/samplers/object_sampler.rb",
64
+ "lib/new_relic/agent/shim_agent.rb",
65
+ "lib/new_relic/agent/stats_engine.rb",
66
+ "lib/new_relic/agent/stats_engine/metric_stats.rb",
67
+ "lib/new_relic/agent/stats_engine/samplers.rb",
68
+ "lib/new_relic/agent/stats_engine/transactions.rb",
69
+ "lib/new_relic/agent/transaction_sampler.rb",
70
+ "lib/new_relic/agent/worker_loop.rb",
71
+ "lib/new_relic/commands/deployments.rb",
72
+ "lib/new_relic/commands/new_relic_commands.rb",
73
+ "lib/new_relic/control.rb",
74
+ "lib/new_relic/control/external.rb",
75
+ "lib/new_relic/control/merb.rb",
76
+ "lib/new_relic/control/rails.rb",
77
+ "lib/new_relic/control/ruby.rb",
78
+ "lib/new_relic/control/sinatra.rb",
79
+ "lib/new_relic/delayed_job_injection.rb",
80
+ "lib/new_relic/histogram.rb",
81
+ "lib/new_relic/local_environment.rb",
82
+ "lib/new_relic/merbtasks.rb",
83
+ "lib/new_relic/metric_data.rb",
84
+ "lib/new_relic/metric_parser.rb",
85
+ "lib/new_relic/metric_parser/action_mailer.rb",
86
+ "lib/new_relic/metric_parser/active_merchant.rb",
87
+ "lib/new_relic/metric_parser/active_record.rb",
88
+ "lib/new_relic/metric_parser/controller.rb",
89
+ "lib/new_relic/metric_parser/controller_cpu.rb",
90
+ "lib/new_relic/metric_parser/errors.rb",
91
+ "lib/new_relic/metric_parser/external.rb",
92
+ "lib/new_relic/metric_parser/mem_cache.rb",
93
+ "lib/new_relic/metric_parser/other_transaction.rb",
94
+ "lib/new_relic/metric_parser/view.rb",
95
+ "lib/new_relic/metric_parser/web_frontend.rb",
96
+ "lib/new_relic/metric_parser/web_service.rb",
97
+ "lib/new_relic/metric_spec.rb",
98
+ "lib/new_relic/metrics.rb",
99
+ "lib/new_relic/noticed_error.rb",
100
+ "lib/new_relic/rack/metric_app.rb",
101
+ "lib/new_relic/rack/mongrel_rpm.ru",
102
+ "lib/new_relic/rack/newrelic.yml",
103
+ "lib/new_relic/rack_app.rb",
104
+ "lib/new_relic/recipes.rb",
105
+ "lib/new_relic/stats.rb",
106
+ "lib/new_relic/transaction_analysis.rb",
107
+ "lib/new_relic/transaction_sample.rb",
108
+ "lib/new_relic/version.rb",
109
+ "lib/new_relic_api.rb",
110
+ "lib/newrelic_rpm.rb",
111
+ "lib/tasks/all.rb",
112
+ "lib/tasks/install.rake",
113
+ "lib/tasks/tests.rake",
114
+ "newrelic.yml",
115
+ "newrelic_rpm.gemspec",
116
+ "recipes/newrelic.rb",
117
+ "test/active_record_fixtures.rb",
118
+ "test/config/newrelic.yml",
119
+ "test/config/test_control.rb",
120
+ "test/new_relic/agent/active_record_instrumentation_test.rb",
121
+ "test/new_relic/agent/agent_controller_test.rb",
122
+ "test/new_relic/agent/agent_test_controller.rb",
123
+ "test/new_relic/agent/busy_calculator_test.rb",
124
+ "test/new_relic/agent/collection_helper_test.rb",
125
+ "test/new_relic/agent/error_collector_test.rb",
126
+ "test/new_relic/agent/method_tracer_test.rb",
127
+ "test/new_relic/agent/metric_data_test.rb",
128
+ "test/new_relic/agent/metric_frame_test.rb",
129
+ "test/new_relic/agent/mock_ar_connection.rb",
130
+ "test/new_relic/agent/mock_scope_listener.rb",
131
+ "test/new_relic/agent/net_instrumentation_test.rb",
132
+ "test/new_relic/agent/rpm_agent_test.rb",
133
+ "test/new_relic/agent/stats_engine/metric_stats_test.rb",
134
+ "test/new_relic/agent/stats_engine/samplers_test.rb",
135
+ "test/new_relic/agent/stats_engine/stats_engine_test.rb",
136
+ "test/new_relic/agent/task_instrumentation_test.rb",
137
+ "test/new_relic/agent/testable_agent.rb",
138
+ "test/new_relic/agent/transaction_sample_builder_test.rb",
139
+ "test/new_relic/agent/transaction_sample_test.rb",
140
+ "test/new_relic/agent/transaction_sampler_test.rb",
141
+ "test/new_relic/agent/worker_loop_test.rb",
142
+ "test/new_relic/control_test.rb",
143
+ "test/new_relic/deployments_api_test.rb",
144
+ "test/new_relic/environment_test.rb",
145
+ "test/new_relic/metric_parser_test.rb",
146
+ "test/new_relic/metric_spec_test.rb",
147
+ "test/new_relic/shim_agent_test.rb",
148
+ "test/new_relic/stats_test.rb",
149
+ "test/new_relic/version_number_test.rb",
150
+ "test/test_helper.rb",
151
+ "test/ui/newrelic_controller_test.rb",
152
+ "test/ui/newrelic_helper_test.rb",
153
+ "ui/controllers/newrelic_controller.rb",
154
+ "ui/helpers/google_pie_chart.rb",
155
+ "ui/helpers/newrelic_helper.rb",
156
+ "ui/views/layouts/newrelic_default.rhtml",
157
+ "ui/views/newrelic/_explain_plans.rhtml",
158
+ "ui/views/newrelic/_sample.rhtml",
159
+ "ui/views/newrelic/_segment.rhtml",
160
+ "ui/views/newrelic/_segment_limit_message.rhtml",
161
+ "ui/views/newrelic/_segment_row.rhtml",
162
+ "ui/views/newrelic/_show_sample_detail.rhtml",
163
+ "ui/views/newrelic/_show_sample_sql.rhtml",
164
+ "ui/views/newrelic/_show_sample_summary.rhtml",
165
+ "ui/views/newrelic/_sql_row.rhtml",
166
+ "ui/views/newrelic/_stack_trace.rhtml",
167
+ "ui/views/newrelic/_table.rhtml",
168
+ "ui/views/newrelic/explain_sql.rhtml",
169
+ "ui/views/newrelic/images/arrow-close.png",
170
+ "ui/views/newrelic/images/arrow-open.png",
171
+ "ui/views/newrelic/images/blue_bar.gif",
172
+ "ui/views/newrelic/images/file_icon.png",
173
+ "ui/views/newrelic/images/gray_bar.gif",
174
+ "ui/views/newrelic/images/new-relic-rpm-desktop.gif",
175
+ "ui/views/newrelic/images/new_relic_rpm_desktop.gif",
176
+ "ui/views/newrelic/images/textmate.png",
177
+ "ui/views/newrelic/index.rhtml",
178
+ "ui/views/newrelic/javascript/prototype-scriptaculous.js",
179
+ "ui/views/newrelic/javascript/transaction_sample.js",
180
+ "ui/views/newrelic/sample_not_found.rhtml",
181
+ "ui/views/newrelic/show_sample.rhtml",
182
+ "ui/views/newrelic/show_source.rhtml",
183
+ "ui/views/newrelic/stylesheets/style.css",
184
+ "ui/views/newrelic/threads.rhtml"
185
+ ]
186
+ s.homepage = %q{http://www.github.com/newrelic/rpm}
187
+ s.post_install_message = %q{
188
+ Please see http://support.newrelic.com/faqs/docs/ruby-agent-release-notes
189
+ for a complete description of the features and enhancements available
190
+ in version 2.10 of the Ruby Agent.
191
+
192
+ For details on this specific release, refer to the CHANGELOG file.
193
+
194
+ }
195
+ s.rdoc_options = ["--charset=UTF-8", "--line-numbers", "--inline-source", "--title", "New Relic RPM"]
196
+ s.require_paths = ["lib"]
197
+ s.rubygems_version = %q{1.3.5}
198
+ s.summary = %q{New Relic Ruby Performance Monitoring Agent}
199
+
200
+ if s.respond_to? :specification_version then
201
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
202
+ s.specification_version = 3
203
+
204
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
205
+ else
206
+ end
207
+ else
208
+ end
209
+ end
210
+
@@ -32,20 +32,20 @@ class NewRelic::Agent::MetricFrameTest < Test::Unit::TestCase
32
32
  def test_request_parsing__uri
33
33
  request = stub(:uri => 'http://creature.com/path?hello=bob#none', :referer => '/path/hello?bob=none&foo=bar')
34
34
  f.request = request
35
- assert_equal "http://creature.com/path", f.uri
35
+ assert_equal "/path", f.uri
36
36
  assert_equal "/path/hello", f.referer
37
37
  end
38
38
 
39
39
  def test_request_parsing__hostname_only
40
40
  request = stub(:uri => 'http://creature.com')
41
41
  f.request = request
42
- assert_equal "http://creature.com", f.uri
42
+ assert_equal "/", f.uri
43
43
  assert_nil f.referer
44
44
  end
45
45
  def test_request_parsing__slash
46
46
  request = stub(:uri => 'http://creature.com/')
47
47
  f.request = request
48
- assert_equal "http://creature.com/", f.uri
48
+ assert_equal "/", f.uri
49
49
  assert_nil f.referer
50
50
  end
51
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.3
4
+ version: 2.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Kayser
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-13 00:00:00 -08:00
12
+ date: 2010-02-16 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -119,6 +119,7 @@ files:
119
119
  - lib/tasks/install.rake
120
120
  - lib/tasks/tests.rake
121
121
  - newrelic.yml
122
+ - newrelic_rpm.gemspec
122
123
  - recipes/newrelic.rb
123
124
  - test/active_record_fixtures.rb
124
125
  - test/config/newrelic.yml