techarch-newrelic_rpm 2.10.2.2 → 2.10.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,76 @@
1
+ require 'new_relic/agent/instrumentation/controller_instrumentation'
2
+
3
+ module NewRelic
4
+ module Agent
5
+ module Instrumentation
6
+ # == Instrumentation for Camping
7
+ # To instrument all controllers do the following:
8
+ # 1. Add the necessary NewRelic-specific requires in your require section
9
+ # 2. Add an include at the end of your main Camping app module
10
+ # 3. Add a call to NewRelic::Agent.manual_start at the end of the file to start the agent
11
+ # 4. Run the following command to get the NewRelic license key to use: heroku config -all
12
+ # 5. Create a newrelic.yml under the /config folder with the following content:
13
+ #
14
+ # common: &default_settings
15
+ # license_key: 'PASTE THE VALUE OF NEW_RELIC_LICENSE_KEY HERE'
16
+ # agent_enabled: true
17
+ # app_name: PASTE THE NAME OF YOUR CAMPING APP HERE
18
+ # enabled: true
19
+ #
20
+ # production:
21
+ # <<: *default_settings
22
+ # enabled: true
23
+ #
24
+ # Camping code example:
25
+ # --------------------------------------------------------------------------------------
26
+ # require "newrelic_rpm"
27
+ # require 'new_relic/agent/agent'
28
+ # require 'new_relic/agent/instrumentation/controller_instrumentation'
29
+ # require 'new_relic/agent/instrumentation/camping'
30
+ #
31
+ # Camping.goes :NewRelicCampingTest
32
+ #
33
+ # module NewRelicCampingTest
34
+ # # your code
35
+ #
36
+ # include NewRelic::Agent::Instrumentation::ControllerInstrumentation
37
+ # include NewRelic::Agent::Instrumentation::Camping
38
+ # end
39
+ #
40
+ # NewRelic::Agent.manual_start
41
+ #
42
+
43
+ module Camping
44
+
45
+ def self.included(mod)
46
+
47
+ # Since the Camping::Base module is essentially copied
48
+ # into the main module (the mod passed in) of a Camping app
49
+ # using the Camping.goes :NewRelicCampingTest syntax
50
+ # we need to evaluate "weld" the NewRelic plugin in the context of the new Base
51
+
52
+ (Kernel.const_get(mod.name)::Base).module_eval do
53
+
54
+ # Add the new method to the Camping app's Base module
55
+ # since the Camping::Base module is being included
56
+ # in every Camping controller
57
+
58
+ def service_with_newrelic(*args)
59
+ perform_action_with_newrelic_trace(:category => :rack) do
60
+ service_without_newrelic(*args)
61
+ end
62
+ end
63
+
64
+ # Alias the "standard" service method
65
+ # so we can provide a level of indirection
66
+ # to perform the tracing for NewRelic
67
+
68
+ alias service_without_newrelic service
69
+ alias service service_with_newrelic
70
+ end
71
+ end
72
+
73
+ end #NewRelic::Agent::Instrumentation::Camping
74
+ end
75
+ end
76
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{techarch-newrelic_rpm}
5
- s.version = "2.10.2.2"
5
+ s.version = "2.10.2.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Bill Kayser" , "Philippe F. Monnet"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.date = %q{2009-11-04}
11
11
  s.description = %q{New Relic Ruby Performance Monitoring Agent}
12
12
  s.executables = ["mongrel_rpm", "newrelic_cmd"]
