newrelic_rpm 2.8.11 → 2.9.2

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.

Files changed (137) hide show
  1. data/CHANGELOG +267 -0
  2. data/LICENSE +1 -1
  3. data/Manifest +142 -0
  4. data/README.md +138 -0
  5. data/Rakefile +10 -28
  6. data/bin/mongrel_rpm +33 -0
  7. data/cert/cacert.pem +34 -0
  8. data/init.rb +38 -0
  9. data/lib/new_relic/agent/agent.rb +160 -347
  10. data/lib/new_relic/agent/collection_helper.rb +13 -24
  11. data/lib/new_relic/agent/error_collector.rb +29 -15
  12. data/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb +63 -76
  13. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +90 -48
  14. data/lib/new_relic/agent/instrumentation/dispatcher_instrumentation.rb +72 -47
  15. data/lib/new_relic/agent/instrumentation/error_instrumentation.rb +14 -0
  16. data/lib/new_relic/agent/instrumentation/merb/controller.rb +10 -1
  17. data/lib/new_relic/agent/instrumentation/merb/dispatcher.rb +5 -7
  18. data/lib/new_relic/agent/instrumentation/merb/errors.rb +3 -1
  19. data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +7 -0
  20. data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +34 -7
  21. data/lib/new_relic/agent/instrumentation/rails/dispatcher.rb +20 -12
  22. data/lib/new_relic/agent/instrumentation/rails/errors.rb +5 -4
  23. data/lib/new_relic/agent/method_tracer.rb +159 -135
  24. data/lib/new_relic/agent/patch_const_missing.rb +46 -26
  25. data/lib/new_relic/agent/sampler.rb +12 -0
  26. data/lib/new_relic/agent/samplers/cpu_sampler.rb +44 -0
  27. data/lib/new_relic/agent/samplers/memory_sampler.rb +126 -0
  28. data/lib/new_relic/agent/samplers/mongrel_sampler.rb +22 -0
  29. data/lib/new_relic/agent/shim_agent.rb +11 -0
  30. data/lib/new_relic/agent/stats_engine.rb +85 -46
  31. data/lib/new_relic/agent/transaction_sampler.rb +63 -38
  32. data/lib/new_relic/agent/worker_loop.rb +8 -18
  33. data/lib/new_relic/agent.rb +200 -25
  34. data/lib/new_relic/commands/deployments.rb +9 -9
  35. data/lib/new_relic/control/merb.rb +22 -0
  36. data/lib/new_relic/control/rails.rb +141 -0
  37. data/lib/new_relic/{config → control}/ruby.rb +13 -2
  38. data/lib/new_relic/control.rb +424 -0
  39. data/lib/new_relic/local_environment.rb +201 -79
  40. data/lib/new_relic/metric_data.rb +7 -0
  41. data/lib/new_relic/metric_parser/action_mailer.rb +9 -0
  42. data/lib/new_relic/metric_parser/active_merchant.rb +26 -0
  43. data/lib/new_relic/metric_parser/active_record.rb +11 -0
  44. data/lib/new_relic/metric_parser/controller.rb +51 -0
  45. data/lib/new_relic/metric_parser/controller_cpu.rb +38 -0
  46. data/lib/new_relic/metric_parser/database.rb +23 -0
  47. data/lib/new_relic/metric_parser/errors.rb +6 -0
  48. data/lib/new_relic/metric_parser/mem_cache.rb +12 -0
  49. data/lib/new_relic/metric_parser/view.rb +61 -0
  50. data/lib/new_relic/metric_parser/web_service.rb +9 -0
  51. data/lib/new_relic/metric_parser.rb +107 -0
  52. data/lib/new_relic/metric_spec.rb +5 -0
  53. data/lib/new_relic/noticed_error.rb +5 -1
  54. data/lib/new_relic/rack/metric_app.rb +57 -0
  55. data/lib/new_relic/rack/newrelic.ru +25 -0
  56. data/lib/new_relic/rack/newrelic.yml +25 -0
  57. data/lib/new_relic/rack.rb +5 -0
  58. data/lib/new_relic/recipes.rb +10 -3
  59. data/lib/new_relic/stats.rb +130 -144
  60. data/lib/new_relic/transaction_analysis.rb +7 -8
  61. data/lib/new_relic/transaction_sample.rb +86 -10
  62. data/lib/new_relic/version.rb +41 -160
  63. data/lib/new_relic_api.rb +7 -6
  64. data/lib/newrelic_rpm.rb +30 -17
  65. data/lib/tasks/{agent_tests.rake → tests.rake} +1 -1
  66. data/newrelic.yml +115 -62
  67. data/newrelic_rpm.gemspec +36 -0
  68. data/test/active_record_fixtures.rb +55 -0
  69. data/test/config/newrelic.yml +21 -3
  70. data/test/config/{test_config.rb → test_control.rb} +14 -10
  71. data/test/new_relic/agent/active_record_instrumentation_test.rb +189 -0
  72. data/test/new_relic/agent/agent_test.rb +104 -0
  73. data/test/new_relic/agent/agent_test_controller.rb +18 -1
  74. data/test/new_relic/agent/classloader_patch_test.rb +56 -0
  75. data/test/new_relic/agent/{tc_collection_helper.rb → collection_helper_test.rb} +28 -23
  76. data/test/new_relic/agent/controller_test.rb +107 -0
  77. data/test/new_relic/agent/dispatcher_instrumentation_test.rb +70 -0
  78. data/test/new_relic/agent/error_collector_test.rb +155 -0
  79. data/test/new_relic/agent/{tc_method_tracer.rb → method_tracer_test.rb} +6 -12
  80. data/test/new_relic/agent/metric_data_test.rb +56 -0
  81. data/test/new_relic/agent/stats_engine_test.rb +266 -0
  82. data/test/new_relic/agent/{tc_transaction_sample_builder.rb → transaction_sample_builder_test.rb} +6 -5
  83. data/test/new_relic/agent/{tc_transaction_sample.rb → transaction_sample_test.rb} +9 -13
  84. data/test/new_relic/agent/transaction_sampler_test.rb +317 -0
  85. data/test/new_relic/agent/{tc_worker_loop.rb → worker_loop_test.rb} +1 -1
  86. data/test/new_relic/control_test.rb +97 -0
  87. data/test/new_relic/{tc_deployments_api.rb → deployments_api_test.rb} +8 -4
  88. data/test/new_relic/environment_test.rb +75 -0
  89. data/test/new_relic/metric_parser_test.rb +142 -0
  90. data/test/new_relic/{tc_metric_spec.rb → metric_spec_test.rb} +28 -1
  91. data/test/new_relic/samplers_test.rb +71 -0
  92. data/test/new_relic/{tc_shim_agent.rb → shim_agent_test.rb} +1 -1
  93. data/test/new_relic/stats_test.rb +291 -0
  94. data/test/new_relic/version_number_test.rb +46 -0
  95. data/test/test_helper.rb +7 -30
  96. data/test/ui/newrelic_controller_test.rb +14 -0
  97. data/test/ui/{tc_newrelic_helper.rb → newrelic_helper_test.rb} +16 -7
  98. data/ui/controllers/newrelic_controller.rb +17 -3
  99. data/ui/helpers/newrelic_helper.rb +44 -15
  100. data/ui/views/layouts/newrelic_default.rhtml +7 -8
  101. data/ui/views/newrelic/_sample.rhtml +5 -2
  102. data/ui/views/newrelic/_segment.rhtml +1 -1
  103. data/ui/views/newrelic/_segment_limit_message.rhtml +1 -0
  104. data/ui/views/newrelic/_segment_row.rhtml +4 -4
  105. data/ui/views/newrelic/_show_sample_detail.rhtml +3 -1
  106. data/ui/views/newrelic/_show_sample_sql.rhtml +2 -1
  107. data/ui/views/newrelic/explain_sql.rhtml +2 -5
  108. data/ui/views/newrelic/images/file_icon.png +0 -0
  109. data/ui/views/newrelic/images/new_relic_rpm_desktop.gif +0 -0
  110. data/ui/views/newrelic/index.rhtml +21 -13
  111. data/ui/views/newrelic/javascript/prototype-scriptaculous.js +7288 -0
  112. data/ui/views/newrelic/show_sample.rhtml +18 -3
  113. data/ui/views/newrelic/stylesheets/style.css +39 -0
  114. data/ui/views/newrelic/threads.rhtml +52 -0
  115. metadata +192 -70
  116. data/README +0 -136
  117. data/lib/new_relic/agent/instrumentation/rails/rails.rb +0 -6
  118. data/lib/new_relic/agent/samplers/cpu.rb +0 -29
  119. data/lib/new_relic/agent/samplers/memory.rb +0 -53
  120. data/lib/new_relic/agent/samplers/mongrel.rb +0 -26
  121. data/lib/new_relic/agent/synchronize.rb +0 -40
  122. data/lib/new_relic/config/merb.rb +0 -35
  123. data/lib/new_relic/config/rails.rb +0 -114
  124. data/lib/new_relic/config.rb +0 -279
  125. data/lib/new_relic/shim_agent.rb +0 -96
  126. data/test/new_relic/agent/model_fixture.rb +0 -15
  127. data/test/new_relic/agent/tc_active_record.rb +0 -90
  128. data/test/new_relic/agent/tc_agent.rb +0 -148
  129. data/test/new_relic/agent/tc_controller.rb +0 -77
  130. data/test/new_relic/agent/tc_dispatcher_instrumentation.rb +0 -52
  131. data/test/new_relic/agent/tc_error_collector.rb +0 -127
  132. data/test/new_relic/agent/tc_stats_engine.rb +0 -218
  133. data/test/new_relic/agent/tc_synchronize.rb +0 -37
  134. data/test/new_relic/agent/tc_transaction_sampler.rb +0 -302
  135. data/test/new_relic/tc_config.rb +0 -36
  136. data/test/new_relic/tc_environment.rb +0 -94
  137. data/test/new_relic/tc_stats.rb +0 -141
