newrelic_rpm 3.5.8.72 → 3.6.0.74.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGELOG +16 -0
- data/LICENSE +70 -6
- data/init.rb +4 -0
- data/install.rb +4 -0
- data/lib/conditional_vendored_dependency_detection.rb +4 -0
- data/lib/conditional_vendored_metric_parser.rb +4 -0
- data/lib/new_relic/agent/agent.rb +10 -7
- data/lib/new_relic/agent/agent_logger.rb +4 -0
- data/lib/new_relic/agent/audit_logger.rb +4 -0
- data/lib/new_relic/agent/beacon_configuration.rb +4 -0
- data/lib/new_relic/agent/browser_monitoring.rb +4 -0
- data/lib/new_relic/agent/busy_calculator.rb +7 -6
- data/lib/new_relic/agent/chained_call.rb +4 -0
- data/lib/new_relic/agent/configuration/defaults.rb +4 -0
- data/lib/new_relic/agent/configuration/environment_source.rb +4 -0
- data/lib/new_relic/agent/configuration/manager.rb +4 -0
- data/lib/new_relic/agent/configuration/mask_defaults.rb +4 -0
- data/lib/new_relic/agent/configuration/server_source.rb +4 -0
- data/lib/new_relic/agent/configuration/yaml_source.rb +5 -1
- data/lib/new_relic/agent/configuration.rb +4 -0
- data/lib/new_relic/agent/cross_app_monitor.rb +9 -10
- data/lib/new_relic/agent/cross_app_tracing.rb +6 -18
- data/lib/new_relic/agent/database.rb +4 -0
- data/lib/new_relic/agent/error_collector.rb +23 -10
- data/lib/new_relic/agent/event_listener.rb +4 -0
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +4 -0
- data/lib/new_relic/agent/instrumentation/active_record.rb +4 -0
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +4 -0
- data/lib/new_relic/agent/instrumentation/authlogic.rb +4 -0
- data/lib/new_relic/agent/instrumentation/browser_monitoring_timings.rb +4 -0
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +5 -8
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +5 -1
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +4 -0
- data/lib/new_relic/agent/instrumentation/memcache.rb +4 -0
- data/lib/new_relic/agent/instrumentation/merb/controller.rb +4 -0
- data/lib/new_relic/agent/instrumentation/merb/errors.rb +4 -0
- data/lib/new_relic/agent/instrumentation/metric_frame/pop.rb +5 -1
- data/lib/new_relic/agent/instrumentation/metric_frame.rb +15 -18
- data/lib/new_relic/agent/instrumentation/net.rb +4 -2
- data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +4 -0
- data/lib/new_relic/agent/instrumentation/queue_time.rb +6 -2
- data/lib/new_relic/agent/instrumentation/rack.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails/errors.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails3/errors.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +26 -0
- data/lib/new_relic/agent/instrumentation/resque.rb +4 -0
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +36 -0
- data/lib/new_relic/agent/instrumentation/sinatra.rb +4 -0
- data/lib/new_relic/agent/instrumentation/sunspot.rb +4 -0
- data/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb +4 -0
- data/lib/new_relic/agent/instrumentation.rb +4 -0
- data/lib/new_relic/agent/method_tracer.rb +26 -31
- data/lib/new_relic/agent/new_relic_service.rb +7 -6
- data/lib/new_relic/agent/pipe_channel_manager.rb +58 -15
- data/lib/new_relic/agent/pipe_service.rb +13 -6
- data/lib/new_relic/agent/rules_engine.rb +4 -0
- data/lib/new_relic/agent/sampler.rb +4 -0
- data/lib/new_relic/agent/samplers/cpu_sampler.rb +20 -12
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +15 -12
- data/lib/new_relic/agent/samplers/memory_sampler.rb +9 -5
- data/lib/new_relic/agent/samplers/object_sampler.rb +6 -6
- data/lib/new_relic/agent/shim_agent.rb +4 -0
- data/lib/new_relic/agent/sql_sampler.rb +4 -0
- data/lib/new_relic/agent/stats.rb +3 -0
- data/lib/new_relic/agent/stats_engine/gc_profiler.rb +8 -4
- data/lib/new_relic/agent/stats_engine/metric_stats.rb +13 -13
- data/lib/new_relic/agent/stats_engine/samplers.rb +6 -3
- data/lib/new_relic/agent/stats_engine/stats_hash.rb +4 -0
- data/lib/new_relic/agent/stats_engine/transactions.rb +4 -0
- data/lib/new_relic/agent/stats_engine.rb +4 -0
- data/lib/new_relic/agent/thread.rb +4 -0
- data/lib/new_relic/agent/thread_profiler.rb +4 -0
- data/lib/new_relic/agent/transaction_info.rb +4 -0
- data/lib/new_relic/agent/transaction_sample_builder.rb +4 -0
- data/lib/new_relic/agent/transaction_sampler.rb +4 -0
- data/lib/new_relic/agent/worker_loop.rb +4 -0
- data/lib/new_relic/agent.rb +7 -3
- data/lib/new_relic/build.rb +2 -2
- data/lib/new_relic/coerce.rb +4 -0
- data/lib/new_relic/collection_helper.rb +4 -0
- data/lib/new_relic/command.rb +4 -0
- data/lib/new_relic/commands/deployments.rb +4 -0
- data/lib/new_relic/commands/install.rb +4 -0
- data/lib/new_relic/control/class_methods.rb +4 -0
- data/lib/new_relic/control/frameworks/external.rb +4 -0
- data/lib/new_relic/control/frameworks/merb.rb +4 -0
- data/lib/new_relic/control/frameworks/rails.rb +4 -0
- data/lib/new_relic/control/frameworks/rails3.rb +4 -0
- data/lib/new_relic/control/frameworks/rails4.rb +4 -0
- data/lib/new_relic/control/frameworks/ruby.rb +4 -0
- data/lib/new_relic/control/frameworks/sinatra.rb +4 -0
- data/lib/new_relic/control/frameworks.rb +4 -0
- data/lib/new_relic/control/instance_methods.rb +4 -0
- data/lib/new_relic/control/instrumentation.rb +4 -0
- data/lib/new_relic/control/profiling.rb +4 -0
- data/lib/new_relic/control/server_methods.rb +4 -0
- data/lib/new_relic/control.rb +4 -0
- data/lib/new_relic/delayed_job_injection.rb +4 -0
- data/lib/new_relic/helper.rb +4 -1
- data/lib/new_relic/language_support.rb +4 -0
- data/lib/new_relic/latest_changes.rb +5 -1
- data/lib/new_relic/local_environment.rb +18 -1
- data/lib/new_relic/merbtasks.rb +4 -0
- data/lib/new_relic/metric_data.rb +4 -0
- data/lib/new_relic/metric_spec.rb +4 -0
- data/lib/new_relic/metrics.rb +4 -0
- data/lib/new_relic/noticed_error.rb +4 -0
- data/lib/new_relic/okjson.rb +4 -1
- data/lib/new_relic/rack/agent_hooks.rb +4 -0
- data/lib/new_relic/rack/browser_monitoring.rb +4 -0
- data/lib/new_relic/rack/developer_mode.rb +4 -0
- data/lib/new_relic/rack/error_collector.rb +4 -0
- data/lib/new_relic/rack.rb +4 -0
- data/lib/new_relic/recipes.rb +4 -0
- data/lib/new_relic/timer_lib.rb +4 -0
- data/lib/new_relic/transaction_analysis/segment_summary.rb +4 -0
- data/lib/new_relic/transaction_analysis.rb +4 -0
- data/lib/new_relic/transaction_sample/composite_segment.rb +4 -0
- data/lib/new_relic/transaction_sample/fake_segment.rb +4 -0
- data/lib/new_relic/transaction_sample/segment.rb +4 -0
- data/lib/new_relic/transaction_sample/summary_segment.rb +4 -0
- data/lib/new_relic/transaction_sample.rb +4 -0
- data/lib/new_relic/url_rule.rb +4 -0
- data/lib/new_relic/version.rb +6 -2
- data/lib/newrelic_rpm.rb +4 -0
- data/lib/tasks/all.rb +4 -0
- data/recipes/newrelic.rb +4 -0
- data/test/active_record_fixtures.rb +4 -0
- data/test/config/test_control.rb +4 -0
- data/test/intentional_fail.rb +4 -0
- data/test/multiverse/lib/multiverse/color.rb +4 -0
- data/test/multiverse/lib/multiverse/envfile.rb +4 -0
- data/test/multiverse/lib/multiverse/environment.rb +4 -0
- data/test/multiverse/lib/multiverse/output_collector.rb +4 -0
- data/test/multiverse/lib/multiverse/runner.rb +4 -0
- data/test/multiverse/lib/multiverse/suite.rb +4 -0
- data/test/multiverse/suites/active_record/ar_method_aliasing.rb +4 -0
- data/test/multiverse/suites/active_record/encoding_test.rb +4 -0
- data/test/multiverse/suites/agent_only/audit_log_test.rb +4 -0
- data/test/multiverse/suites/agent_only/cross_application_tracing_test.rb +4 -0
- data/test/multiverse/suites/agent_only/http_response_code_test.rb +4 -0
- data/test/multiverse/suites/agent_only/key_transactions_test.rb +4 -0
- data/test/multiverse/suites/agent_only/logging_test.rb +4 -0
- data/test/multiverse/suites/agent_only/marshaling_test.rb +4 -0
- data/test/multiverse/suites/agent_only/method_visibility_test.rb +4 -0
- data/test/multiverse/suites/agent_only/no_dns_resolv.rb +4 -0
- data/test/multiverse/suites/agent_only/pipe_manager_test.rb +4 -0
- data/test/multiverse/suites/agent_only/rename_rule_test.rb +4 -0
- data/test/multiverse/suites/agent_only/rum_instrumentation_test.rb +4 -0
- data/test/multiverse/suites/agent_only/service_timeout_test.rb +4 -0
- data/test/multiverse/suites/agent_only/ssl_test.rb +4 -0
- data/test/multiverse/suites/agent_only/start_up_test.rb +4 -0
- data/test/multiverse/suites/agent_only/test_trace_method_with_punctuation.rb +4 -0
- data/test/multiverse/suites/agent_only/test_trace_transaction_with_punctuation.rb +4 -0
- data/test/multiverse/suites/agent_only/testing_app.rb +4 -0
- data/test/multiverse/suites/agent_only/thread_profiling_test.rb +4 -0
- data/test/multiverse/suites/config_file_loading/config_file_loading_test.rb +4 -0
- data/test/multiverse/suites/datamapper/encoding_test.rb +4 -0
- data/test/multiverse/suites/rails/app.rb +4 -0
- data/test/multiverse/suites/rails/error_tracing_test.rb +4 -0
- data/test/multiverse/suites/rails/gc_instrumentation_test.rb +4 -0
- data/test/multiverse/suites/rails/queue_time_test.rb +4 -0
- data/test/multiverse/suites/rails/view_instrumentation_test.rb +4 -0
- data/test/multiverse/suites/resque/instrumentation_test.rb +5 -1
- data/test/multiverse/suites/resque/resque_setup.rb +4 -0
- data/test/multiverse/suites/sidekiq/Envfile +21 -0
- data/test/multiverse/suites/sidekiq/app.rb +25 -0
- data/test/multiverse/suites/sidekiq/config/newrelic.yml +22 -0
- data/test/multiverse/suites/sidekiq/log/.gitkeep +0 -0
- data/test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb +137 -0
- data/test/multiverse/suites/sinatra/sinatra_error_tracing_test.rb +4 -0
- data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +4 -0
- data/test/multiverse/suites/sinatra/sinatra_routes_test.rb +4 -0
- data/test/multiverse/suites/sinatra/sinatra_test.rb +4 -0
- data/test/multiverse/test/multiverse_test.rb +4 -0
- data/test/multiverse/test/suite_examples/one/a/a_test.rb +4 -0
- data/test/multiverse/test/suite_examples/one/b/b_test.rb +4 -0
- data/test/multiverse/test/suite_examples/three/a/fail_test.rb +4 -0
- data/test/multiverse/test/suite_examples/three/b/win_test.rb +4 -0
- data/test/multiverse/test/suite_examples/two/a/fail_test.rb +4 -0
- data/test/new_relic/agent/agent/connect_test.rb +4 -0
- data/test/new_relic/agent/agent/start_test.rb +4 -0
- data/test/new_relic/agent/agent/start_worker_thread_test.rb +4 -0
- data/test/new_relic/agent/agent_logger_test.rb +4 -0
- data/test/new_relic/agent/agent_test.rb +6 -1
- data/test/new_relic/agent/agent_test_controller.rb +4 -0
- data/test/new_relic/agent/agent_test_controller_test.rb +4 -0
- data/test/new_relic/agent/apdex_from_server_test.rb +4 -0
- data/test/new_relic/agent/audit_logger_test.rb +4 -0
- data/test/new_relic/agent/beacon_configuration_test.rb +4 -0
- data/test/new_relic/agent/browser_monitoring_test.rb +4 -0
- data/test/new_relic/agent/busy_calculator_test.rb +6 -2
- data/test/new_relic/agent/configuration/environment_source_test.rb +4 -0
- data/test/new_relic/agent/configuration/manager_test.rb +4 -0
- data/test/new_relic/agent/configuration/server_source_test.rb +4 -0
- data/test/new_relic/agent/configuration/yaml_source_test.rb +4 -0
- data/test/new_relic/agent/cross_app_monitor_test.rb +12 -8
- data/test/new_relic/agent/database_test.rb +4 -0
- data/test/new_relic/agent/error_collector/notice_error_test.rb +4 -0
- data/test/new_relic/agent/error_collector_test.rb +4 -0
- data/test/new_relic/agent/event_listener_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/browser_monitoring_timings_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/instrumentation_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/metric_frame/pop_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/metric_frame_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/net_instrumentation_test.rb +3 -0
- data/test/new_relic/agent/instrumentation/queue_time_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/rack_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/sinatra_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/memcache_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +4 -0
- data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +48 -26
- data/test/new_relic/agent/method_tracer_test.rb +4 -0
- data/test/new_relic/agent/mock_scope_listener.rb +4 -0
- data/test/new_relic/agent/new_relic_service_test.rb +4 -0
- data/test/new_relic/agent/pipe_channel_manager_test.rb +24 -6
- data/test/new_relic/agent/pipe_service_test.rb +6 -10
- data/test/new_relic/agent/rpm_agent_test.rb +4 -0
- data/test/new_relic/agent/rules_engine_test.rb +4 -0
- data/test/new_relic/agent/sampler_test.rb +4 -0
- data/test/new_relic/agent/shim_agent_test.rb +4 -0
- data/test/new_relic/agent/sql_sampler_test.rb +4 -0
- data/test/new_relic/agent/stats_engine/gc_profiler_test.rb +4 -0
- data/test/new_relic/agent/stats_engine/metric_stats_test.rb +21 -17
- data/test/new_relic/agent/stats_engine/samplers_test.rb +20 -10
- data/test/new_relic/agent/stats_engine_test.rb +4 -0
- data/test/new_relic/agent/stats_hash_test.rb +4 -0
- data/test/new_relic/agent/stats_test.rb +4 -0
- data/test/new_relic/agent/thread_profiler_test.rb +4 -0
- data/test/new_relic/agent/thread_test.rb +4 -0
- data/test/new_relic/agent/threaded_test.rb +4 -0
- data/test/new_relic/agent/transaction_info_test.rb +4 -0
- data/test/new_relic/agent/transaction_sample_builder_test.rb +4 -0
- data/test/new_relic/agent/transaction_sampler_test.rb +5 -1
- data/test/new_relic/agent/worker_loop_test.rb +4 -0
- data/test/new_relic/agent_test.rb +7 -3
- data/test/new_relic/coerce_test.rb +4 -0
- data/test/new_relic/collection_helper_test.rb +4 -0
- data/test/new_relic/command/deployments_test.rb +4 -0
- data/test/new_relic/control/class_methods_test.rb +4 -0
- data/test/new_relic/control/frameworks/rails_test.rb +4 -0
- data/test/new_relic/control_test.rb +4 -0
- data/test/new_relic/delayed_job_injection_test.rb +4 -0
- data/test/new_relic/dispatcher_test.rb +4 -0
- data/test/new_relic/fake_collector.rb +16 -4
- data/test/new_relic/framework_test.rb +4 -0
- data/test/new_relic/helper_test.rb +4 -1
- data/test/new_relic/license_test.rb +127 -0
- data/test/new_relic/load_test.rb +4 -0
- data/test/new_relic/local_environment_test.rb +4 -0
- data/test/new_relic/metric_data_test.rb +4 -0
- data/test/new_relic/metric_parser/metric_parser_test.rb +4 -0
- data/test/new_relic/metric_spec_test.rb +4 -0
- data/test/new_relic/noticed_error_test.rb +4 -0
- data/test/new_relic/rack/agent_hooks_test.rb +4 -0
- data/test/new_relic/rack/all_test.rb +4 -0
- data/test/new_relic/rack/browser_monitoring_test.rb +4 -0
- data/test/new_relic/rack/developer_mode_helper_test.rb +4 -0
- data/test/new_relic/rack/developer_mode_test.rb +4 -0
- data/test/new_relic/rack/error_collector_test.rb +4 -0
- data/test/new_relic/transaction_analysis/segment_summary_test.rb +4 -0
- data/test/new_relic/transaction_analysis_test.rb +4 -0
- data/test/new_relic/transaction_sample/composite_segment_test.rb +4 -0
- data/test/new_relic/transaction_sample/fake_segment_test.rb +4 -0
- data/test/new_relic/transaction_sample/segment_test.rb +4 -0
- data/test/new_relic/transaction_sample/summary_segment_test.rb +4 -0
- data/test/new_relic/transaction_sample_subtest_test.rb +4 -0
- data/test/new_relic/transaction_sample_test.rb +4 -0
- data/test/new_relic/version_number_test.rb +4 -0
- data/test/test_contexts.rb +4 -0
- data/test/test_helper.rb +4 -0
- data/ui/helpers/developer_mode_helper.rb +4 -0
- data/ui/helpers/google_pie_chart.rb +4 -0
- data/ui/views/newrelic/file/javascript/jquery-1.4.2.js +3 -0
- data/ui/views/newrelic/file/javascript/transaction_sample.js +3 -0
- data/ui/views/newrelic/index.rhtml +2 -2
- data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection/version.rb +4 -0
- data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/metric_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_ext.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database_pool.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/frontend.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/gc.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/hibernate_session.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_context_listener.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_filter.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_controller.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_view.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_action.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_result.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/version.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb +4 -0
- data.tar.gz.sig +0 -0
- metadata +47 -19
- metadata.gz.sig +0 -0
- data/vendor/gems/dependency_detection-0.0.1.build/LICENSE +0 -5
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require 'new_relic/control'
|
2
6
|
module NewRelic
|
3
7
|
module Agent
|
@@ -70,16 +74,13 @@ module NewRelic
|
|
70
74
|
def trace_execution_unscoped(metric_names, options={})
|
71
75
|
return yield unless NewRelic::Agent.is_execution_traced?
|
72
76
|
t0 = Time.now
|
73
|
-
stats = Array(metric_names).map do | metric_name |
|
74
|
-
NewRelic::Agent.instance.stats_engine.get_stats_no_scope metric_name
|
75
|
-
end
|
76
77
|
begin
|
77
78
|
NewRelic::Agent.instance.push_trace_execution_flag(true) if options[:force]
|
78
79
|
yield
|
79
80
|
ensure
|
80
81
|
NewRelic::Agent.instance.pop_trace_execution_flag if options[:force]
|
81
82
|
duration = (Time.now - t0).to_f # for some reason this is 3 usec faster than Time - Time
|
82
|
-
|
83
|
+
stat_engine.record_metrics(metric_names, duration)
|
83
84
|
end
|
84
85
|
end
|
85
86
|
|
@@ -117,7 +118,7 @@ module NewRelic
|
|
117
118
|
def stat_engine
|
118
119
|
agent_instance.stats_engine
|
119
120
|
end
|
120
|
-
|
121
|
+
|
121
122
|
# returns a scoped metric stat for the specified name
|
122
123
|
def get_stats_scoped(first_name, scoped_metric_only)
|
123
124
|
stat_engine.get_stats(first_name, true, scoped_metric_only)
|
@@ -126,25 +127,16 @@ module NewRelic
|
|
126
127
|
def get_stats_unscoped(name)
|
127
128
|
stat_engine.get_stats_no_scope(name)
|
128
129
|
end
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
# returns an array containing the first metric, and an array
|
138
|
-
# of other unscoped statistics we should also record along
|
139
|
-
# side it
|
140
|
-
def get_metric_stats(metrics, options)
|
141
|
-
metrics = Array(metrics)
|
142
|
-
first_name = metrics.shift
|
143
|
-
stats = metrics.map do | name |
|
144
|
-
get_stats_unscoped(name)
|
130
|
+
|
131
|
+
def get_metric_specs(first_name, other_names, scope, options)
|
132
|
+
specs = other_names.map { |name| NewRelic::MetricSpec.new(name) }
|
133
|
+
if options[:metric]
|
134
|
+
if scope && scope != first_name
|
135
|
+
specs << NewRelic::MetricSpec.new(first_name, scope)
|
136
|
+
end
|
137
|
+
specs << NewRelic::MetricSpec.new(first_name) unless options[:scoped_metric_only]
|
145
138
|
end
|
146
|
-
|
147
|
-
[first_name, stats]
|
139
|
+
specs
|
148
140
|
end
|
149
141
|
|
150
142
|
# Helper for setting a hash key if the hash key is nil,
|
@@ -207,7 +199,7 @@ module NewRelic
|
|
207
199
|
# this method fails safely if the header does not manage to
|
208
200
|
# push the scope onto the stack - it simply does not trace
|
209
201
|
# any metrics.
|
210
|
-
def trace_execution_scoped_footer(t0, first_name,
|
202
|
+
def trace_execution_scoped_footer(t0, first_name, metric_specs, expected_scope, forced, t1=Time.now.to_f)
|
211
203
|
log_errors("trace_method_execution footer", first_name) do
|
212
204
|
duration = t1 - t0
|
213
205
|
|
@@ -215,7 +207,9 @@ module NewRelic
|
|
215
207
|
if expected_scope
|
216
208
|
scope = stat_engine.pop_scope(expected_scope, duration, t1)
|
217
209
|
exclusive = duration - scope.children_time
|
218
|
-
|
210
|
+
stat_engine.record_metrics(metric_specs) do |stat|
|
211
|
+
stat.record_data_point(duration, exclusive)
|
212
|
+
end
|
219
213
|
end
|
220
214
|
end
|
221
215
|
end
|
@@ -229,17 +223,19 @@ module NewRelic
|
|
229
223
|
# Generally you pass an array of metric names if you want to record the metric under additional
|
230
224
|
# categories, but generally this *should never ever be done*. Most of the time you can aggregate
|
231
225
|
# on the server.
|
232
|
-
|
233
226
|
def trace_execution_scoped(metric_names, options={})
|
234
227
|
return yield if trace_disabled?(options)
|
235
228
|
set_if_nil(options, :metric)
|
236
229
|
set_if_nil(options, :deduct_call_time_from_parent)
|
237
|
-
|
230
|
+
metric_names = Array(metric_names)
|
231
|
+
first_name = metric_names.shift
|
232
|
+
scope = stat_engine.scope_name
|
238
233
|
start_time, expected_scope = trace_execution_scoped_header(first_name, options)
|
239
|
-
begin
|
234
|
+
begin
|
240
235
|
yield
|
241
236
|
ensure
|
242
|
-
|
237
|
+
metric_specs = get_metric_specs(first_name, metric_names, scope, options)
|
238
|
+
trace_execution_scoped_footer(start_time, first_name, metric_specs, expected_scope, options[:force])
|
243
239
|
end
|
244
240
|
end
|
245
241
|
|
@@ -356,14 +352,13 @@ module NewRelic
|
|
356
352
|
"def #{_traced_method_name(method_name, metric_name_code)}(*args, &block)
|
357
353
|
#{assemble_code_header(method_name, metric_name_code, options)}
|
358
354
|
t0 = Time.now
|
359
|
-
stats = NewRelic::Agent.instance.stats_engine.get_stats_no_scope \"#{metric_name_code}\"
|
360
355
|
begin
|
361
356
|
#{"NewRelic::Agent.instance.push_trace_execution_flag(true)\n" if options[:force]}
|
362
357
|
#{_untraced_method_name(method_name, metric_name_code)}(*args, &block)\n
|
363
358
|
ensure
|
364
359
|
#{"NewRelic::Agent.instance.pop_trace_execution_flag\n" if options[:force] }
|
365
360
|
duration = (Time.now - t0).to_f
|
366
|
-
|
361
|
+
NewRelic::Agent.record_metric(\"#{metric_name_code}\", duration)
|
367
362
|
#{options[:code_footer]}
|
368
363
|
end
|
369
364
|
end"
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require 'zlib'
|
2
6
|
require 'new_relic/agent/audit_logger'
|
3
7
|
|
@@ -274,12 +278,9 @@ module NewRelic
|
|
274
278
|
end
|
275
279
|
|
276
280
|
def record_supportability_metrics(method, now)
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
NewRelic::Agent.instance.stats_engine. \
|
281
|
-
get_stats_no_scope('Supportability/invoke_remote/' + method.to_s). \
|
282
|
-
record_data_point((Time.now - now).to_f)
|
281
|
+
duration = (Time.now - now).to_f
|
282
|
+
NewRelic::Agent.record_metric('Supportability/invoke_remote', duration)
|
283
|
+
NewRelic::Agent.record_metric('Supportability/invoke_remote/' + method.to_s, duration)
|
283
284
|
end
|
284
285
|
|
285
286
|
# Raises an UnrecoverableServerException if the post_string is longer
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require 'base64'
|
2
6
|
|
3
7
|
module NewRelic
|
@@ -22,9 +26,27 @@ module NewRelic
|
|
22
26
|
@listener ||= Listener.new
|
23
27
|
end
|
24
28
|
|
29
|
+
# Expected initial sequence of events for Pipe usage:
|
30
|
+
#
|
31
|
+
# 1. Pipe is created in parent process (read and write ends open)
|
32
|
+
# 2. Parent process forks
|
33
|
+
# 3. An after_fork hook is invoked in the child
|
34
|
+
# 4. From after_fork hook, child closes read end of pipe, and
|
35
|
+
# writes a ready marker on the pipe (after_fork_in_child).
|
36
|
+
# 5. The parent receives the ready marker, and closes the write end of the
|
37
|
+
# pipe in response (after_fork_in_parent).
|
38
|
+
#
|
39
|
+
# After this sequence of steps, an exit (whether clean or not) of the
|
40
|
+
# child will result in the pipe being marked readable again, and giving an
|
41
|
+
# EOF marker (nil) when read. Note that closing of the unused ends of the
|
42
|
+
# pipe in the parent and child processes is essential in order for the EOF
|
43
|
+
# to be correctly triggered. The ready marker mechanism is used because
|
44
|
+
# there's no easy hook for after_fork in the parent process.
|
25
45
|
class Pipe
|
46
|
+
READY_MARKER = "READY"
|
47
|
+
|
26
48
|
attr_accessor :in, :out
|
27
|
-
attr_reader :last_read
|
49
|
+
attr_reader :last_read, :parent_pid
|
28
50
|
|
29
51
|
def initialize
|
30
52
|
@out, @in = IO.pipe
|
@@ -32,6 +54,7 @@ module NewRelic
|
|
32
54
|
@in.set_encoding(::Encoding::ASCII_8BIT)
|
33
55
|
end
|
34
56
|
@last_read = Time.now
|
57
|
+
@parent_pid = $$
|
35
58
|
end
|
36
59
|
|
37
60
|
def close
|
@@ -53,6 +76,15 @@ module NewRelic
|
|
53
76
|
@out.gets("\n\n")
|
54
77
|
end
|
55
78
|
|
79
|
+
def after_fork_in_child
|
80
|
+
@out.close unless @out.closed?
|
81
|
+
write(READY_MARKER)
|
82
|
+
end
|
83
|
+
|
84
|
+
def after_fork_in_parent
|
85
|
+
@in.close unless @in.closed?
|
86
|
+
end
|
87
|
+
|
56
88
|
def closed?
|
57
89
|
@out.closed? && @in.closed?
|
58
90
|
end
|
@@ -68,9 +100,13 @@ module NewRelic
|
|
68
100
|
@select_timeout = 60
|
69
101
|
end
|
70
102
|
|
103
|
+
def wakeup
|
104
|
+
wake.in << '.'
|
105
|
+
end
|
106
|
+
|
71
107
|
def register_pipe(id)
|
72
108
|
@pipes[id] = Pipe.new
|
73
|
-
|
109
|
+
wakeup
|
74
110
|
end
|
75
111
|
|
76
112
|
def start
|
@@ -81,9 +117,10 @@ module NewRelic
|
|
81
117
|
loop do
|
82
118
|
clean_up_pipes
|
83
119
|
pipes_to_listen_to = @pipes.values.map{|pipe| pipe.out} + [wake.out]
|
84
|
-
|
85
|
-
|
86
|
-
|
120
|
+
|
121
|
+
NewRelic::Agent.record_metric('Supportability/Listeners',
|
122
|
+
(Time.now - now).to_f) if now
|
123
|
+
|
87
124
|
if ready = IO.select(pipes_to_listen_to, [], [], @select_timeout)
|
88
125
|
now = Time.now
|
89
126
|
pipe = ready[0][0]
|
@@ -94,17 +131,21 @@ module NewRelic
|
|
94
131
|
end
|
95
132
|
end
|
96
133
|
|
97
|
-
break
|
134
|
+
break unless should_keep_listening?
|
98
135
|
end
|
99
136
|
end
|
100
137
|
sleep 0.001 # give time for the thread to spawn
|
101
138
|
end
|
102
139
|
|
140
|
+
def stop_listener_thread
|
141
|
+
@started = false
|
142
|
+
wakeup
|
143
|
+
@thread.join
|
144
|
+
end
|
145
|
+
|
103
146
|
def stop
|
104
147
|
return unless @started == true
|
105
|
-
|
106
|
-
wake.in << '.' unless wake.in.closed?
|
107
|
-
@thread.join # make sure we wait for the thread to exit
|
148
|
+
stop_listener_thread
|
108
149
|
close_all_pipes
|
109
150
|
@wake.close
|
110
151
|
@wake = nil
|
@@ -129,12 +170,14 @@ module NewRelic
|
|
129
170
|
|
130
171
|
def merge_data_from_pipe(pipe_handle)
|
131
172
|
pipe = find_pipe_for_handle(pipe_handle)
|
132
|
-
|
133
|
-
|
134
|
-
if
|
135
|
-
|
136
|
-
|
137
|
-
|
173
|
+
raw_payload = pipe.read
|
174
|
+
|
175
|
+
if raw_payload.nil?
|
176
|
+
pipe.close
|
177
|
+
elsif raw_payload && !raw_payload.empty?
|
178
|
+
payload = unmarshal(raw_payload)
|
179
|
+
if payload == Pipe::READY_MARKER
|
180
|
+
pipe.after_fork_in_parent
|
138
181
|
elsif payload
|
139
182
|
NewRelic::Agent.agent.merge_data_from([payload[:stats],
|
140
183
|
payload[:transaction_traces],
|
@@ -1,13 +1,23 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
module NewRelic
|
2
6
|
module Agent
|
3
7
|
class PipeService
|
4
|
-
attr_reader :channel_id, :buffer
|
8
|
+
attr_reader :channel_id, :buffer, :pipe
|
5
9
|
attr_accessor :request_timeout, :agent_id, :collector
|
6
10
|
|
7
11
|
def initialize(channel_id)
|
8
12
|
@channel_id = channel_id
|
9
13
|
@collector = NewRelic::Control::Server.new(:name => 'parent',
|
10
14
|
:port => 0)
|
15
|
+
@pipe = NewRelic::Agent::PipeChannelManager.channels[@channel_id]
|
16
|
+
if @pipe && @pipe.parent_pid != $$
|
17
|
+
@pipe.after_fork_in_child
|
18
|
+
else
|
19
|
+
NewRelic::Agent.logger.error("No communication channel to parent process, please see https://newrelic.com/docs/ruby/resque-instrumentation for more information.")
|
20
|
+
end
|
11
21
|
end
|
12
22
|
|
13
23
|
def connect(config)
|
@@ -36,8 +46,7 @@ module NewRelic
|
|
36
46
|
end
|
37
47
|
|
38
48
|
def shutdown(time)
|
39
|
-
|
40
|
-
NewRelic::Agent::PipeChannelManager.channels[@channel_id].close
|
49
|
+
@pipe.close if @pipe
|
41
50
|
end
|
42
51
|
|
43
52
|
# Invokes the block it is passed. This is used to implement HTTP
|
@@ -54,9 +63,7 @@ module NewRelic
|
|
54
63
|
private
|
55
64
|
|
56
65
|
def write_to_pipe(data)
|
57
|
-
|
58
|
-
rescue => e
|
59
|
-
NewRelic::Agent.logger.error("#{e.message}: Unable to send data to parent process, please see https://newrelic.com/docs/ruby/resque-instrumentation for more information.")
|
66
|
+
@pipe.write(data) if @pipe
|
60
67
|
end
|
61
68
|
end
|
62
69
|
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
# A Sampler is used to capture meaningful metrics in a background thread
|
2
6
|
# periodically. They will either be invoked once a minute just before the
|
3
7
|
# data is sent to the agent (default) or every 10 seconds, when #use_harvest_sampler?
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require 'new_relic/agent/sampler'
|
2
6
|
|
3
7
|
module NewRelic
|
@@ -10,17 +14,20 @@ module NewRelic
|
|
10
14
|
poll
|
11
15
|
end
|
12
16
|
|
13
|
-
def
|
14
|
-
|
17
|
+
def record_user_util(value)
|
18
|
+
NewRelic::Agent.record_metric("CPU/User/Utilization", value)
|
15
19
|
end
|
16
|
-
|
17
|
-
|
20
|
+
|
21
|
+
def record_system_util(value)
|
22
|
+
NewRelic::Agent.record_metric("CPU/System/Utilization", value)
|
18
23
|
end
|
19
|
-
|
20
|
-
|
24
|
+
|
25
|
+
def record_usertime(value)
|
26
|
+
NewRelic::Agent.record_metric("CPU/User Time", value)
|
21
27
|
end
|
22
|
-
|
23
|
-
|
28
|
+
|
29
|
+
def record_systemtime(value)
|
30
|
+
NewRelic::Agent.record_metric("CPU/System Time", value)
|
24
31
|
end
|
25
32
|
|
26
33
|
def self.supported_on_this_platform?
|
@@ -39,13 +46,14 @@ module NewRelic
|
|
39
46
|
usertime = t.utime - @last_utime
|
40
47
|
systemtime = t.stime - @last_stime
|
41
48
|
|
42
|
-
|
43
|
-
|
49
|
+
record_systemtime(systemtime) if systemtime >= 0
|
50
|
+
record_usertime(usertime) if usertime >= 0
|
44
51
|
|
45
52
|
# Calculate the true utilization by taking cpu times and dividing by
|
46
53
|
# elapsed time X num_processors.
|
47
|
-
|
48
|
-
|
54
|
+
|
55
|
+
record_user_util(usertime / (elapsed * num_processors))
|
56
|
+
record_system_util(systemtime / (elapsed * num_processors))
|
49
57
|
end
|
50
58
|
@last_utime = t.utime
|
51
59
|
@last_stime = t.stime
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require 'new_relic/agent/sampler'
|
2
6
|
require 'new_relic/delayed_job_injection'
|
3
7
|
|
@@ -18,11 +22,12 @@ module NewRelic
|
|
18
22
|
raise Unsupported, "No DJ worker present" unless NewRelic::DelayedJobInjection.worker_name
|
19
23
|
end
|
20
24
|
|
21
|
-
def
|
22
|
-
|
25
|
+
def record_failed_jobs(value)
|
26
|
+
NewRelic::Agent.record_metric("Workers/DelayedJob/failed_jobs", value)
|
23
27
|
end
|
24
|
-
|
25
|
-
|
28
|
+
|
29
|
+
def record_locked_jobs(value)
|
30
|
+
NewRelic::Agent.record_metric("Workers/DelayedJob/locked_jobs", value)
|
26
31
|
end
|
27
32
|
|
28
33
|
def local_env
|
@@ -45,8 +50,8 @@ module NewRelic
|
|
45
50
|
end
|
46
51
|
|
47
52
|
def poll
|
48
|
-
|
49
|
-
|
53
|
+
record_failed_jobs(failed_jobs)
|
54
|
+
record_locked_jobs(locked_jobs)
|
50
55
|
|
51
56
|
if @queue
|
52
57
|
record_queue_length_across_dimension('queue')
|
@@ -61,9 +66,11 @@ module NewRelic
|
|
61
66
|
all_count = 0
|
62
67
|
Delayed::Job.count(:group => column, :conditions => ['run_at < ? and failed_at is NULL', Time.now]).each do | column_val, count |
|
63
68
|
all_count += count
|
64
|
-
|
69
|
+
metric = "Workers/DelayedJob/queue_length/#{column == 'queue' ? 'name' : column}/#{column_val}"
|
70
|
+
NewRelic::Agent.record_metric(metric, count)
|
65
71
|
end
|
66
|
-
|
72
|
+
all_metric = "Workers/DelayedJob/queue_length/all"
|
73
|
+
NewRelic::Agent.record_metric(all_metric, all_count)
|
67
74
|
end
|
68
75
|
|
69
76
|
# Figure out if we get the queues.
|
@@ -76,10 +83,6 @@ module NewRelic
|
|
76
83
|
end
|
77
84
|
@queue ||= false
|
78
85
|
end
|
79
|
-
|
80
|
-
def record(stat, size)
|
81
|
-
stat.record_data_point size
|
82
|
-
end
|
83
86
|
end
|
84
87
|
end
|
85
88
|
end
|