13
- s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.md", "bin/mongrel_rpm", "bin/newrelic_cmd", "lib/new_relic/agent.rb", "lib/new_relic/agent/agent.rb", "lib/new_relic/agent/chained_call.rb", "lib/new_relic/agent/collection_helper.rb", "lib/new_relic/agent/error_collector.rb", "lib/new_relic/agent/instrumentation/active_merchant.rb", "lib/new_relic/agent/instrumentation/active_record_instrumentation.rb", "lib/new_relic/agent/instrumentation/authlogic.rb", "lib/new_relic/agent/instrumentation/controller_instrumentation.rb", "lib/new_relic/agent/instrumentation/data_mapper.rb", "lib/new_relic/agent/instrumentation/dispatcher_instrumentation.rb", "lib/new_relic/agent/instrumentation/memcache.rb", "lib/new_relic/agent/instrumentation/merb/controller.rb", "lib/new_relic/agent/instrumentation/merb/dispatcher.rb", "lib/new_relic/agent/instrumentation/merb/errors.rb", "lib/new_relic/agent/instrumentation/net.rb", "lib/new_relic/agent/instrumentation/passenger_instrumentation.rb", "lib/new_relic/agent/instrumentation/rack.rb", "lib/new_relic/agent/instrumentation/rails/action_controller.rb", "lib/new_relic/agent/instrumentation/rails/action_web_service.rb", "lib/new_relic/agent/instrumentation/rails/dispatcher.rb", "lib/new_relic/agent/instrumentation/rails/errors.rb", "lib/new_relic/agent/instrumentation/sinatra.rb", "lib/new_relic/agent/method_tracer.rb", "lib/new_relic/agent/patch_const_missing.rb", "lib/new_relic/agent/sampler.rb", "lib/new_relic/agent/samplers/cpu_sampler.rb", "lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb", "lib/new_relic/agent/samplers/memory_sampler.rb", "lib/new_relic/agent/samplers/mongrel_sampler.rb", "lib/new_relic/agent/samplers/object_sampler.rb", "lib/new_relic/agent/shim_agent.rb", "lib/new_relic/agent/stats_engine.rb", "lib/new_relic/agent/stats_engine/metric_stats.rb", "lib/new_relic/agent/stats_engine/samplers.rb", "lib/new_relic/agent/stats_engine/transactions.rb", "lib/new_relic/agent/transaction_sampler.rb", "lib/new_relic/agent/worker_loop.rb", "lib/new_relic/commands/deployments.rb", "lib/new_relic/commands/new_relic_commands.rb", "lib/new_relic/control.rb", "lib/new_relic/control/external.rb", "lib/new_relic/control/merb.rb", "lib/new_relic/control/rails.rb", "lib/new_relic/control/ruby.rb", "lib/new_relic/control/sinatra.rb", "lib/new_relic/histogram.rb", "lib/new_relic/local_environment.rb", "lib/new_relic/merbtasks.rb", "lib/new_relic/metric_data.rb", "lib/new_relic/metric_parser.rb", "lib/new_relic/metric_parser/action_mailer.rb", "lib/new_relic/metric_parser/active_merchant.rb", "lib/new_relic/metric_parser/active_record.rb", "lib/new_relic/metric_parser/controller.rb", "lib/new_relic/metric_parser/controller_cpu.rb", "lib/new_relic/metric_parser/errors.rb", "lib/new_relic/metric_parser/external.rb", "lib/new_relic/metric_parser/mem_cache.rb", "lib/new_relic/metric_parser/view.rb", "lib/new_relic/metric_parser/web_frontend.rb", "lib/new_relic/metric_parser/web_service.rb", "lib/new_relic/metric_spec.rb", "lib/new_relic/metrics.rb", "lib/new_relic/noticed_error.rb", "lib/new_relic/rack/metric_app.rb", "lib/new_relic/rack/newrelic.ru", "lib/new_relic/rack/newrelic.yml", "lib/new_relic/rack_app.rb", "lib/new_relic/recipes.rb", "lib/new_relic/stats.rb", "lib/new_relic/transaction_analysis.rb", "lib/new_relic/transaction_sample.rb", "lib/new_relic/version.rb", "lib/new_relic_api.rb", "lib/newrelic_rpm.rb", "lib/tasks/all.rb", "lib/tasks/install.rake", "lib/tasks/tests.rake"]
13
+ s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.md", "bin/mongrel_rpm", "bin/newrelic_cmd", "lib/new_relic/agent.rb", "lib/new_relic/agent/agent.rb", "lib/new_relic/agent/chained_call.rb", "lib/new_relic/agent/collection_helper.rb", "lib/new_relic/agent/error_collector.rb", "lib/new_relic/agent/instrumentation/active_merchant.rb", "lib/new_relic/agent/instrumentation/active_record_instrumentation.rb", "lib/new_relic/agent/instrumentation/authlogic.rb", "lib/new_relic/agent/instrumentation/controller_instrumentation.rb", "lib/new_relic/agent/instrumentation/data_mapper.rb", "lib/new_relic/agent/instrumentation/dispatcher_instrumentation.rb", "lib/new_relic/agent/instrumentation/memcache.rb", "lib/new_relic/agent/instrumentation/merb/controller.rb", "lib/new_relic/agent/instrumentation/merb/dispatcher.rb", "lib/new_relic/agent/instrumentation/merb/errors.rb", "lib/new_relic/agent/instrumentation/net.rb", "lib/new_relic/agent/instrumentation/passenger_instrumentation.rb", "lib/new_relic/agent/instrumentation/rack.rb", "lib/new_relic/agent/instrumentation/rails/action_controller.rb", "lib/new_relic/agent/instrumentation/rails/action_web_service.rb", "lib/new_relic/agent/instrumentation/rails/dispatcher.rb", "lib/new_relic/agent/instrumentation/rails/errors.rb", "lib/new_relic/agent/instrumentation/camping.rb", "lib/new_relic/agent/instrumentation/sinatra.rb", "lib/new_relic/agent/method_tracer.rb", "lib/new_relic/agent/patch_const_missing.rb", "lib/new_relic/agent/sampler.rb", "lib/new_relic/agent/samplers/cpu_sampler.rb", "lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb", "lib/new_relic/agent/samplers/memory_sampler.rb", "lib/new_relic/agent/samplers/mongrel_sampler.rb", "lib/new_relic/agent/samplers/object_sampler.rb", "lib/new_relic/agent/shim_agent.rb", "lib/new_relic/agent/stats_engine.rb", "lib/new_relic/agent/stats_engine/metric_stats.rb", "lib/new_relic/agent/stats_engine/samplers.rb", "lib/new_relic/agent/stats_engine/transactions.rb", "lib/new_relic/agent/transaction_sampler.rb", "lib/new_relic/agent/worker_loop.rb", "lib/new_relic/commands/deployments.rb", "lib/new_relic/commands/new_relic_commands.rb", "lib/new_relic/control.rb", "lib/new_relic/control/external.rb", "lib/new_relic/control/merb.rb", "lib/new_relic/control/rails.rb", "lib/new_relic/control/ruby.rb", "lib/new_relic/control/sinatra.rb", "lib/new_relic/histogram.rb", "lib/new_relic/local_environment.rb", "lib/new_relic/merbtasks.rb", "lib/new_relic/metric_data.rb", "lib/new_relic/metric_parser.rb", "lib/new_relic/metric_parser/action_mailer.rb", "lib/new_relic/metric_parser/active_merchant.rb", "lib/new_relic/metric_parser/active_record.rb", "lib/new_relic/metric_parser/controller.rb", "lib/new_relic/metric_parser/controller_cpu.rb", "lib/new_relic/metric_parser/errors.rb", "lib/new_relic/metric_parser/external.rb", "lib/new_relic/metric_parser/mem_cache.rb", "lib/new_relic/metric_parser/view.rb", "lib/new_relic/metric_parser/web_frontend.rb", "lib/new_relic/metric_parser/web_service.rb", "lib/new_relic/metric_spec.rb", "lib/new_relic/metrics.rb", "lib/new_relic/noticed_error.rb", "lib/new_relic/rack/metric_app.rb", "lib/new_relic/rack/newrelic.ru", "lib/new_relic/rack/newrelic.yml", "lib/new_relic/rack_app.rb", "lib/new_relic/recipes.rb", "lib/new_relic/stats.rb", "lib/new_relic/transaction_analysis.rb", "lib/new_relic/transaction_sample.rb", "lib/new_relic/version.rb", "lib/new_relic_api.rb", "lib/newrelic_rpm.rb", "lib/tasks/all.rb", "lib/tasks/install.rake", "lib/tasks/tests.rake"]
14
14
  s.files = ["CHANGELOG", "LICENSE", "README.md", "Rakefile", "bin/mongrel_rpm", "bin/newrelic_cmd", "cert/cacert.pem", "init.rb", "install.rb", "lib/new_relic/agent.rb", "lib/new_relic/agent/agent.rb", "lib/new_relic/agent/chained_call.rb", "lib/new_relic/agent/collection_helper.rb", "lib/new_relic/agent/error_collector.rb", "lib/new_relic/agent/instrumentation/active_merchant.rb", "lib/new_relic/agent/instrumentation/active_record_instrumentation.rb", "lib/new_relic/agent/instrumentation/authlogic.rb", "lib/new_relic/agent/instrumentation/controller_instrumentation.rb", "lib/new_relic/agent/instrumentation/data_mapper.rb", "lib/new_relic/agent/instrumentation/dispatcher_instrumentation.rb", "lib/new_relic/agent/instrumentation/memcache.rb", "lib/new_relic/agent/instrumentation/merb/controller.rb", "lib/new_relic/agent/instrumentation/merb/dispatcher.rb", "lib/new_relic/agent/instrumentation/merb/errors.rb", "lib/new_relic/agent/instrumentation/net.rb", "lib/new_relic/agent/instrumentation/passenger_instrumentation.rb", "lib/new_relic/agent/instrumentation/rack.rb", "lib/new_relic/agent/instrumentation/rails/action_controller.rb", "lib/new_relic/agent/instrumentation/rails/action_web_service.rb", "lib/new_relic/agent/instrumentation/rails/dispatcher.rb", "lib/new_relic/agent/instrumentation/rails/errors.rb", "lib/new_relic/agent/instrumentation/sinatra.rb", "lib/new_relic/agent/method_tracer.rb", "lib/new_relic/agent/patch_const_missing.rb", "lib/new_relic/agent/sampler.rb", "lib/new_relic/agent/samplers/cpu_sampler.rb", "lib/new_relic/agent/samplers/memory_sampler.rb", "lib/new_relic/agent/samplers/mongrel_sampler.rb", "lib/new_relic/agent/shim_agent.rb", "lib/new_relic/agent/stats_engine.rb", "lib/new_relic/agent/stats_engine/metric_stats.rb", "lib/new_relic/agent/stats_engine/samplers.rb", "lib/new_relic/agent/stats_engine/transactions.rb", "lib/new_relic/agent/transaction_sampler.rb", "lib/new_relic/agent/worker_loop.rb", "lib/new_relic/commands/deployments.rb", "lib/new_relic/commands/new_relic_commands.rb", "lib/new_relic/control.rb", "lib/new_relic/control/external.rb", "lib/new_relic/control/merb.rb", "lib/new_relic/control/rails.rb", "lib/new_relic/control/ruby.rb", "lib/new_relic/control/sinatra.rb", "lib/new_relic/histogram.rb", "lib/new_relic/local_environment.rb", "lib/new_relic/merbtasks.rb", "lib/new_relic/metric_data.rb", "lib/new_relic/metric_parser.rb", "lib/new_relic/metric_parser/action_mailer.rb", "lib/new_relic/metric_parser/active_merchant.rb", "lib/new_relic/metric_parser/active_record.rb", "lib/new_relic/metric_parser/controller.rb", "lib/new_relic/metric_parser/controller_cpu.rb", "lib/new_relic/metric_parser/errors.rb", "lib/new_relic/metric_parser/external.rb", "lib/new_relic/metric_parser/mem_cache.rb", "lib/new_relic/metric_parser/view.rb", "lib/new_relic/metric_parser/web_frontend.rb", "lib/new_relic/metric_parser/web_service.rb", "lib/new_relic/metric_spec.rb", "lib/new_relic/metrics.rb", "lib/new_relic/noticed_error.rb", "lib/new_relic/rack/metric_app.rb", "lib/new_relic/rack/newrelic.ru", "lib/new_relic/rack/newrelic.yml", "lib/new_relic/rack_app.rb", "lib/new_relic/recipes.rb", "lib/new_relic/stats.rb", "lib/new_relic/transaction_analysis.rb", "lib/new_relic/transaction_sample.rb", "lib/new_relic/version.rb", "lib/new_relic_api.rb", "lib/newrelic_rpm.rb", "lib/tasks/all.rb", "lib/tasks/install.rake", "lib/tasks/tests.rake", "newrelic.yml", "recipes/newrelic.rb", "test/active_record_fixtures.rb", "test/config/newrelic.yml", "test/config/test_control.rb", "test/new_relic/agent/active_record_instrumentation_test.rb", "test/new_relic/agent/agent_controller_test.rb", "test/new_relic/agent/agent_test.rb", "test/new_relic/agent/agent_test_controller.rb", "test/new_relic/agent/classloader_patch_test.rb", "test/new_relic/agent/collection_helper_test.rb", "test/new_relic/agent/dispatcher_instrumentation_test.rb", "test/new_relic/agent/error_collector_test.rb", "test/new_relic/agent/method_tracer_test.rb", "test/new_relic/agent/metric_data_test.rb", "test/new_relic/agent/mock_ar_connection.rb", "test/new_relic/agent/mock_scope_listener.rb", "test/new_relic/agent/net_instrumentation_test.rb", "test/new_relic/agent/stats_engine/metric_stats_test.rb", "test/new_relic/agent/stats_engine/samplers_test.rb", "test/new_relic/agent/stats_engine/stats_engine_test.rb", "test/new_relic/agent/task_instrumentation_test.rb", "test/new_relic/agent/testable_agent.rb", "test/new_relic/agent/transaction_sample_builder_test.rb", "test/new_relic/agent/transaction_sample_test.rb", "test/new_relic/agent/transaction_sampler_test.rb", "test/new_relic/agent/worker_loop_test.rb", "test/new_relic/control_test.rb", "test/new_relic/deployments_api_test.rb", "test/new_relic/environment_test.rb", "test/new_relic/metric_parser_test.rb", "test/new_relic/metric_spec_test.rb", "test/new_relic/shim_agent_test.rb", "test/new_relic/stats_test.rb", "test/new_relic/version_number_test.rb", "test/test_helper.rb", "test/ui/newrelic_controller_test.rb", "test/ui/newrelic_helper_test.rb", "ui/controllers/newrelic_controller.rb", "ui/helpers/google_pie_chart.rb", "ui/helpers/newrelic_helper.rb", "ui/views/layouts/newrelic_default.rhtml", "ui/views/newrelic/_explain_plans.rhtml", "ui/views/newrelic/_sample.rhtml", "ui/views/newrelic/_segment.rhtml", "ui/views/newrelic/_segment_limit_message.rhtml", "ui/views/newrelic/_segment_row.rhtml", "ui/views/newrelic/_show_sample_detail.rhtml", "ui/views/newrelic/_show_sample_sql.rhtml", "ui/views/newrelic/_show_sample_summary.rhtml", "ui/views/newrelic/_sql_row.rhtml", "ui/views/newrelic/_stack_trace.rhtml", "ui/views/newrelic/_table.rhtml", "ui/views/newrelic/explain_sql.rhtml", "ui/views/newrelic/images/arrow-close.png", "ui/views/newrelic/images/arrow-open.png", "ui/views/newrelic/images/blue_bar.gif", "ui/views/newrelic/images/file_icon.png", "ui/views/newrelic/images/gray_bar.gif", "ui/views/newrelic/images/new_relic_rpm_desktop.gif", "ui/views/newrelic/images/textmate.png", "ui/views/newrelic/index.rhtml", "ui/views/newrelic/javascript/prototype-scriptaculous.js", "ui/views/newrelic/javascript/transaction_sample.js", "ui/views/newrelic/sample_not_found.rhtml", "ui/views/newrelic/show_sample.rhtml", "ui/views/newrelic/show_source.rhtml", "ui/views/newrelic/stylesheets/style.css", "ui/views/newrelic/threads.rhtml", "Manifest", "techarch-newrelic_rpm.gemspec"]
15
15
  s.homepage = %q{http://www.newrelic.com}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "techarch-newrelic_rpm", "--main", "README.md"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: techarch-newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.2.2
4
+ version: 2.10.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Kayser
@@ -51,6 +51,7 @@ extra_rdoc_files:
51
51
  - lib/new_relic/agent/instrumentation/rails/action_web_service.rb
52
52
  - lib/new_relic/agent/instrumentation/rails/dispatcher.rb
53
53
  - lib/new_relic/agent/instrumentation/rails/errors.rb
54
+ - lib/new_relic/agent/instrumentation/camping.rb
54
55
  - lib/new_relic/agent/instrumentation/sinatra.rb
55
56
  - lib/new_relic/agent/method_tracer.rb
56
57
  - lib/new_relic/agent/patch_const_missing.rb
@@ -266,6 +267,7 @@ files:
266
267
  - ui/views/newrelic/threads.rhtml
267
268
  - Manifest
268
269
  - techarch-newrelic_rpm.gemspec
270
+ - lib/new_relic/agent/instrumentation/camping.rb
269
271
  - lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb
270
272
  - lib/new_relic/agent/samplers/object_sampler.rb
271
273
  has_rdoc: true