ghazel-newrelic_rpm 3.1.0.1 → 3.4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +120 -35
- data/LICENSE +29 -2
- data/README.rdoc +2 -2
- data/bin/mongrel_rpm +0 -0
- data/bin/newrelic +0 -0
- data/bin/newrelic_cmd +0 -0
- data/lib/new_relic/agent.rb +50 -38
- data/lib/new_relic/agent/agent.rb +459 -337
- data/lib/new_relic/agent/beacon_configuration.rb +71 -11
- data/lib/new_relic/agent/browser_monitoring.rb +73 -14
- data/lib/new_relic/agent/busy_calculator.rb +11 -3
- data/lib/new_relic/agent/chained_call.rb +2 -2
- data/lib/new_relic/agent/database.rb +223 -0
- data/lib/new_relic/agent/error_collector.rb +231 -183
- data/lib/new_relic/agent/instrumentation.rb +2 -2
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +10 -2
- data/lib/new_relic/agent/instrumentation/active_record.rb +138 -0
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +7 -1
- data/lib/new_relic/agent/instrumentation/authlogic.rb +6 -0
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +46 -14
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +8 -2
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +11 -3
- data/lib/new_relic/agent/instrumentation/memcache.rb +49 -25
- data/lib/new_relic/agent/instrumentation/merb/controller.rb +7 -2
- data/lib/new_relic/agent/instrumentation/merb/errors.rb +7 -1
- data/lib/new_relic/agent/instrumentation/metric_frame.rb +31 -4
- data/lib/new_relic/agent/instrumentation/metric_frame/pop.rb +1 -5
- data/lib/new_relic/agent/instrumentation/net.rb +8 -2
- data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +5 -2
- data/lib/new_relic/agent/instrumentation/queue_time.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +66 -35
- data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +7 -1
- data/lib/new_relic/agent/instrumentation/rails/errors.rb +7 -1
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +121 -1
- data/lib/new_relic/agent/instrumentation/rails3/errors.rb +7 -1
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +21 -0
- data/lib/new_relic/agent/instrumentation/resque.rb +80 -0
- data/lib/new_relic/agent/instrumentation/sinatra.rb +46 -20
- data/lib/new_relic/agent/instrumentation/sunspot.rb +6 -0
- data/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb +7 -2
- data/lib/new_relic/agent/method_tracer.rb +205 -99
- data/lib/new_relic/agent/new_relic_service.rb +221 -0
- data/lib/new_relic/agent/pipe_channel_manager.rb +161 -0
- data/lib/new_relic/agent/pipe_service.rb +54 -0
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +89 -0
- data/lib/new_relic/agent/samplers/memory_sampler.rb +6 -7
- data/lib/new_relic/agent/shim_agent.rb +5 -5
- data/lib/new_relic/agent/sql_sampler.rb +282 -0
- data/lib/new_relic/agent/stats_engine.rb +2 -0
- data/lib/new_relic/agent/stats_engine/gc_profiler.rb +123 -0
- data/lib/new_relic/agent/stats_engine/metric_stats.rb +35 -30
- data/lib/new_relic/agent/stats_engine/samplers.rb +10 -4
- data/lib/new_relic/agent/stats_engine/transactions.rb +28 -87
- data/lib/new_relic/agent/transaction_info.rb +74 -0
- data/lib/new_relic/agent/transaction_sample_builder.rb +18 -3
- data/lib/new_relic/agent/transaction_sampler.rb +108 -20
- data/lib/new_relic/agent/worker_loop.rb +14 -6
- data/lib/new_relic/collection_helper.rb +19 -11
- data/lib/new_relic/command.rb +1 -1
- data/lib/new_relic/commands/deployments.rb +2 -2
- data/lib/new_relic/commands/install.rb +2 -13
- data/lib/new_relic/control.rb +2 -3
- data/lib/new_relic/control/class_methods.rb +12 -6
- data/lib/new_relic/control/configuration.rb +57 -8
- data/lib/new_relic/control/frameworks.rb +10 -0
- data/lib/new_relic/control/frameworks/external.rb +4 -4
- data/lib/new_relic/control/frameworks/merb.rb +2 -1
- data/lib/new_relic/control/frameworks/rails.rb +35 -22
- data/lib/new_relic/control/frameworks/rails3.rb +12 -7
- data/lib/new_relic/control/frameworks/ruby.rb +5 -5
- data/lib/new_relic/control/frameworks/sinatra.rb +1 -4
- data/lib/new_relic/control/instance_methods.rb +38 -12
- data/lib/new_relic/control/instrumentation.rb +23 -4
- data/lib/new_relic/control/logging_methods.rb +70 -15
- data/lib/new_relic/control/server_methods.rb +22 -9
- data/lib/new_relic/delayed_job_injection.rb +16 -3
- data/lib/new_relic/helper.rb +21 -0
- data/lib/new_relic/language_support.rb +95 -0
- data/lib/new_relic/local_environment.rb +92 -48
- data/lib/new_relic/metric_data.rb +7 -2
- data/lib/new_relic/metric_spec.rb +12 -9
- data/lib/new_relic/noticed_error.rb +6 -1
- data/lib/new_relic/rack/browser_monitoring.rb +18 -19
- data/lib/new_relic/rack/developer_mode.rb +3 -2
- data/lib/new_relic/recipes.rb +8 -4
- data/lib/new_relic/stats.rb +17 -60
- data/lib/new_relic/transaction_analysis.rb +2 -1
- data/lib/new_relic/transaction_analysis/segment_summary.rb +4 -2
- data/lib/new_relic/transaction_sample.rb +60 -75
- data/lib/new_relic/transaction_sample/segment.rb +31 -79
- data/lib/new_relic/version.rb +2 -2
- data/lib/newrelic_rpm.rb +1 -1
- data/newrelic.yml +2 -2
- data/newrelic_rpm.gemspec +46 -54
- data/test/active_record_fixtures.rb +3 -3
- data/test/config/newrelic.yml +1 -1
- data/test/fixtures/proc_cpuinfo.txt +575 -0
- data/test/new_relic/agent/agent/connect_test.rb +128 -25
- data/test/new_relic/agent/agent/start_test.rb +9 -94
- data/test/new_relic/agent/agent/start_worker_thread_test.rb +2 -4
- data/test/new_relic/agent/agent_test.rb +51 -78
- data/test/new_relic/agent/agent_test_controller.rb +1 -1
- data/test/new_relic/agent/agent_test_controller_test.rb +49 -33
- data/test/new_relic/agent/beacon_configuration_test.rb +12 -5
- data/test/new_relic/agent/browser_monitoring_test.rb +99 -50
- data/test/new_relic/agent/database_test.rb +161 -0
- data/test/new_relic/agent/error_collector_test.rb +47 -23
- data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +96 -42
- data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +0 -2
- data/test/new_relic/agent/instrumentation/instrumentation_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/metric_frame/pop_test.rb +3 -11
- data/test/new_relic/agent/instrumentation/net_instrumentation_test.rb +9 -9
- data/test/new_relic/agent/instrumentation/queue_time_test.rb +6 -11
- data/test/new_relic/agent/memcache_instrumentation_test.rb +54 -18
- data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +1 -1
- data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +1 -1
- data/test/new_relic/agent/method_tracer_test.rb +3 -2
- data/test/new_relic/agent/new_relic_service_test.rb +151 -0
- data/test/new_relic/agent/pipe_channel_manager_test.rb +114 -0
- data/test/new_relic/agent/pipe_service_test.rb +113 -0
- data/test/new_relic/agent/rpm_agent_test.rb +4 -31
- data/test/new_relic/agent/sql_sampler_test.rb +192 -0
- data/test/new_relic/agent/stats_engine/metric_stats_test.rb +19 -18
- data/test/new_relic/agent/stats_engine_test.rb +41 -6
- data/test/new_relic/agent/transaction_info_test.rb +13 -0
- data/test/new_relic/agent/transaction_sample_builder_test.rb +27 -4
- data/test/new_relic/agent/transaction_sampler_test.rb +68 -46
- data/test/new_relic/agent/worker_loop_test.rb +3 -3
- data/test/new_relic/agent_test.rb +242 -0
- data/test/new_relic/collection_helper_test.rb +50 -28
- data/test/new_relic/control/configuration_test.rb +77 -0
- data/test/new_relic/control/logging_methods_test.rb +49 -21
- data/test/new_relic/control_test.rb +115 -54
- data/test/new_relic/delayed_job_injection_test.rb +21 -0
- data/test/new_relic/fake_collector.rb +210 -0
- data/test/new_relic/fake_service.rb +44 -0
- data/test/new_relic/local_environment_test.rb +14 -1
- data/test/new_relic/metric_parser/metric_parser_test.rb +11 -0
- data/test/new_relic/rack/browser_monitoring_test.rb +84 -23
- data/test/new_relic/rack/developer_mode_helper_test.rb +141 -0
- data/test/new_relic/rack/developer_mode_test.rb +31 -0
- data/test/new_relic/stats_test.rb +3 -18
- data/test/new_relic/transaction_analysis/segment_summary_test.rb +14 -0
- data/test/new_relic/transaction_analysis_test.rb +3 -3
- data/test/new_relic/transaction_sample/segment_test.rb +15 -80
- data/test/new_relic/transaction_sample_test.rb +25 -18
- data/test/script/build_test_gem.sh +51 -0
- data/test/script/ci.sh +140 -0
- data/test/script/ci_agent-tests_runner.sh +82 -0
- data/test/script/ci_bench.sh +52 -0
- data/test/script/ci_multiverse_runner.sh +63 -0
- data/test/test_contexts.rb +1 -0
- data/test/test_helper.rb +18 -5
- data/ui/helpers/developer_mode_helper.rb +14 -8
- data/ui/helpers/google_pie_chart.rb +0 -1
- data/ui/views/newrelic/index.rhtml +2 -2
- data/vendor/gems/dependency_detection-0.0.1.build/LICENSE +4 -18
- data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb +10 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb +11 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb +17 -4
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +4 -0
- metadata +50 -36
- data/lib/new_relic/agent/instrumentation/rails/active_record_instrumentation.rb +0 -108
- data/lib/new_relic/agent/instrumentation/rails3/active_record_instrumentation.rb +0 -112
- data/lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb +0 -40
- data/lib/new_relic/data_serialization.rb +0 -84
- data/lib/new_relic/histogram.rb +0 -91
- data/lib/new_relic/rack/metric_app.rb +0 -65
- data/lib/new_relic/rack/mongrel_rpm.ru +0 -28
- data/lib/new_relic/rack/newrelic.yml +0 -27
- data/lib/new_relic/rack_app.rb +0 -6
- data/test/new_relic/data_serialization_test.rb +0 -70
- data/vendor/gems/dependency_detection-0.0.1.build/README +0 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/LICENSE +0 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/README +0 -0
data/CHANGELOG
CHANGED
@@ -1,10 +1,95 @@
|
|
1
|
-
v3.
|
1
|
+
v3.4.0.1
|
2
|
+
* Prevent the agent from resolving the collector address when disabled.
|
3
|
+
* Fix for error collector configuration that was introduced during beta.
|
4
|
+
|
5
|
+
v3.4.0
|
6
|
+
* Major refactor of data transmission mechanism. This enabled child processes to send data to parent processes, which then send the data to the New Relic service. This should only affect Resque users, dramatically improving their experience.
|
7
|
+
* Moved Resque instrumentation from rpm_contrib to main agent. Resque users should discontinue use of rpm_contrib or upgrade to 2.1.11.
|
8
|
+
* Resolve issue with configuring the Error Collector when using server-side configuration.
|
9
|
+
|
10
|
+
v3.3.5
|
11
|
+
* [FIX] Allow tracing of methods ending in ! and ?
|
12
|
+
* [PERF] Give up after scanning first 50k of the response in RUM
|
13
|
+
auto-instrumentation.
|
14
|
+
* [FIX] Don't raise when extracting metrics from SQL queries with non UTF-8 bytes.
|
15
|
+
* Replaced "Custom/DJ Locked Jobs" metric with new metrics for
|
16
|
+
monitoring DelayedJob: queue_length, failed_jobs, and locked_jobs, all under
|
17
|
+
Workers/DelayedJob. queue_length is also broken out by queue name or priority
|
18
|
+
depending on the version of DelayedJob deployed.
|
19
|
+
|
20
|
+
v3.3.4.1
|
21
|
+
* Bug fix when rendering empty collection in Rails 3.1+
|
22
|
+
|
23
|
+
v3.3.4
|
24
|
+
* Rails 3 view instrumentation
|
25
|
+
|
26
|
+
v3.3.3
|
27
|
+
* Improved Sinatra instrumentation
|
28
|
+
* Limit the number of nodes collected in long running transactions to prevent leaking memory
|
29
|
+
|
30
|
+
v3.3.2.1
|
31
|
+
* [SECURITY] fix for cookie handling by End User Monitoring instrumentation
|
32
|
+
|
33
|
+
v3.3.2
|
34
|
+
* deployments recipe change: truncate git SHAs to 7 characters
|
35
|
+
* Fixes for obfuscation of PostgreSQL and SQLite queries
|
36
|
+
* Fix for lost database connections when using a forking framework
|
37
|
+
* Workaround for RedHat kernel bug which prevented blocking reads of /proc fs
|
38
|
+
* Do not trap signals when handling exceptions
|
39
|
+
|
40
|
+
v3.3.1
|
41
|
+
* improved Ruby 1.8.6 support
|
42
|
+
* fix for issues with RAILS_ROOT deprecation warnings
|
43
|
+
* fixed incorrect 1.9 GC time reporting
|
44
|
+
* obfusction for Slow SQL queries respects transaction trace config
|
45
|
+
* fix for RUM instrumentation repoting bad timing info in some cases
|
46
|
+
* refactored ActiveRecord instrumentation, no longer requires Rails
|
47
|
+
|
48
|
+
v3.3.0
|
49
|
+
* fix for GC instrumentation when using Ruby 1.9
|
50
|
+
* new feature to correlate browser and server transaction traces
|
51
|
+
* new feature to trace slow sql statements
|
52
|
+
* fix to help cope with malformed rack responses
|
53
|
+
* do not try to instrument versions of ActiveMerchant that are too old
|
54
|
+
|
55
|
+
v3.2.0.1
|
56
|
+
* Updated LICENSE
|
57
|
+
* Updated links to support docs
|
58
|
+
|
59
|
+
v3.2.0
|
60
|
+
* Fix over-detection of mongrel and unicorn and only start the agent when
|
61
|
+
actual server is running
|
62
|
+
* Improve developer mode backtraces to support ruby 1.9.2, windows
|
63
|
+
* Fixed some cases where Memcache instrumentation was failing to load
|
64
|
+
* Ability to set log destination by NEW_RELIC_LOG env var
|
65
|
+
* Fix to mutex lib load issue
|
66
|
+
* Performance enhancements (thanks to Jeremy Kemper)
|
67
|
+
* Fix overly verbose STDOUT message (thanks to Anselm Helbig)
|
68
|
+
|
69
|
+
v3.1.2
|
70
|
+
* Fixed some thread safety issues
|
71
|
+
* Work around for Ruby 1.8.7 Marshal crash bug
|
72
|
+
* Numerous community patches (Gabriel Horner, Bradley Harris, Diego Garcia,
|
73
|
+
Tommy Sullivan, Greg Hazel, John Thomas Marino, Paul Elliott, Pan Thomakos)
|
74
|
+
* Fixed RUM instrumentation bug
|
75
|
+
|
76
|
+
v3.1.1
|
77
|
+
* Support for Rails 3.1 (thanks to Ben Hoskings via github)
|
78
|
+
* Support for Rubinius
|
79
|
+
* Fixed issues affecting some Delayed Job users where log files were not appearing
|
80
|
+
* Fixed an issue where some instrumentation might not get loaded in Rails apps
|
81
|
+
* Fix for memcached cas method (thanks to Andrew Long and Joseph Palermo )
|
82
|
+
* Fix for logger deprecation warning (thanks to Jonathan del Strother via github)
|
83
|
+
* Support for logging to STDOUT
|
84
|
+
* Support for Spymemcached client on jruby
|
85
|
+
|
86
|
+
v3.1.0
|
2
87
|
* Support for aggregating data from short-running
|
3
88
|
processes to reduce reporting overhead
|
4
89
|
* Numerous bug fixes
|
5
90
|
* Increased unit test coverage
|
6
91
|
|
7
|
-
v3.0.1
|
92
|
+
v3.0.1
|
8
93
|
* Updated Real User Monitoring to reduce javascript size and improve
|
9
94
|
compatibility, fix a few known bugs
|
10
95
|
|
@@ -47,7 +132,7 @@ v2.13.3
|
|
47
132
|
* Dalli instrumentation from Mike Perham (thanks Mike)
|
48
133
|
* Datamapper instrumentation from Jordan Ritter (thanks Jordan)
|
49
134
|
* Apdex now defaults to 0.5
|
50
|
-
!!! Please be aware that if you are not setting an apdex,
|
135
|
+
!!! Please be aware that if you are not setting an apdex,
|
51
136
|
!!! this will cause a change in the apparent performance of your app.
|
52
137
|
* Make metric hashes threadsafe (fixes problems sending metrics in Jruby
|
53
138
|
threaded code)
|
@@ -86,7 +171,7 @@ v2.13.0
|
|
86
171
|
details from web and background transactions occurring outside RPM
|
87
172
|
* fixed a bug related to enabling a gold trial / upgrade not sending
|
88
173
|
trasaction traces correctly
|
89
|
-
|
174
|
+
|
90
175
|
v2.12.3
|
91
176
|
* fix regression in startup sequence
|
92
177
|
|
@@ -111,7 +196,7 @@ v2.11.2
|
|
111
196
|
* fix for unicorn not reporting when the proc line had 'master' in it
|
112
197
|
* fix regression for passenger 2.0 and earlier
|
113
198
|
* fix after_fork in the shim
|
114
|
-
|
199
|
+
|
115
200
|
v2.11.1
|
116
201
|
* republished gem without generated rdocs
|
117
202
|
|
@@ -119,18 +204,18 @@ v2.11.0
|
|
119
204
|
* rails3 instrumentation (no developer mode support yet)
|
120
205
|
* removed the ensure_worker_thread started and instead defined an after_fork
|
121
206
|
handler that will set up the agent properly in forked processes.
|
122
|
-
* change at_exit handler so the shutdown always goes after other shutdown
|
207
|
+
* change at_exit handler so the shutdown always goes after other shutdown
|
123
208
|
handlers
|
124
209
|
* add visibility to active record db transactions in the rpm transaction
|
125
210
|
traces (thanks to jeremy kemper)
|
126
211
|
* fix regression in merb support which caused merb apps not to start
|
127
|
-
* added NewRelic::Agent.logger to the public api to write to the agent
|
212
|
+
* added NewRelic::Agent.logger to the public api to write to the agent
|
128
213
|
log file.
|
129
214
|
* optimizations to background thread, controller instrumentation, memory
|
130
215
|
usage
|
131
216
|
* add logger method to public_api
|
132
217
|
* support list notation for ignored exceptions in the newrelic.yml
|
133
|
-
|
218
|
+
|
134
219
|
v2.10.8
|
135
220
|
* fix bug in delayed_job instrumentation that caused the job queue sampler
|
136
221
|
to run in the wrong place
|
@@ -140,30 +225,30 @@ v2.10.8
|
|
140
225
|
* fix problem with the Authlogic metric names which caused errors in
|
141
226
|
developer mode. Authlogic metrics now adhere to the convention of
|
142
227
|
prefixing the name with 'Custom'
|
143
|
-
* allow more correct overriding of transaction trace settings in the
|
228
|
+
* allow more correct overriding of transaction trace settings in the
|
144
229
|
call to #manual_start
|
145
230
|
* simplify WorkerLoop and add better protection for concurrency
|
146
231
|
* preliminary support for rails3
|
147
|
-
|
232
|
+
|
148
233
|
v2.10.6
|
149
234
|
* fix missing URL and referer on some traced errors and transactions
|
150
235
|
* gather traced errors *after* executing the rescue chain in ActionController
|
151
236
|
* always load controller instrumentation
|
152
237
|
* pick up token validation from newrelic.yml
|
153
|
-
|
238
|
+
|
154
239
|
v2.10.5
|
155
240
|
* fix bug in delayed_job instrumentation occurring when there was no DJ log
|
156
|
-
|
241
|
+
|
157
242
|
v2.10.4
|
158
243
|
* fix incompatibility with Capistrano 2.5.16
|
159
244
|
* strip down URLs reported in transactions and errors to path only
|
160
|
-
|
245
|
+
|
161
246
|
v2.10.3
|
162
247
|
* optimization to reduce overhead: move background samplers into foreground thread
|
163
248
|
* change default config file to ignore RoutingErrors
|
164
249
|
* moved the background task instrumentation into a separate tab in the RPM UI
|
165
250
|
* allow override of the RPM application name via NEWRELIC_APP_NAME environment variable
|
166
|
-
* revised Delayed::Job instrumentation so no manual_start is required
|
251
|
+
* revised Delayed::Job instrumentation so no manual_start is required
|
167
252
|
* send buffered data on shutdown
|
168
253
|
* expanded support for queue length and queue time
|
169
254
|
* remove calls to starts_with to fix Sinatra and non-rails deployments
|
@@ -175,9 +260,9 @@ v2.10.3
|
|
175
260
|
|
176
261
|
v2.10.2.
|
177
262
|
* beta release of 2.10
|
178
|
-
* fix bugs with Sinatra app instrumentation
|
263
|
+
* fix bugs with Sinatra app instrumentation
|
179
264
|
* minor doc updates
|
180
|
-
|
265
|
+
|
181
266
|
v2.10.1.
|
182
267
|
* alpha release of 2.10
|
183
268
|
* rack support, including metal; ignores 404s; requires a module inclusion (see docs)
|
@@ -185,14 +270,14 @@ v2.10.1.
|
|
185
270
|
* add API method to abort transaction recording for in-flight transactions
|
186
271
|
* remove account management calls from newrelic_api.rb
|
187
272
|
* truncating extremely large transaction traces for efficiency
|
188
|
-
* fix error reporting in recipes; add newrelic_rails_env option to recipes to
|
273
|
+
* fix error reporting in recipes; add newrelic_rails_env option to recipes to
|
189
274
|
override the rails env used to pull the app_name out of newrelic.yml
|
190
275
|
* added TorqueBox recognition (thanks Bob McWhirter)
|
191
276
|
* renamed config settings: enabled => monitor_mode; developer => developer_mode;
|
192
277
|
old names will still work in newrelic.yml
|
193
278
|
* instrumentation for DelayedJob (thanks Travis Tilley)
|
194
|
-
* added config switches to turn off certain instrumentation when you aren't
|
195
|
-
interested in the metrics, to save on overhead--see newrelic.yml for details.
|
279
|
+
* added config switches to turn off certain instrumentation when you aren't
|
280
|
+
interested in the metrics, to save on overhead--see newrelic.yml for details.
|
196
281
|
* add profiling support to dev mode; very experimental!
|
197
282
|
* add 'multi_threaded' config option to indicate when the app is running
|
198
283
|
multi-threaded, so we can disable some instrumentation
|
@@ -213,13 +298,13 @@ v2.10.1.
|
|
213
298
|
* renamed the dispatcher metric
|
214
299
|
* refactored stats_engine code for readability
|
215
300
|
* optimization: reduce wakeup times for harvest thread
|
216
|
-
|
301
|
+
|
217
302
|
v2.10.0.
|
218
303
|
* alpha release of 2.10
|
219
304
|
* support unicorn
|
220
305
|
* instrumentation of GC for REE and MRE with GC patch
|
221
306
|
* support agent restarting when changes are made to the account
|
222
|
-
* removed #newrelic_notice_error from Object class, replaced by NewRelic::Agent#notic_error
|
307
|
+
* removed #newrelic_notice_error from Object class, replaced by NewRelic::Agent#notic_error
|
223
308
|
* collect histogram statistics
|
224
309
|
* add custom parameters to newrelic_notice_error call to display
|
225
310
|
extra info for errors
|
@@ -255,13 +340,13 @@ v2.9.4.
|
|
255
340
|
v2.9.3.
|
256
341
|
* fix startup failure in Windows due to memory sampler
|
257
342
|
* add JRuby environment information
|
258
|
-
|
343
|
+
|
259
344
|
v2.9.2.
|
260
|
-
* change default apdex_t to 0.5 seconds
|
345
|
+
* change default apdex_t to 0.5 seconds
|
261
346
|
* fix bug in deployments introduced by multi_homed setting
|
262
347
|
* support overriding the log in the agent api
|
263
348
|
* fix JRuby problem using objectspace
|
264
|
-
* display custom parameters when looking at transactions in dev mode
|
349
|
+
* display custom parameters when looking at transactions in dev mode
|
265
350
|
* display count of sql statements on the list of transactions in dev mode
|
266
351
|
* fixes for merb--thanks to Carl Lerche
|
267
352
|
|
@@ -269,14 +354,14 @@ v2.9.1.
|
|
269
354
|
* add newrelic_ignore_apdex method to controller classes to allow
|
270
355
|
you to omit some actions from apdex statistics
|
271
356
|
* Add hook for Passenger shutdown events to get more timely shutdown
|
272
|
-
notices; this will help in more accurate memory readings in
|
357
|
+
notices; this will help in more accurate memory readings in
|
273
358
|
Passenger
|
274
359
|
* add newrelic_notice_error to Object class
|
275
|
-
* optional ability to verify SSL certificates, note that this has some
|
360
|
+
* optional ability to verify SSL certificates, note that this has some
|
276
361
|
performance and reliability implications
|
277
362
|
* support multi-homed host with multiple apps running on duplicate
|
278
363
|
ports
|
279
|
-
|
364
|
+
|
280
365
|
v2.9.0.
|
281
366
|
Noteworthy Enhancements
|
282
367
|
* give visibility to templates and partials in Rails 2.1 and later, in
|
@@ -291,7 +376,7 @@ v2.9.0.
|
|
291
376
|
* add API for system monitoring daemons (refer to KB articles); changed
|
292
377
|
API for manual starting of the agent; refer to
|
293
378
|
NewRelic::Agent.manual_start for details
|
294
|
-
* do certificate verification on ssl connections to
|
379
|
+
* do certificate verification on ssl connections to
|
295
380
|
collector.newrelic.com
|
296
381
|
* support instances appearing in more than one application by allowing a
|
297
382
|
semicolon separated list of names for the newrelic.yml app_name
|
@@ -305,17 +390,17 @@ v2.9.0.
|
|
305
390
|
* added number of queries to transactions in the transaction list
|
306
391
|
* added some sorting options for the transaction list
|
307
392
|
* added a page showing the list of active threads
|
308
|
-
|
393
|
+
|
309
394
|
Compatibility Enhancements
|
310
395
|
* ruby 1.9.1 compatibility
|
311
396
|
* support concurrency when determining busy times, for 2.2 compatibility
|
312
397
|
* in jruby, use Java used heap for memory sampling if the system memory
|
313
398
|
is not accessible from an unsupported platform
|
314
|
-
* jruby will no longer start the agent now when running the console or
|
399
|
+
* jruby will no longer start the agent now when running the console or
|
315
400
|
rake tasks
|
316
401
|
* API support for RPM as a footnote add-in
|
317
402
|
* webrick support restored
|
318
|
-
|
403
|
+
|
319
404
|
Noteworthy bugfixes
|
320
405
|
* sample memory on linux by reading /proc/#{$$}/status file
|
321
406
|
* fixed ambiguous 'View' metrics showing up in controller breakdown
|
@@ -326,7 +411,7 @@ v2.9.0.
|
|
326
411
|
* moved CPU sampler off background thread and onto the harvest thread
|
327
412
|
* tests now run cleanly in any rails app using test:newrelic or
|
328
413
|
test:plugins
|
329
|
-
|
414
|
+
|
330
415
|
Agent improvements to support future RPM enhancements
|
331
416
|
* add instrumentation to capture metrics on response codes; not yet
|
332
417
|
working in rails 2.3.*
|
@@ -397,7 +482,7 @@ v2.8.1.
|
|
397
482
|
symlinked to /usr/bin. Usage: newrelic_cmd deployments --help
|
398
483
|
* Fix issue invoking api when host is not set in newrelic.yml
|
399
484
|
* Fix deployments api so it will work from a gem
|
400
|
-
* Fix thin incompatibility in developer mode
|
485
|
+
* Fix thin incompatibility in developer mode
|
401
486
|
|
402
487
|
v2.8.0.
|
403
488
|
* add beta of api in new_relic_api.rb
|
@@ -405,7 +490,7 @@ v2.8.0.
|
|
405
490
|
* preliminary support for capturing deployment information via capistrano
|
406
491
|
* change memory sampler for solaris to use /usr/bin/ps
|
407
492
|
* allow ERB in newrelic.yml file
|
408
|
-
* merged support for merb into this version
|
493
|
+
* merged support for merb into this version
|
409
494
|
* fix incompatibility in the developer mode with the safe_erb plugin
|
410
495
|
* fix module namespace issue causing an error accessing
|
411
496
|
NewRelic::Instrumentation modules
|
@@ -495,7 +580,7 @@ v2.2.2.
|
|
495
580
|
|
496
581
|
v2.2.1.
|
497
582
|
+ Add rails 2.1 support for Developer Mode
|
498
|
-
+ Changes to memory sampler: Add support for JRuby and fix Solaris support.
|
583
|
+
+ Changes to memory sampler: Add support for JRuby and fix Solaris support.
|
499
584
|
* Stop catching exceptions and start catching StandardError; other exception cleanup
|
500
585
|
* Add protective exception catching to the stats engine
|
501
586
|
* Improved support for thin domain sockets
|
data/LICENSE
CHANGED
@@ -1,4 +1,31 @@
|
|
1
|
-
|
1
|
+
This product includes jquery written by John Resig
|
2
|
+
and distributed under an MIT license.
|
3
|
+
See https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
|
4
|
+
|
5
|
+
Copyright (c) 2011 John Resig, http://jquery.com/
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
8
|
+
a copy of this software and associated documentation files (the
|
9
|
+
"Software"), to deal in the Software without restriction, including
|
10
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
11
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
12
|
+
permit persons to whom the Software is furnished to do so, subject to
|
13
|
+
the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be
|
16
|
+
included in all copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
21
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
22
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
23
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
24
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
25
|
+
|
26
|
+
|
27
|
+
All other components of this product are
|
28
|
+
Copyright (c) 2008-2011 New Relic, Inc. All rights reserved.
|
2
29
|
|
3
30
|
Certain inventions disclosed in this file may be claimed within
|
4
31
|
patents owned or patent applications filed by New Relic, Inc. or third
|
@@ -34,4 +61,4 @@ FITNESS FOR A PARTICULAR PURPOSE, TITLE, or NON-INFRINGEMENT. As a
|
|
34
61
|
condition to your use of these files, you are solely responsible for
|
35
62
|
such use. New Relic will have no liability to you for direct,
|
36
63
|
indirect, consequential, incidental, special, or punitive damages or
|
37
|
-
for lost profits or data.
|
64
|
+
for lost profits or data.
|
data/README.rdoc
CHANGED
@@ -163,7 +163,7 @@ online. Refer to instructions in *Getting Started*, below.
|
|
163
163
|
= Support
|
164
164
|
|
165
165
|
Reach out to us--and to fellow users--at
|
166
|
-
support.newrelic.com[http://support.newrelic.com/
|
166
|
+
support.newrelic.com[http://support.newrelic.com/].
|
167
167
|
There you'll find documentation, FAQs, and forums where you can submit
|
168
168
|
suggestions and discuss New Relic with staff and other users.
|
169
169
|
|
@@ -171,7 +171,7 @@ Also available is community support on IRC: we generally use #newrelic
|
|
171
171
|
on irc.freenode.net
|
172
172
|
|
173
173
|
Find a bug? E-mail support@newrelic.com, or post it to
|
174
|
-
support.newrelic.com[http://support.newrelic.com/
|
174
|
+
support.newrelic.com[http://support.newrelic.com/].
|
175
175
|
|
176
176
|
Thank you, and may your application scale to infinity plus one.
|
177
177
|
|
data/bin/mongrel_rpm
CHANGED
File without changes
|
data/bin/newrelic
CHANGED
File without changes
|
data/bin/newrelic_cmd
CHANGED
File without changes
|
data/lib/new_relic/agent.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
+
require 'forwardable'
|
1
2
|
require 'new_relic/control'
|
2
|
-
|
3
|
+
|
3
4
|
# = New Relic Ruby Agent
|
4
5
|
#
|
5
6
|
# New Relic is a performance monitoring application for applications
|
@@ -58,7 +59,8 @@ module NewRelic
|
|
58
59
|
# support at New Relic for help.
|
59
60
|
module Agent
|
60
61
|
extend self
|
61
|
-
|
62
|
+
extend Forwardable
|
63
|
+
|
62
64
|
require 'new_relic/version'
|
63
65
|
require 'new_relic/local_environment'
|
64
66
|
require 'new_relic/stats'
|
@@ -70,7 +72,6 @@ module NewRelic
|
|
70
72
|
require 'new_relic/transaction_sample'
|
71
73
|
require 'new_relic/url_rule'
|
72
74
|
require 'new_relic/noticed_error'
|
73
|
-
require 'new_relic/histogram'
|
74
75
|
require 'new_relic/timer_lib'
|
75
76
|
|
76
77
|
require 'new_relic/agent'
|
@@ -82,16 +83,20 @@ module NewRelic
|
|
82
83
|
require 'new_relic/agent/worker_loop'
|
83
84
|
require 'new_relic/agent/stats_engine'
|
84
85
|
require 'new_relic/agent/transaction_sampler'
|
86
|
+
require 'new_relic/agent/sql_sampler'
|
85
87
|
require 'new_relic/agent/error_collector'
|
86
88
|
require 'new_relic/agent/busy_calculator'
|
87
89
|
require 'new_relic/agent/sampler'
|
90
|
+
require 'new_relic/agent/database'
|
91
|
+
require 'new_relic/agent/pipe_channel_manager'
|
92
|
+
require 'new_relic/agent/transaction_info'
|
88
93
|
|
89
94
|
require 'new_relic/agent/instrumentation/controller_instrumentation'
|
90
95
|
|
91
96
|
require 'new_relic/agent/samplers/cpu_sampler'
|
92
97
|
require 'new_relic/agent/samplers/memory_sampler'
|
93
98
|
require 'new_relic/agent/samplers/object_sampler'
|
94
|
-
require 'new_relic/agent/samplers/
|
99
|
+
require 'new_relic/agent/samplers/delayed_job_sampler'
|
95
100
|
require 'set'
|
96
101
|
require 'thread'
|
97
102
|
require 'resolv'
|
@@ -122,8 +127,7 @@ module NewRelic
|
|
122
127
|
|
123
128
|
# The singleton Agent instance. Used internally.
|
124
129
|
def agent #:nodoc:
|
125
|
-
raise
|
126
|
-
@agent
|
130
|
+
@agent || raise("Plugin not initialized!")
|
127
131
|
end
|
128
132
|
|
129
133
|
def agent=(new_instance)#:nodoc:
|
@@ -135,21 +139,28 @@ module NewRelic
|
|
135
139
|
# Get or create a statistics gatherer that will aggregate numerical data
|
136
140
|
# under a metric name.
|
137
141
|
#
|
138
|
-
# +metric_name+ should follow a slash separated path convention.
|
142
|
+
# +metric_name+ should follow a slash separated path convention. Application
|
139
143
|
# specific metrics should begin with "Custom/".
|
140
144
|
#
|
141
145
|
# Return a NewRelic::Stats that accepts data
|
142
146
|
# via calls to add_data_point(value).
|
143
147
|
def get_stats(metric_name, use_scope=false)
|
144
|
-
|
148
|
+
agent.stats_engine.get_stats(metric_name, use_scope)
|
145
149
|
end
|
146
150
|
|
147
151
|
alias get_stats_no_scope get_stats
|
148
152
|
|
149
153
|
# Get the logger for the agent. Available after the agent has initialized.
|
150
|
-
# This sends output to the agent log file.
|
154
|
+
# This sends output to the agent log file. If the agent has not initialized
|
155
|
+
# a standard output logger is returned.
|
151
156
|
def logger
|
152
|
-
NewRelic::Control.instance
|
157
|
+
control = NewRelic::Control.instance(false)
|
158
|
+
if control && control.log
|
159
|
+
control.log
|
160
|
+
else
|
161
|
+
require 'logger'
|
162
|
+
@stdoutlog ||= Logger.new $stdout
|
163
|
+
end
|
153
164
|
end
|
154
165
|
|
155
166
|
# Call this to manually start the Agent in situations where the Agent does
|
@@ -169,6 +180,9 @@ module NewRelic
|
|
169
180
|
#
|
170
181
|
def manual_start(options={})
|
171
182
|
raise "Options must be a hash" unless Hash === options
|
183
|
+
if options[:start_channel_listener]
|
184
|
+
NewRelic::Agent::PipeChannelManager.listener.start
|
185
|
+
end
|
172
186
|
NewRelic::Control.instance.init_plugin({ :agent_enabled => true, :sync_startup => true }.merge(options))
|
173
187
|
end
|
174
188
|
|
@@ -184,7 +198,7 @@ module NewRelic
|
|
184
198
|
# jobs or other work. If you are doing this with a web dispatcher
|
185
199
|
# that forks worker processes then you will need to force the
|
186
200
|
# agent to reconnect, which it won't do by default. Passenger and
|
187
|
-
# Unicorn are already handled, nothing special needed for them.
|
201
|
+
# Unicorn and Rainbows are already handled, nothing special needed for them.
|
188
202
|
#
|
189
203
|
# Options:
|
190
204
|
# * <tt>:force_reconnect => true</tt> to force the spawned process to
|
@@ -198,34 +212,17 @@ module NewRelic
|
|
198
212
|
agent.after_fork(options)
|
199
213
|
end
|
200
214
|
|
201
|
-
# Clear out any unsent metric data.
|
215
|
+
# Clear out any unsent metric data. See NewRelic::Agent::Agent#reset_stats
|
202
216
|
def reset_stats
|
203
217
|
agent.reset_stats
|
204
218
|
end
|
205
219
|
|
206
220
|
# Shutdown the agent. Call this before exiting. Sends any queued data
|
207
221
|
# and kills the background thread.
|
208
|
-
def shutdown(options
|
222
|
+
def shutdown(options={})
|
209
223
|
agent.shutdown(options)
|
210
224
|
end
|
211
225
|
|
212
|
-
def save_data
|
213
|
-
NewRelic::DataSerialization.read_and_write_to_file do |old_data|
|
214
|
-
agent.merge_data_from(old_data)
|
215
|
-
agent.serialize
|
216
|
-
end
|
217
|
-
end
|
218
|
-
|
219
|
-
def load_data
|
220
|
-
value = nil
|
221
|
-
NewRelic::DataSerialization.read_and_write_to_file do |old_data|
|
222
|
-
agent.merge_data_from(old_data)
|
223
|
-
value = {:metrics => agent.stats_engine.metrics.length, :traces => agent.unsent_traces_size, :errors => agent.unsent_errors_size}
|
224
|
-
nil # return nil so nothing is written to the file
|
225
|
-
end
|
226
|
-
value
|
227
|
-
end
|
228
|
-
|
229
226
|
# Add instrumentation files to the agent. The argument should be
|
230
227
|
# a glob matching ruby scripts which will be executed at the time
|
231
228
|
# instrumentation is loaded. Since instrumentation is not loaded
|
@@ -251,7 +248,7 @@ module NewRelic
|
|
251
248
|
# end
|
252
249
|
#
|
253
250
|
def set_sql_obfuscator(type = :replace, &block)
|
254
|
-
|
251
|
+
NewRelic::Agent::Database.set_sql_obfuscator(type, &block)
|
255
252
|
end
|
256
253
|
|
257
254
|
|
@@ -288,10 +285,7 @@ module NewRelic
|
|
288
285
|
# any. Only affects the transaction started on this thread once
|
289
286
|
# it has started and before it has completed.
|
290
287
|
def abort_transaction!
|
291
|
-
|
292
|
-
if defined? NewRelic::Agent::Instrumentation::MetricFrame
|
293
|
-
NewRelic::Agent::Instrumentation::MetricFrame.abort_transaction!
|
294
|
-
end
|
288
|
+
NewRelic::Agent::Instrumentation::MetricFrame.abort_transaction!
|
295
289
|
end
|
296
290
|
|
297
291
|
# Yield to the block without collecting any metrics or traces in
|
@@ -310,11 +304,15 @@ module NewRelic
|
|
310
304
|
def is_execution_traced?
|
311
305
|
Thread.current[:newrelic_untraced].nil? || Thread.current[:newrelic_untraced].last != false
|
312
306
|
end
|
313
|
-
|
307
|
+
|
308
|
+
# helper method to check the thread local to determine whether the
|
309
|
+
# transaction in progress is traced or not
|
314
310
|
def is_transaction_traced?
|
315
311
|
Thread::current[:record_tt] != false
|
316
312
|
end
|
317
|
-
|
313
|
+
|
314
|
+
# helper method to check the thread local to determine whether sql
|
315
|
+
# is being recorded or not
|
318
316
|
def is_sql_recorded?
|
319
317
|
Thread::current[:record_sql] != false
|
320
318
|
end
|
@@ -356,6 +354,19 @@ module NewRelic
|
|
356
354
|
def add_custom_parameters(params)
|
357
355
|
NewRelic::Agent::Instrumentation::MetricFrame.add_custom_parameters(params)
|
358
356
|
end
|
357
|
+
|
358
|
+
# Set attributes about the user making this request. These attributes will be automatically
|
359
|
+
# appended to any Transaction Trace or Error that is collected. These attributes
|
360
|
+
# will also be collected for RUM requests.
|
361
|
+
#
|
362
|
+
# Attributes (hash)
|
363
|
+
# * <tt>:user</tt> => user name or ID
|
364
|
+
# * <tt>:account</tt> => account name or ID
|
365
|
+
# * <tt>:product</tt> => product name or level
|
366
|
+
#
|
367
|
+
def set_user_attributes(attributes)
|
368
|
+
NewRelic::Agent::Instrumentation::MetricFrame.set_user_attributes(attributes)
|
369
|
+
end
|
359
370
|
|
360
371
|
# The #add_request_parameters method is aliased to #add_custom_parameters
|
361
372
|
# and is now deprecated.
|
@@ -418,6 +429,7 @@ module NewRelic
|
|
418
429
|
def browser_timing_footer
|
419
430
|
agent.browser_timing_footer
|
420
431
|
end
|
421
|
-
|
432
|
+
|
433
|
+
def_delegator :'NewRelic::Agent::PipeChannelManager', :register_report_channel
|
422
434
|
end
|
423
435
|
end
|