data/CHANGELOG ADDED
@@ -0,0 +1,267 @@
1
+ v2.9.2
2
+ * change default apdex_t to 0.5 seconds
3
+ * fix bug in deployments introduced by multi_homed setting
4
+ * support overriding the log in the agent api
5
+ * fix JRuby problem using objectspace
6
+ * display custom parameters when looking at transactions in dev mode
7
+ * display count of sql statements on the list of transactions in dev mode
8
+ * fixes for merb--thanks to Carl Lerche
9
+
10
+ v2.9.1.
11
+ * add newrelic_ignore_apdex method to controller classes to allow
12
+ you to omit some actions from apdex statistics
13
+ * Add hook for Passenger shutdown events to get more timely shutdown
14
+ notices; this will help in more accurate memory readings in
15
+ Passenger
16
+ * add newrelic_notice_error to Object class
17
+ * optional ability to verify SSL certificates, note that this has some
18
+ performance and reliability implications
19
+ * support multi-homed host with multiple apps running on duplicate
20
+ ports
21
+
22
+ v2.9.0.
23
+ Noteworthy Enhancements
24
+ * give visibility to templates and partials in Rails 2.1 and later, in
25
+ dev mode and production
26
+ * change active record metrics to capture statistics in adapter log()
27
+ call, resulting in lower overhead and improved visibility into
28
+ different DB operations; only AR operations that are not hitting the
29
+ query cache will be measured to avoid overhead
30
+ * added mongrel_rpm to the gem, a standalone daemon listening for custom
31
+ metric values sent from local processes (experimental); do mongrel_rpm
32
+ --help
33
+ * add API for system monitoring daemons (refer to KB articles); changed
34
+ API for manual starting of the agent; refer to
35
+ NewRelic::Agent.manual_start for details
36
+ * do certificate verification on ssl connections to
37
+ collector.newrelic.com
38
+ * support instances appearing in more than one application by allowing a
39
+ semicolon separated list of names for the newrelic.yml app_name
40
+ setting.
41
+ * combined agent logfiles into a single logfile
42
+ * use rpm server time for transaction traces rather than agent time
43
+
44
+ Developer Mode (only) Enhancements
45
+ * show partial rendering in traces
46
+ * improved formatting of metric names in traces
47
+ * added number of queries to transactions in the transaction list
48
+ * added some sorting options for the transaction list
49
+ * added a page showing the list of active threads
50
+
51
+ Compatibility Enhancements
52
+ * ruby 1.9.1 compatibility
53
+ * support concurrency when determining busy times, for 2.2 compatibility
54
+ * in jruby, use Java used heap for memory sampling if the system memory
55
+ is not accessible from an unsupported platform
56
+ * jruby will no longer start the agent now when running the console or
57
+ rake tasks
58
+ * API support for RPM as a footnote add-in
59
+ * webrick support restored
60
+
61
+ Noteworthy bugfixes
62
+ * sample memory on linux by reading /proc/#{$$}/status file
63
+ * fixed ambiguous 'View' metrics showing up in controller breakdown
64
+ * removed Numeric extensions, including round_to, and to_ms
65
+ * using a different timeout mechanism when we post data to RPM
66
+ * remove usage of Rails::Info which had a side effect of enabling
67
+ ActiveRecord even when it wasn't an active framework
68
+ * moved CPU sampler off background thread and onto the harvest thread
69
+ * tests now run cleanly in any rails app using test:newrelic or
70
+ test:plugins
71
+
72
+ Agent improvements to support future RPM enhancements
73
+ * add instrumentation to capture metrics on response codes; not yet
74
+ working in rails 2.3.*
75
+ * added http referer to traced errors
76
+ * capture gem requirements from rails
77
+ * capture cpu utilization adjusted for processor count
78
+ * transaction sampling
79
+
80
+ v2.8.10.
81
+ * fix thin support with rails 2.3.2 when using script/server
82
+ * fix incompatibility with rails 2.3.2 and script/server options
83
+ processing
84
+ * minor tweak to environment gathering for gem mode
85
+
86
+ v2.8.9
87
+ * fix problem finding the newrelic controller in dev mode
88
+ * fix incompatibility with older versions of optparse
89
+ * fix potential jvm problem with jruby
90
+ * remove test:all task definition to avoid conflicts
91
+ * change error message about window sampler in windows not supported to a
92
+ warning message
93
+
94
+ v2.8.8
95
+ * fix error with jruby on windows
96
+ * fix problem where webrick was being incorrectly detected causing some
97
+ problems with mongrel application assignments--had to disable webrick
98
+ for now
99
+
100
+ v2.8.7
101
+ * fix for ssl connection hanging problems
102
+ * fix problem recognizing mongrel in rails 2.3.2
103
+ * fastcgi support in rails 2.3.2
104
+ * put back webrick support
105
+
106
+ v2.8.6
107
+ * fix for capture_params when using file uploads in controller actions
108
+ * use pure ruby NS lookup for collector host to eliminate possibly
109
+ blocking applications
110
+
111
+ v2.8.5
112
+ * fix reference to CommandError which was breaking some cap scripts
113
+ * fix incompatibility with Rails 2.0 in the server API
114
+ * fix problem with litespeed with Lite accounts
115
+ * fix problem when ActiveRecord is disabled
116
+ * moved merb instrumentation to Merb::Controller instead of
117
+ AbstractController to address incompatibility with MailController
118
+ * fix problem in devmode displaying sql with embedded urls
119
+
120
+ v2.8.4
121
+ * fix bug in capistrano recipe causing cap commands to fail with error
122
+ about not finding Version class
123
+
124
+ v2.8.3
125
+ * refactor unit tests so they will run in a generic rails environment
126
+ * require classes in advance to avoid autoloading. this is to address
127
+ incompatibilities with desert as well as more flexibility in gem
128
+ initialization
129
+ * fixed newrelic_helper.rb 1.9 incompatibility
130
+
131
+ v2.8.2
132
+ * fix Ruby 1.9 syntax compatibility errors
133
+ * update the class loading sanity check, will notify server of errors
134
+ * fix agent output on script and rake task execution
135
+
136
+ v2.8.1
137
+ * Convert the deployment information upload script to an executable and
138
+ put in the bin directory. When installed as a gem this command is
139
+ symlinked to /usr/bin. Usage: newrelic_cmd deployments --help
140
+ * Fix issue invoking api when host is not set in newrelic.yml
141
+ * Fix deployments api so it will work from a gem
142
+ * Fix thin incompatibility in developer mode
143
+
144
+ v2.8.0
145
+ * add beta of api in new_relic_api.rb
146
+ * instrumented dynamic finders in ActiveRecord
147
+ * preliminary support for capturing deployment information via capistrano
148
+ * change memory sampler for solaris to use /usr/bin/ps
149
+ * allow ERB in newrelic.yml file
150
+ * merged support for merb into this version
151
+ * fix incompatibility in the developer mode with the safe_erb plugin
152
+ * fix module namespace issue causing an error accessing
153
+ NewRelic::Instrumentation modules
154
+ * fix issue where the agent sometimes failed to start up if there was a
155
+ transient network problem
156
+ * fix IgnoreSilentlyException message
157
+
158
+ v2.7.4
159
+ * fix error when trying to serialize some kinds of Enumerable objects
160
+ * added extra debug logging
161
+ * added app_name to app mapping
162
+
163
+ v2.7.3
164
+ * fix compatibility issue with 1.8.5 causing error with Dir.glob
165
+
166
+ v2.7.2
167
+ * fix problem with passenger edge not being a detected environment
168
+
169
+ v2.7.1
170
+ * fix problem with skipped dispatcher instrumentation
171
+
172
+ v2.7.0
173
+ * Repackage to support both plugin and Gem installation
174
+ * Support passenger/litespeed/jruby application naming
175
+ * Update method for calculating dispatcher queue time
176
+ * Show stack traces in RPM Transaction Traces
177
+ * Capture error source for TemplateErrors
178
+ * Clean up error stack traces.
179
+ * Support query plans from postgres
180
+ * Performance tuning
181
+ * bugfixes
182
+
183
+ v2.5.3
184
+ * fix error in transaction tracing causing traces not to show up
185
+
186
+ v2.5.2
187
+ * fixes for postgres explain plan support
188
+
189
+ v2.5.1
190
+ * bugfixes
191
+
192
+ v2.5.0
193
+ * add agent support for rpm 1.1 features
194
+ * Fix regression error with thin support
195
+
196
+ v2.4.3
197
+ * added 'newrelic_ignore' controller class method with :except and :only options for finer grained control
198
+ over the blocking of instrumentation in controllers.
199
+ * bugfixes
200
+
201
+ v2.4.2
202
+ * error reporting in early access
203
+
204
+ v2.4.1
205
+ * bugfix: initializing developer mode
206
+
207
+ v2.4.0
208
+ * Beta support for LiteSpeed and Passenger
209
+
210
+ v2.3.7
211
+ * bugfixes
212
+
213
+ v2.3.6
214
+ * bugfixes
215
+
216
+ v2.3.5
217
+ * bugfixes: pie chart data, rails 1.1 compability
218
+
219
+ v2.3.4
220
+ * bugfix
221
+
222
+ v2.3.3
223
+ * bugfix for non-mysql databases
224
+
225
+ v2.3.2
226
+ * bugfixes
227
+ * Add enhancement for Transaction Traces early access feature
228
+
229
+ v2.3.1
230
+ * bugfixes
231
+
232
+ v2.3.0
233
+ + Add support for Transaction Traces early access feature
234
+
235
+ v2.2.2
236
+ * bugfixes
237
+
238
+ v2.2.1
239
+ + Add rails 2.1 support for Developer Mode
240
+ + Changes to memory sampler: Add support for JRuby and fix Solaris support.
241
+ * Stop catching exceptions and start catching StandardError; other exception cleanup
242
+ * Add protective exception catching to the stats engine
243
+ * Improved support for thin domain sockets
244
+ * Support JRuby environments
245
+
246
+ v2.1.6
247
+ * bugfixes
248
+
249
+ v2.1.5
250
+ * bugfixes
251
+
252
+ v2.1.4
253
+ * bugfixes
254
+
255
+ v2.1.3
256
+ * bugfixes
257
+
258
+ v2.1.2
259
+ * bugfixes
260
+
261
+ v2.1.1
262
+ * bugfixes
263
+
264
+ v2.1.0
265
+ * release for private beta
266
+
267
+
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008 New Relic, Inc. All rights reserved.
1
+ Copyright (c) 2008-2009 New Relic, Inc. All rights reserved.
2
2
 
3
3
  Certain inventions disclosed in this file may be claimed within
4
4
  patents owned or patent applications filed by New Relic, Inc. or third
data/Manifest ADDED
@@ -0,0 +1,142 @@
1
+ bin/mongrel_rpm
2
+ bin/newrelic_cmd
3
+ cert/cacert.pem
4
+ CHANGELOG
5
+ init.rb
6
+ install.rb
7
+ lib/new_relic/agent/agent.rb
8
+ lib/new_relic/agent/chained_call.rb
9
+ lib/new_relic/agent/collection_helper.rb
10
+ lib/new_relic/agent/error_collector.rb
11
+ lib/new_relic/agent/instrumentation/active_merchant.rb
12
+ lib/new_relic/agent/instrumentation/active_record_instrumentation.rb
13
+ lib/new_relic/agent/instrumentation/controller_instrumentation.rb
14
+ lib/new_relic/agent/instrumentation/data_mapper.rb
15
+ lib/new_relic/agent/instrumentation/dispatcher_instrumentation.rb
16
+ lib/new_relic/agent/instrumentation/error_instrumentation.rb
17
+ lib/new_relic/agent/instrumentation/memcache.rb
18
+ lib/new_relic/agent/instrumentation/merb/controller.rb
19
+ lib/new_relic/agent/instrumentation/merb/dispatcher.rb
20
+ lib/new_relic/agent/instrumentation/merb/errors.rb
21
+ lib/new_relic/agent/instrumentation/passenger_instrumentation.rb
22
+ lib/new_relic/agent/instrumentation/rails/action_controller.rb
23
+ lib/new_relic/agent/instrumentation/rails/action_web_service.rb
24
+ lib/new_relic/agent/instrumentation/rails/dispatcher.rb
25
+ lib/new_relic/agent/instrumentation/rails/errors.rb
26
+ lib/new_relic/agent/method_tracer.rb
27
+ lib/new_relic/agent/patch_const_missing.rb
28
+ lib/new_relic/agent/sampler.rb
29
+ lib/new_relic/agent/samplers/cpu_sampler.rb
30
+ lib/new_relic/agent/samplers/memory_sampler.rb
31
+ lib/new_relic/agent/samplers/mongrel_sampler.rb
32
+ lib/new_relic/agent/shim_agent.rb
33
+ lib/new_relic/agent/stats_engine.rb
34
+ lib/new_relic/agent/transaction_sampler.rb
35
+ lib/new_relic/agent/worker_loop.rb
36
+ lib/new_relic/agent.rb
37
+ lib/new_relic/commands/deployments.rb
38
+ lib/new_relic/commands/new_relic_commands.rb
39
+ lib/new_relic/control/merb.rb
40
+ lib/new_relic/control/rails.rb
41
+ lib/new_relic/control/ruby.rb
42
+ lib/new_relic/control.rb
43
+ lib/new_relic/local_environment.rb
44
+ lib/new_relic/merbtasks.rb
45
+ lib/new_relic/metric_data.rb
46
+ lib/new_relic/metric_parser/action_mailer.rb
47
+ lib/new_relic/metric_parser/active_merchant.rb
48
+ lib/new_relic/metric_parser/active_record.rb
49
+ lib/new_relic/metric_parser/controller.rb
50
+ lib/new_relic/metric_parser/controller_cpu.rb
51
+ lib/new_relic/metric_parser/database.rb
52
+ lib/new_relic/metric_parser/errors.rb
53
+ lib/new_relic/metric_parser/mem_cache.rb
54
+ lib/new_relic/metric_parser/view.rb
55
+ lib/new_relic/metric_parser/web_service.rb
56
+ lib/new_relic/metric_parser.rb
57
+ lib/new_relic/metric_spec.rb
58
+ lib/new_relic/metrics.rb
59
+ lib/new_relic/noticed_error.rb
60
+ lib/new_relic/rack/metric_app.rb
61
+ lib/new_relic/rack/newrelic.ru
62
+ lib/new_relic/rack/newrelic.yml
63
+ lib/new_relic/rack.rb
64
+ lib/new_relic/recipes.rb
65
+ lib/new_relic/stats.rb
66
+ lib/new_relic/transaction_analysis.rb
67
+ lib/new_relic/transaction_sample.rb
68
+ lib/new_relic/version.rb
69
+ lib/new_relic_api.rb
70
+ lib/newrelic_rpm.rb
71
+ lib/tasks/all.rb
72
+ lib/tasks/install.rake
73
+ lib/tasks/tests.rake
74
+ LICENSE
75
+ Manifest
76
+ newrelic.yml
77
+ Rakefile
78
+ README.md
79
+ recipes/newrelic.rb
80
+ test/active_record_fixtures.rb
81
+ test/config/newrelic.yml
82
+ test/config/test_control.rb
83
+ test/new_relic/agent/active_record_instrumentation_test.rb
84
+ test/new_relic/agent/agent_test.rb
85
+ test/new_relic/agent/agent_test_controller.rb
86
+ test/new_relic/agent/classloader_patch_test.rb
87
+ test/new_relic/agent/collection_helper_test.rb
88
+ test/new_relic/agent/controller_test.rb
89
+ test/new_relic/agent/dispatcher_instrumentation_test.rb
90
+ test/new_relic/agent/error_collector_test.rb
91
+ test/new_relic/agent/method_tracer_test.rb
92
+ test/new_relic/agent/metric_data_test.rb
93
+ test/new_relic/agent/mock_ar_connection.rb
94
+ test/new_relic/agent/mock_scope_listener.rb
95
+ test/new_relic/agent/stats_engine_test.rb
96
+ test/new_relic/agent/testable_agent.rb
97
+ test/new_relic/agent/transaction_sample_builder_test.rb
98
+ test/new_relic/agent/transaction_sample_test.rb
99
+ test/new_relic/agent/transaction_sampler_test.rb
100
+ test/new_relic/agent/worker_loop_test.rb
101
+ test/new_relic/control_test.rb
102
+ test/new_relic/deployments_api_test.rb
103
+ test/new_relic/environment_test.rb
104
+ test/new_relic/metric_parser_test.rb
105
+ test/new_relic/metric_spec_test.rb
106
+ test/new_relic/samplers_test.rb
107
+ test/new_relic/shim_agent_test.rb
108
+ test/new_relic/stats_test.rb
109
+ test/new_relic/version_number_test.rb
110
+ test/test_helper.rb
111
+ test/ui/newrelic_controller_test.rb
112
+ test/ui/newrelic_helper_test.rb
113
+ ui/controllers/newrelic_controller.rb
114
+ ui/helpers/google_pie_chart.rb
115
+ ui/helpers/newrelic_helper.rb
116
+ ui/views/layouts/newrelic_default.rhtml
117
+ ui/views/newrelic/_explain_plans.rhtml
118
+ ui/views/newrelic/_sample.rhtml
119
+ ui/views/newrelic/_segment.rhtml
120
+ ui/views/newrelic/_segment_limit_message.rhtml
121
+ ui/views/newrelic/_segment_row.rhtml
122
+ ui/views/newrelic/_show_sample_detail.rhtml
123
+ ui/views/newrelic/_show_sample_sql.rhtml
124
+ ui/views/newrelic/_show_sample_summary.rhtml
125
+ ui/views/newrelic/_sql_row.rhtml
126
+ ui/views/newrelic/_stack_trace.rhtml
127
+ ui/views/newrelic/_table.rhtml
128
+ ui/views/newrelic/explain_sql.rhtml
129
+ ui/views/newrelic/images/arrow-close.png
130
+ ui/views/newrelic/images/arrow-open.png
131
+ ui/views/newrelic/images/blue_bar.gif
132
+ ui/views/newrelic/images/file_icon.png
133
+ ui/views/newrelic/images/gray_bar.gif
134
+ ui/views/newrelic/images/new_relic_rpm_desktop.gif
135
+ ui/views/newrelic/index.rhtml
136
+ ui/views/newrelic/javascript/prototype-scriptaculous.js
137
+ ui/views/newrelic/javascript/transaction_sample.js
138
+ ui/views/newrelic/sample_not_found.rhtml
139
+ ui/views/newrelic/show_sample.rhtml
140
+ ui/views/newrelic/show_source.rhtml
141
+ ui/views/newrelic/stylesheets/style.css
142
+ ui/views/newrelic/threads.rhtml
data/README.md ADDED
@@ -0,0 +1,138 @@
1
+ New Relic RPM
2
+ =============
3
+
4
+ New Relic RPM is a Ruby performance management system, developed by
5
+ [New Relic, Inc](http://www.newrelic.com). RPM provides you with deep
6
+ information about the performance of your Ruby on Rails or Merb
7
+ application as it runs in production. The New Relic Agent is
8
+ dual-purposed as a either a Rails plugin or a Gem, hosted on
9
+ [github](http://github.com/newrelic/rpm/tree/master) and Rubyforge.
10
+
11
+ The New Relic Agent runs in one of two modes:
12
+
13
+ **Developer Mode** : Adds a web interface mapped to /newrelic to your
14
+ application for showing detailed performance metrics on a page by
15
+ page basis.
16
+
17
+ **Production Mode** : Low overhead instrumentation that captures
18
+ detailed information on your application running in production and
19
+ transmits them to rpm.newrelic.com where you can monitor them in
20
+ real time.
21
+
22
+ ### Supported Environments
23
+
24
+ * Ruby 1.8.6, 1.8.7 or 1.9.1
25
+ * JRuby
26
+ * Rails 1.2.6 or above
27
+ * Merb 1.0 or above
28
+
29
+ Developer Mode
30
+ --------------
31
+
32
+ Developer mode is on by default when you run your application in the
33
+ development environment (but not when it runs in other environments.)
34
+ When running in developer mode, RPM will track the performance of
35
+ every http request serviced by your application, and store in memory
36
+ this information for the last 100 http transactions.
37
+
38
+ When running in Developer Mode, the RPM will also add a few pages to
39
+ your application that allow you to analyze this performance
40
+ information. (Don't worry--those pages are not added to your
41
+ application's routes when you run in production mode.)
42
+
43
+ To view this performance information, including detailed SQL statement
44
+ analysis, open `/newrelic` in your web application. For instance if
45
+ you are running mongrel or thin on port 3000, enter the following into
46
+ your browser:
47
+
48
+ http://localhost:3000/newrelic
49
+
50
+ Production Mode
51
+ ---------------
52
+
53
+ When your application runs in the production environment, the New
54
+ Relic agent runs in production mode. It connects to the New Relic RPM
55
+ service and sends deep performance data to the RPM service for your
56
+ analysis. To view this data, login to
57
+ [http://rpm.newrelic.com](http://rpm.newrelic.com).
58
+
59
+ NOTE: You must have a valid account and license key to view this data
60
+ online. Refer to instructions in *Getting Started*, below.
61
+
62
+ Getting Started
63
+ ===============
64
+
65
+ RPM requires an agent be installed in the application as either a
66
+ Rails plug-in or a gem. Both are available on RubyForge--instructions
67
+ below.
68
+
69
+ To use Developer Mode, simply install the gem or plugin into your
70
+ application and follow the instructions below.
71
+
72
+ To monitor your applications in production, create an account at
73
+ [www.newrelic.com](http://newrelic.com/get-RPM.html). There you can
74
+ sign up for a free Lite account or one of our paid subscriptions.
75
+
76
+ Once you receive the welcome e-mail with a license key and
77
+ `newrelic.yml` file, copy the `newrelic.yml` file into your app config
78
+ directory.
79
+
80
+ ### Rails Plug-In Installation
81
+
82
+ script/plugin install http://newrelic.rubyforge.org/svn/newrelic_rpm
83
+
84
+ ### Gem Installation
85
+
86
+ sudo gem install newrelic_rpm
87
+
88
+ For Rails, edit `environment.rb` and add to the initalizer block:
89
+
90
+ config.gem "newrelic_rpm"
91
+
92
+ The Developer Mode is unavailable when using the gem on Rails versions
93
+ prior to 2.0.
94
+
95
+ ### Merb Support
96
+
97
+ To monitor a merb app install the newrelic_rpm gem and add
98
+
99
+ dependency 'newrelic_rpm'
100
+
101
+ to your init.rb file.
102
+
103
+ Current features implemented:
104
+
105
+ * Standard monitoring, overview pages
106
+ * Error capturing
107
+ * Full Active Record instrumentation, including SQL explains
108
+ * Very limited Data Mapper instrumentation
109
+ * Transaction Traces are implemented but will not be very useful
110
+ with Data Mapper until more work is done with the Data Mapper
111
+ instrumentation
112
+
113
+ Still under development:
114
+
115
+ * Developer Mode
116
+ * Data Mapper bindings
117
+
118
+ ### Github
119
+
120
+ The agent is also available on Github under newrelic/rpm. Fork away!
121
+
122
+ ### Support
123
+
124
+ Reach out to us--and to fellow RPM users--at
125
+ [support.newrelic.com](http://support.newrelic.com/discussions/support).
126
+ There you'll find documentation, FAQs, and forums where you can submit
127
+ suggestions and discuss RPM with New Relic staff and other users.
128
+
129
+ Find a bug? E-mail support@newrelic.com, or post it to
130
+ [support.newrelic.com](http://support.newrelic.com/discussions/support).
131
+
132
+ Refer to [our website](http://www.newrelic.com/support) for other
133
+ support channels.
134
+
135
+ Thank you, and may your application scale to infinity plus one.
136
+
137
+ Lew Cirne, Founder and CEO<br/>
138
+ New Relic, Inc.