newrelic_rpm 4.8.0.341 → 6.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
- data/.github/ISSUE_TEMPLATE/config.yml +5 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
- data/.github/actions/annotate/README.md +79 -0
- data/.github/actions/annotate/action.yml +6 -0
- data/.github/actions/annotate/dist/index.js +433 -0
- data/.github/actions/annotate/index.js +25 -0
- data/.github/actions/annotate/package-lock.json +172 -0
- data/.github/actions/annotate/package.json +30 -0
- data/.github/actions/annotate/pre-commit +5 -0
- data/.github/actions/build-ruby/README.md +79 -0
- data/.github/actions/build-ruby/action.yml +15 -0
- data/.github/actions/build-ruby/dist/index.js +52683 -0
- data/.github/actions/build-ruby/index.js +514 -0
- data/.github/actions/build-ruby/package-lock.json +581 -0
- data/.github/actions/build-ruby/package.json +32 -0
- data/.github/actions/build-ruby/pre-commit +5 -0
- data/.github/pull_request_template.md +16 -0
- data/.github/workflows/ci.yml +212 -0
- data/.github/workflows/pr_review_checklist.yml +22 -0
- data/.github/workflows/release.yml +78 -0
- data/.github/workflows/scripts/rubygems-authenticate.py +13 -0
- data/.github/workflows/scripts/rubygems-publish.rb +32 -0
- data/.github/workflows/snyk.yml +27 -0
- data/.github/workflows/stale.yml +21 -0
- data/.gitignore +9 -0
- data/.yardopts +4 -1
- data/CHANGELOG.md +868 -3
- data/CONTRIBUTING.md +106 -19
- data/Gemfile +6 -2
- data/Guardfile +18 -1
- data/LICENSE +208 -38
- data/README.md +81 -88
- data/ROADMAP.md +24 -0
- data/Rakefile +2 -0
- data/THIRD_PARTY_NOTICES.md +213 -0
- data/bin/nrdebug +1 -1
- data/config.dot +3 -12
- data/init.rb +1 -1
- data/install.rb +1 -1
- data/lib/new_relic/agent.rb +145 -31
- data/lib/new_relic/agent/adaptive_sampler.rb +104 -0
- data/lib/new_relic/agent/agent.rb +192 -190
- data/lib/new_relic/agent/agent_logger.rb +5 -1
- data/lib/new_relic/agent/attribute_filter.rb +85 -25
- data/lib/new_relic/agent/attribute_processing.rb +1 -1
- data/lib/new_relic/agent/attributes.rb +152 -0
- data/lib/new_relic/agent/audit_logger.rb +1 -1
- data/lib/new_relic/agent/autostart.rb +20 -15
- data/lib/new_relic/agent/chained_call.rb +1 -1
- data/lib/new_relic/agent/commands/agent_command.rb +1 -1
- data/lib/new_relic/agent/commands/agent_command_router.rb +3 -22
- data/lib/new_relic/agent/commands/thread_profiler_session.rb +1 -1
- data/lib/new_relic/agent/configuration.rb +1 -1
- data/lib/new_relic/agent/configuration/default_source.rb +375 -67
- data/lib/new_relic/agent/configuration/dotted_hash.rb +1 -1
- data/lib/new_relic/agent/configuration/environment_source.rb +5 -3
- data/lib/new_relic/agent/configuration/event_harvest_config.rb +45 -0
- data/lib/new_relic/agent/configuration/high_security_source.rb +2 -3
- data/lib/new_relic/agent/configuration/manager.rb +54 -43
- data/lib/new_relic/agent/configuration/manual_source.rb +1 -1
- data/lib/new_relic/agent/configuration/mask_defaults.rb +1 -1
- data/lib/new_relic/agent/configuration/security_policy_source.rb +238 -0
- data/lib/new_relic/agent/configuration/server_source.rb +46 -5
- data/lib/new_relic/agent/configuration/yaml_source.rb +12 -7
- data/lib/new_relic/agent/connect/request_builder.rb +61 -0
- data/lib/new_relic/agent/connect/response_handler.rb +61 -0
- data/lib/new_relic/agent/custom_event_aggregator.rb +17 -6
- data/lib/new_relic/agent/database.rb +21 -3
- data/lib/new_relic/agent/database/explain_plan_helpers.rb +12 -1
- data/lib/new_relic/agent/database/obfuscation_helpers.rb +2 -2
- data/lib/new_relic/agent/database/obfuscator.rb +1 -1
- data/lib/new_relic/agent/database/postgres_explain_obfuscator.rb +1 -1
- data/lib/new_relic/agent/datastores.rb +12 -11
- data/lib/new_relic/agent/datastores/metric_helper.rb +2 -3
- data/lib/new_relic/agent/datastores/mongo.rb +2 -2
- data/lib/new_relic/agent/datastores/mongo/event_formatter.rb +3 -3
- data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +1 -1
- data/lib/new_relic/agent/datastores/mongo/obfuscator.rb +9 -9
- data/lib/new_relic/agent/datastores/mongo/statement_formatter.rb +1 -1
- data/lib/new_relic/agent/datastores/redis.rb +1 -1
- data/lib/new_relic/agent/deprecator.rb +1 -1
- data/lib/new_relic/agent/distributed_tracing.rb +216 -0
- data/lib/new_relic/agent/distributed_tracing/cross_app_payload.rb +44 -0
- data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +248 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +84 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +75 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +165 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb +39 -0
- data/lib/new_relic/agent/distributed_tracing/trace_context.rb +246 -0
- data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +126 -0
- data/lib/new_relic/agent/encoding_normalizer.rb +1 -1
- data/lib/new_relic/agent/error_collector.rb +51 -20
- data/lib/new_relic/agent/error_event_aggregator.rb +14 -7
- data/lib/new_relic/agent/error_trace_aggregator.rb +2 -1
- data/lib/new_relic/agent/event_aggregator.rb +34 -15
- data/lib/new_relic/agent/event_buffer.rb +1 -1
- data/lib/new_relic/agent/event_listener.rb +1 -1
- data/lib/new_relic/agent/event_loop.rb +1 -1
- data/lib/new_relic/agent/external.rb +31 -29
- data/lib/new_relic/agent/guid_generator.rb +28 -0
- data/lib/new_relic/agent/harvester.rb +1 -1
- data/lib/new_relic/agent/heap.rb +140 -0
- data/lib/new_relic/agent/hostname.rb +16 -2
- data/lib/new_relic/agent/http_clients/abstract.rb +82 -0
- data/lib/new_relic/agent/http_clients/curb_wrappers.rb +25 -20
- data/lib/new_relic/agent/http_clients/excon_wrappers.rb +29 -14
- data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +18 -22
- data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +11 -12
- data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +17 -5
- data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +5 -7
- data/lib/new_relic/agent/http_clients/uri_util.rb +12 -11
- data/lib/new_relic/agent/instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +26 -43
- data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +56 -74
- data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +82 -56
- data/lib/new_relic/agent/instrumentation/active_job.rb +19 -17
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_record.rb +85 -38
- data/lib/new_relic/agent/instrumentation/active_record_helper.rb +82 -24
- data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +168 -0
- data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +102 -31
- data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +47 -57
- data/lib/new_relic/agent/instrumentation/active_storage.rb +23 -0
- data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +63 -0
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +24 -8
- data/lib/new_relic/agent/instrumentation/authlogic.rb +1 -1
- data/lib/new_relic/agent/instrumentation/bunny.rb +115 -44
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +18 -12
- data/lib/new_relic/agent/instrumentation/curb.rb +121 -35
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +6 -4
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +61 -25
- data/lib/new_relic/agent/instrumentation/excon.rb +2 -2
- data/lib/new_relic/agent/instrumentation/excon/connection.rb +8 -5
- data/lib/new_relic/agent/instrumentation/excon/middleware.rb +4 -3
- data/lib/new_relic/agent/instrumentation/grape.rb +46 -35
- data/lib/new_relic/agent/instrumentation/http.rb +8 -5
- data/lib/new_relic/agent/instrumentation/httpclient.rb +7 -5
- data/lib/new_relic/agent/instrumentation/ignore_actions.rb +1 -1
- data/lib/new_relic/agent/instrumentation/memcache.rb +5 -3
- data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +10 -6
- data/lib/new_relic/agent/instrumentation/merb/controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/merb/errors.rb +1 -1
- data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +13 -5
- data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +20 -11
- data/lib/new_relic/agent/instrumentation/mongo.rb +11 -5
- data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +39 -7
- data/lib/new_relic/agent/instrumentation/net.rb +60 -23
- data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +100 -0
- data/lib/new_relic/agent/instrumentation/padrino.rb +40 -16
- data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/queue_time.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rack.rb +36 -13
- data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails_middleware.rb +1 -1
- data/lib/new_relic/agent/instrumentation/{rails5 → rails_notifications}/action_cable.rb +8 -5
- data/lib/new_relic/agent/instrumentation/{rails5 → rails_notifications}/action_controller.rb +4 -4
- data/lib/new_relic/agent/instrumentation/{rails4 → rails_notifications}/action_view.rb +4 -4
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rake.rb +56 -22
- data/lib/new_relic/agent/instrumentation/redis.rb +141 -56
- data/lib/new_relic/agent/instrumentation/resque.rb +21 -37
- data/lib/new_relic/agent/instrumentation/sequel.rb +2 -3
- data/lib/new_relic/agent/instrumentation/sequel_helper.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +48 -24
- data/lib/new_relic/agent/instrumentation/sinatra.rb +62 -23
- data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sunspot.rb +1 -1
- data/lib/new_relic/agent/instrumentation/typhoeus.rb +27 -10
- data/lib/new_relic/agent/internal_agent_error.rb +1 -1
- data/lib/new_relic/agent/javascript_instrumentor.rb +19 -16
- data/lib/new_relic/agent/log_once.rb +1 -1
- data/lib/new_relic/agent/logging.rb +139 -0
- data/lib/new_relic/agent/memory_logger.rb +1 -1
- data/lib/new_relic/agent/messaging.rb +15 -59
- data/lib/new_relic/agent/method_tracer.rb +42 -25
- data/lib/new_relic/agent/method_tracer_helpers.rb +5 -5
- data/lib/new_relic/agent/monitors.rb +27 -0
- data/lib/new_relic/agent/monitors/cross_app_monitor.rb +110 -0
- data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +27 -0
- data/lib/new_relic/agent/{inbound_request_monitor.rb → monitors/inbound_request_monitor.rb} +4 -4
- data/lib/new_relic/agent/{synthetics_monitor.rb → monitors/synthetics_monitor.rb} +4 -7
- data/lib/new_relic/agent/new_relic_service.rb +174 -63
- data/lib/new_relic/agent/new_relic_service/encoders.rb +1 -1
- data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +1 -2
- data/lib/new_relic/agent/new_relic_service/marshaller.rb +6 -27
- data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +61 -0
- data/lib/new_relic/agent/noticible_error.rb +22 -0
- data/lib/new_relic/agent/null_logger.rb +1 -1
- data/lib/new_relic/agent/obfuscator.rb +1 -1
- data/lib/new_relic/agent/parameter_filtering.rb +19 -6
- data/lib/new_relic/agent/payload_metric_mapping.rb +1 -1
- data/lib/new_relic/agent/pipe_channel_manager.rb +1 -1
- data/lib/new_relic/agent/pipe_service.rb +5 -1
- data/lib/new_relic/agent/prepend_supportability.rb +1 -1
- data/lib/new_relic/agent/priority_sampled_buffer.rb +95 -0
- data/lib/new_relic/agent/range_extensions.rb +1 -1
- data/lib/new_relic/agent/rules_engine.rb +1 -1
- data/lib/new_relic/agent/rules_engine/replacement_rule.rb +1 -1
- data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +1 -1
- data/lib/new_relic/agent/sampler.rb +1 -1
- data/lib/new_relic/agent/sampler_collection.rb +1 -1
- data/lib/new_relic/agent/samplers/cpu_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/memory_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/object_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/vm_sampler.rb +1 -1
- data/lib/new_relic/agent/span_event_aggregator.rb +49 -0
- data/lib/new_relic/agent/span_event_primitive.rb +206 -0
- data/lib/new_relic/agent/sql_sampler.rb +23 -7
- data/lib/new_relic/agent/stats.rb +1 -1
- data/lib/new_relic/agent/stats_engine.rb +4 -4
- data/lib/new_relic/agent/stats_engine/gc_profiler.rb +1 -1
- data/lib/new_relic/agent/stats_engine/stats_hash.rb +1 -1
- data/lib/new_relic/agent/supported_versions.rb +3 -3
- data/lib/new_relic/agent/synthetics_event_aggregator.rb +6 -13
- data/lib/new_relic/agent/system_info.rb +18 -8
- data/lib/new_relic/agent/threading/agent_thread.rb +6 -4
- data/lib/new_relic/agent/threading/backtrace_node.rb +1 -1
- data/lib/new_relic/agent/threading/backtrace_service.rb +4 -4
- data/lib/new_relic/agent/threading/thread_profile.rb +10 -24
- data/lib/new_relic/agent/timestamp_sampled_buffer.rb +19 -0
- data/lib/new_relic/agent/tracer.rb +509 -0
- data/lib/new_relic/agent/transaction.rb +191 -278
- data/lib/new_relic/agent/transaction/abstract_segment.rb +38 -5
- data/lib/new_relic/agent/transaction/datastore_segment.rb +30 -5
- data/lib/new_relic/agent/transaction/distributed_tracer.rb +171 -0
- data/lib/new_relic/agent/transaction/distributed_tracing.rb +123 -71
- data/lib/new_relic/agent/transaction/external_request_segment.rb +41 -89
- data/lib/new_relic/agent/transaction/message_broker_segment.rb +7 -8
- data/lib/new_relic/agent/transaction/request_attributes.rb +1 -1
- data/lib/new_relic/agent/transaction/segment.rb +42 -2
- data/lib/new_relic/agent/transaction/slowest_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction/synthetics_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction/trace.rb +7 -23
- data/lib/new_relic/agent/transaction/trace_builder.rb +1 -2
- data/lib/new_relic/agent/transaction/trace_context.rb +168 -0
- data/lib/new_relic/agent/transaction/trace_node.rb +12 -8
- data/lib/new_relic/agent/transaction/tracing.rb +2 -100
- data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction_error_primitive.rb +13 -22
- data/lib/new_relic/agent/transaction_event_aggregator.rb +7 -16
- data/lib/new_relic/agent/transaction_event_primitive.rb +31 -42
- data/lib/new_relic/agent/transaction_event_recorder.rb +8 -16
- data/lib/new_relic/agent/transaction_metrics.rb +1 -1
- data/lib/new_relic/agent/transaction_sampler.rb +3 -14
- data/lib/new_relic/agent/transaction_time_aggregator.rb +155 -0
- data/lib/new_relic/agent/utilization/aws.rb +1 -1
- data/lib/new_relic/agent/utilization/azure.rb +1 -1
- data/lib/new_relic/agent/utilization/gcp.rb +1 -1
- data/lib/new_relic/agent/utilization/pcf.rb +1 -1
- data/lib/new_relic/agent/utilization/vendor.rb +1 -1
- data/lib/new_relic/agent/utilization_data.rb +37 -2
- data/lib/new_relic/agent/vm.rb +1 -1
- data/lib/new_relic/agent/vm/jruby_vm.rb +1 -1
- data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +1 -1
- data/lib/new_relic/agent/vm/mri_vm.rb +1 -1
- data/lib/new_relic/agent/vm/snapshot.rb +1 -1
- data/lib/new_relic/agent/worker_loop.rb +1 -1
- data/lib/new_relic/cli/command.rb +1 -1
- data/lib/new_relic/cli/commands/deployments.rb +2 -2
- data/lib/new_relic/cli/commands/install.rb +4 -3
- data/lib/new_relic/coerce.rb +32 -7
- data/lib/new_relic/collection_helper.rb +1 -1
- data/lib/new_relic/constants.rb +38 -0
- data/lib/new_relic/control.rb +1 -1
- data/lib/new_relic/control/class_methods.rb +8 -2
- data/lib/new_relic/control/frameworks.rb +1 -1
- data/lib/new_relic/control/frameworks/external.rb +1 -1
- data/lib/new_relic/control/frameworks/merb.rb +1 -1
- data/lib/new_relic/control/frameworks/rails.rb +1 -1
- data/lib/new_relic/control/frameworks/rails3.rb +1 -1
- data/lib/new_relic/control/frameworks/rails4.rb +1 -1
- data/lib/new_relic/control/frameworks/{rails5.rb → rails_notifications.rb} +2 -2
- data/lib/new_relic/control/frameworks/ruby.rb +1 -1
- data/lib/new_relic/control/frameworks/sinatra.rb +1 -1
- data/lib/new_relic/control/instance_methods.rb +30 -4
- data/lib/new_relic/control/instrumentation.rb +1 -1
- data/lib/new_relic/control/server_methods.rb +1 -1
- data/lib/new_relic/delayed_job_injection.rb +1 -1
- data/lib/new_relic/dependency_detection.rb +5 -5
- data/lib/new_relic/environment_report.rb +6 -2
- data/lib/new_relic/helper.rb +1 -1
- data/lib/new_relic/language_support.rb +1 -1
- data/lib/new_relic/latest_changes.rb +4 -4
- data/lib/new_relic/local_environment.rb +1 -1
- data/lib/new_relic/metric_data.rb +1 -1
- data/lib/new_relic/metric_spec.rb +1 -1
- data/lib/new_relic/noticed_error.rb +39 -18
- data/lib/new_relic/rack.rb +1 -1
- data/lib/new_relic/rack/agent_hooks.rb +1 -1
- data/lib/new_relic/rack/agent_middleware.rb +2 -2
- data/lib/new_relic/rack/browser_monitoring.rb +16 -9
- data/lib/new_relic/recipes.rb +1 -1
- data/lib/new_relic/recipes/capistrano3.rb +6 -3
- data/lib/new_relic/recipes/capistrano_legacy.rb +1 -1
- data/lib/new_relic/supportability_helper.rb +15 -1
- data/lib/new_relic/version.rb +4 -4
- data/lib/newrelic_rpm.rb +1 -1
- data/lib/sequel/extensions/newrelic_instrumentation.rb +3 -3
- data/lib/sequel/plugins/newrelic_instrumentation.rb +2 -2
- data/lib/tasks/all.rb +1 -1
- data/lib/tasks/config.rake +1 -2
- data/lib/tasks/multiverse.rb +35 -1
- data/lib/tasks/newrelic.rb +1 -1
- data/lib/tasks/tests.rake +6 -1
- data/newrelic_rpm.gemspec +23 -17
- data/recipes/newrelic.rb +1 -1
- data/test/agent_helper.rb +357 -78
- metadata +154 -60
- data/.travis.yml +0 -173
- data/lib/new_relic/agent/busy_calculator.rb +0 -117
- data/lib/new_relic/agent/commands/xray_session.rb +0 -55
- data/lib/new_relic/agent/commands/xray_session_collection.rb +0 -161
- data/lib/new_relic/agent/cross_app_monitor.rb +0 -140
- data/lib/new_relic/agent/cross_app_tracing.rb +0 -143
- data/lib/new_relic/agent/distributed_trace_monitor.rb +0 -29
- data/lib/new_relic/agent/distributed_trace_payload.rb +0 -223
- data/lib/new_relic/agent/distributed_trace_priority_sampled_buffer.rb +0 -72
- data/lib/new_relic/agent/http_clients/abstract_request.rb +0 -31
- data/lib/new_relic/agent/instrumentation/active_record_4.rb +0 -42
- data/lib/new_relic/agent/instrumentation/active_record_5.rb +0 -36
- data/lib/new_relic/agent/instrumentation/evented_subscriber.rb +0 -104
- data/lib/new_relic/agent/instrumentation/rails4/action_controller.rb +0 -32
- data/lib/new_relic/agent/instrumentation/rails5/action_view.rb +0 -27
- data/lib/new_relic/agent/sampled_buffer.rb +0 -68
- data/lib/new_relic/agent/sized_buffer.rb +0 -23
- data/lib/new_relic/agent/synthetics_event_buffer.rb +0 -40
- data/lib/new_relic/agent/throughput_monitor.rb +0 -59
- data/lib/new_relic/agent/transaction/attributes.rb +0 -153
- data/lib/new_relic/agent/transaction/xray_sample_buffer.rb +0 -64
- data/lib/new_relic/agent/transaction_state.rb +0 -145
- data/lib/new_relic/agent/transaction_timings.rb +0 -57
- data/lib/new_relic/metrics.rb +0 -13
- data/lib/tasks/versions.html.erb +0 -28
- data/lib/tasks/versions.postface.html +0 -8
- data/lib/tasks/versions.preface.html +0 -9
- data/lib/tasks/versions.rake +0 -65
- data/lib/tasks/versions.txt.erb +0 -14
data/CONTRIBUTING.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# Guidelines for Contributing Code
|
2
2
|
|
3
|
-
|
4
|
-
taken effort to make this process easy for both contributors and our
|
5
|
-
team.
|
3
|
+
New Relic welcomes code contributions by the Ruby community, and
|
4
|
+
have taken effort to make this process easy for both contributors and our
|
5
|
+
development team.
|
6
6
|
|
7
7
|
When contributing, keep in mind that the agent runs in a wide variety of Ruby
|
8
8
|
language implementations (e.g. 2.x.x, jruby, etc.) as well as a wide variety of
|
9
|
-
application environments (e.g. Rails, Sinatra, roll-your-own, etc.) See
|
10
|
-
https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks
|
9
|
+
application environments (e.g. Rails, Sinatra, roll-your-own, etc.) See [Ruby agent requirements and supported frameworks]
|
10
|
+
(https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks)
|
11
11
|
for the current full list.
|
12
12
|
|
13
13
|
Because of this, we need to be more defensive in our coding practices than most
|
@@ -15,10 +15,72 @@ projects. Syntax must be compatible with all supported Ruby implementations and
|
|
15
15
|
we can't assume the presence of any specific libraries, including `ActiveSupport`,
|
16
16
|
`ActiveRecord`, etc.
|
17
17
|
|
18
|
+
## Process
|
19
|
+
|
20
|
+
### Version Support
|
21
|
+
|
22
|
+
When contributing, keep in mind that New Relic customers (that's you!) are
|
23
|
+
running many different versions of Ruby, some of them pretty old. Changes that
|
24
|
+
depend on the newest version of Ruby will probably be rejected, especially if
|
25
|
+
they replace something backwards compatible.
|
26
|
+
|
27
|
+
Be aware that the instrumentation needs to work with a wide range of versions of
|
28
|
+
the instrumented modules, and that code that looks nonsensical or
|
29
|
+
overcomplicated may be that way for compatibility-related reasons. Read all the
|
30
|
+
comments and check the related tests before deciding whether existing code is
|
31
|
+
incorrect.
|
32
|
+
|
33
|
+
If you are planning on contributing a new feature or an otherwise complex
|
34
|
+
contribution, we kindly ask you to start a conversation with the maintainer team
|
35
|
+
by opening up an Github issue first.
|
36
|
+
|
37
|
+
|
38
|
+
### General Guidelines
|
39
|
+
The Ruby agent avoids requiring any dependencies in the main agent code base.
|
40
|
+
Instrumentations and features that would otherwise require a dependency (such as
|
41
|
+
Infinite Tracing, which require gRPC and protobuf) are built as separate gems.
|
42
|
+
If you have a feature or instrumentation request that would require a
|
43
|
+
dependency, please open an Issue to discuss with the maintainers before
|
44
|
+
proceeding.
|
45
|
+
|
46
|
+
Your code will be evaluated for completeness and accuracy in
|
47
|
+
implementation and must be accompanied with appropriate unit tests. New
|
48
|
+
additions that do not break existing tests are the easiest and quickest to be
|
49
|
+
accepted and merged. New features and improvements that break existing
|
50
|
+
functionality are slower to be accepted and merged as they require agreement
|
51
|
+
with maintainers across a majority of the languages New Relic supports. Any
|
52
|
+
such breaking changes will require a major version bump whereas non-breaking
|
53
|
+
additions only lead to minor version bumps.
|
54
|
+
|
55
|
+
Please be aware that the maintainers of New Relic’s agents aim to have as much
|
56
|
+
commonality of functionality across all language agents as makes sense, so we are
|
57
|
+
always working to reconcile language-specific changes against the cross-language
|
58
|
+
community set of agreements.
|
59
|
+
|
60
|
+
### Feature Requests
|
61
|
+
|
62
|
+
Feature requests should be submitted in the [Issue tracker](../../issues), with
|
63
|
+
a description of the expected behavior & use case. Before submitting an Issue,
|
64
|
+
please search for similar ones in the [closed
|
65
|
+
issues](../../issues?q=is%3Aissue+is%3Aclosed).
|
66
|
+
|
67
|
+
### Pull Requests
|
68
|
+
|
69
|
+
We can only accept PRs for version v6.12.0 or greater due to open source
|
70
|
+
licensing restrictions.
|
71
|
+
|
72
|
+
### Code of Conduct
|
73
|
+
|
74
|
+
Before contributing please read the [code of conduct](https://github.com/newrelic/.github/blob/master/CODE_OF_CONDUCT.md)
|
75
|
+
|
76
|
+
Note that our [code of conduct](https://github.com/newrelic/.github/blob/master/CODE_OF_CONDUCT.md) applies to all platforms
|
77
|
+
and venues related to this project; please follow it in all your interactions
|
78
|
+
with the project and its participants.
|
79
|
+
|
18
80
|
## Branches
|
19
81
|
|
20
|
-
The head of
|
21
|
-
New Relic reserves the ability to push an edge to the
|
82
|
+
The head of `main` will generally have New Relic's latest release. However,
|
83
|
+
New Relic reserves the ability to push an edge to the `main`. If you download a
|
22
84
|
release from this repo, use the appropriate tag. New Relic usually pushes beta
|
23
85
|
versions of a release to a working branch before tagging them for General
|
24
86
|
Availability.
|
@@ -39,13 +101,16 @@ Running the test suite is simple. Just invoke:
|
|
39
101
|
bundle
|
40
102
|
bundle exec rake
|
41
103
|
|
42
|
-
This will run the unit tests in standalone mode
|
43
|
-
|
104
|
+
This will run the unit tests in standalone mode. You can run against a specific Rails version
|
105
|
+
by passing the version name (which should match the name of a subdirectory in test/environments)
|
106
|
+
as an argument to the test:env rake task, like this:
|
107
|
+
|
108
|
+
bundle exec rake test:env[rails60]
|
44
109
|
|
45
110
|
These tests are setup to run automatically in
|
46
|
-
[
|
47
|
-
When you've pushed your changes to GitHub, you can confirm that
|
48
|
-
|
111
|
+
[GitHub Actions](https://github.com/newrelic/newrelic-ruby-agent/actions) under several
|
112
|
+
Ruby implementations. When you've pushed your changes to GitHub, you can confirm that
|
113
|
+
the GitHub Actions test matrix passes for your fork.
|
49
114
|
|
50
115
|
Additionally, our own CI jobs runs these tests under multiple versions of Rails
|
51
116
|
to verify compatibility.
|
@@ -74,15 +139,37 @@ These tests can be run by invoking:
|
|
74
139
|
bundle exec rake test:multiverse
|
75
140
|
|
76
141
|
More details are available in
|
77
|
-
[test/multiverse/README.md](https://github.com/newrelic/
|
142
|
+
[test/multiverse/README.md](https://github.com/newrelic/newrelic-ruby-agent/blob/main/test/multiverse/README.md).
|
143
|
+
|
144
|
+
## Contributor License Agreement
|
145
|
+
|
146
|
+
Keep in mind that when you submit your Pull Request, you'll need to sign the CLA
|
147
|
+
via the click-through using CLA-Assistant. If you'd like to execute our
|
148
|
+
corporate CLA, or if you have any questions, please drop us an email at
|
149
|
+
opensource@newrelic.com.
|
150
|
+
|
151
|
+
For more information about CLAs, please check out Alex Russell’s excellent post,
|
152
|
+
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
153
|
+
|
154
|
+
## Slack
|
155
|
+
|
156
|
+
We host a public Slack with a dedicated channel for contributors and maintainers
|
157
|
+
of open source projects hosted by New Relic. If you are contributing to this
|
158
|
+
project, you're welcome to request access to the #oss-contributors channel in
|
159
|
+
the newrelicusers.slack.com workspace. To request access, see
|
160
|
+
https://newrelicusers-signup.herokuapp.com/.
|
161
|
+
|
162
|
+
## Explorer's Hub
|
163
|
+
|
164
|
+
New Relic hosts and moderates an online forum where customers can interact with
|
165
|
+
New Relic employees as well as other customers to get help and share best
|
166
|
+
practices. Like all official New Relic open source projects, there's a related
|
167
|
+
Community topic in the New Relic Explorers Hub. You can find this project's
|
168
|
+
topic/threads here:
|
78
169
|
|
79
|
-
|
170
|
+
[Explorer's Hub](https://discuss.newrelic.com/tags/rubyagent)
|
80
171
|
|
81
|
-
|
82
|
-
that you are granting New Relic a non-exclusive, non-revokable, no-cost license
|
83
|
-
to use the code, algorithms, patents, and ideas in that code in our products if
|
84
|
-
we so choose. Fortunately, you also agree the code is provided as-is and you provide no
|
85
|
-
warranties as to its fitness or correctness for any purpose.
|
172
|
+
## And Finally...
|
86
173
|
|
87
174
|
If you have any feedback on how we can make contributing easier, please get in
|
88
175
|
touch at [support.newrelic.com](http://support.newrelic.com) and let us know!
|
data/Gemfile
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
|
4
|
+
# frozen_string_literal: true
|
2
5
|
|
3
|
-
|
6
|
+
source 'https://rubygems.org'
|
7
|
+
gemspec name: "newrelic_rpm"
|
data/Guardfile
CHANGED
@@ -1,8 +1,25 @@
|
|
1
|
-
|
1
|
+
require './test/multiverse/lib/multiverse/bundler_patch'
|
2
|
+
|
3
|
+
test_folders = Dir.glob("test/new_relic/*").select{|f| File.directory?(f)}
|
4
|
+
test_folders += Dir.glob("test/new_relic/**/*").select{|f| File.directory?(f)}
|
5
|
+
|
6
|
+
rake_lib_path = Bundler.with_unbundled_env{ `bundle exec gem which rake`.chomp.gsub("lib/rake.rb", "lib") }
|
7
|
+
ruby_options = %{-w -I"#{rake_lib_path}" "#{rake_lib_path}/rake/rake_test_loader.rb"}
|
8
|
+
|
9
|
+
guard_options = {
|
10
|
+
spring: "bundle exec ruby #{ruby_options} ",
|
11
|
+
test_folders: ['test/new_relic'] + test_folders,
|
12
|
+
all_after_pass: false,
|
13
|
+
all_on_start: false
|
14
|
+
}
|
15
|
+
|
16
|
+
guard :minitest, guard_options do
|
2
17
|
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
3
18
|
watch(%r{^test/.+_test\.rb$})
|
4
19
|
watch(%r{^test/rum/.*}) { "test/new_relic/rack/browser_monitoring_test.rb" }
|
20
|
+
watch(%r{^test/fixtures/cross_agent_tests/distributed_tracing/(.+).json}) { |m| "test/new_relic/agent/distributed_tracing/#{m[1]}_cross_agent_test.rb" }
|
5
21
|
watch('test/test_helper.rb') { "test/new_relic" }
|
6
22
|
watch('test/agent_helper.rb') { "test/new_relic" }
|
7
23
|
watch('lib/new_relic/agent/configuration/default_source.rb') { "test/new_relic/agent/configuration/orphan_configuration_test.rb" }
|
24
|
+
watch(%r{^lib/new_relic/agent/transaction/(.+).rb}) { |m| "test/new_relic/agent/distributed_tracing/#{m[1]}_cross_agent_test.rb" }
|
8
25
|
end
|
data/LICENSE
CHANGED
@@ -1,38 +1,208 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
Versions 6.12.0 and above for this project are licensed under
|
179
|
+
Apache 2.0. For prior versions of this project, please see the
|
180
|
+
LICENSE file in the root directory of that version for more information.
|
181
|
+
|
182
|
+
APPENDIX: How to apply the Apache License to your work.
|
183
|
+
|
184
|
+
To apply the Apache License to your work, attach the following
|
185
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
186
|
+
replaced with your own identifying information. (Don't include
|
187
|
+
the brackets!) The text should be enclosed in the appropriate
|
188
|
+
comment syntax for the file format. We also recommend that a
|
189
|
+
file or class name and description of purpose be included on the
|
190
|
+
same "printed page" as the copyright notice for easier
|
191
|
+
identification within third-party archives.
|
192
|
+
|
193
|
+
Copyright [yyyy] [name of copyright owner]
|
194
|
+
|
195
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
196
|
+
you may not use this file except in compliance with the License.
|
197
|
+
You may obtain a copy of the License at
|
198
|
+
|
199
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
200
|
+
|
201
|
+
Unless required by applicable law or agreed to in writing, software
|
202
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
203
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
204
|
+
See the License for the specific language governing permissions and
|
205
|
+
limitations under the License.
|
206
|
+
|
207
|
+
|
208
|
+
|
data/README.md
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
[![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
|
2
|
+
|
1
3
|
# New Relic Ruby Agent
|
2
4
|
|
3
|
-
New Relic
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
The New Relic Ruby agent monitors your applications to help you
|
6
|
+
[identify and solve performance issues](https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/introduction-new-relic-ruby#monitor-performance).
|
7
|
+
You can also extend the agent's performance monitoring to
|
8
|
+
[collect and analyze business data](https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/introduction-new-relic-ruby#business-data)
|
9
|
+
to help you improve the customer experience and make data-driven business decisions.
|
10
|
+
|
11
|
+
The New Relic Ruby Agent is dual-purposed as a either a Gem or a Rails plugin,
|
12
|
+
hosted on [github](https://github.com/newrelic/newrelic-ruby-agent).
|
10
13
|
|
11
14
|
## Supported Environments
|
12
15
|
|
@@ -14,130 +17,120 @@ An up-to-date list of Ruby versions and frameworks for the latest agent
|
|
14
17
|
can be found on [our docs site](http://docs.newrelic.com/docs/ruby/supported-frameworks).
|
15
18
|
|
16
19
|
You can also monitor non-web applications. Refer to the "Other
|
17
|
-
Environments" section
|
20
|
+
Environments" section below.
|
18
21
|
|
19
|
-
##
|
22
|
+
## Installing and Using
|
20
23
|
|
21
|
-
|
22
|
-
community. Before submitting a pull request please review
|
23
|
-
[these guidelines](https://github.com/newrelic/rpm/blob/master/CONTRIBUTING.md).
|
24
|
+
### Quick Start
|
24
25
|
|
25
|
-
|
26
|
-
and avoid breaking your code with future changes to the agent.
|
26
|
+
#### With Bundler
|
27
27
|
|
28
|
+
For using with Bundler, add the Ruby Agent to your project's Gemfile.
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
```ruby
|
31
|
+
gem 'newrelic_rpm'
|
32
|
+
```
|
32
33
|
|
33
|
-
|
34
|
+
and run `bundle install` to activate the new gem.
|
34
35
|
|
35
|
-
|
36
|
-
http://newrelic.com/ . There you can
|
37
|
-
sign up for a free Lite account or one of our paid subscriptions.
|
36
|
+
#### Without Bundler
|
38
37
|
|
39
|
-
|
40
|
-
`newrelic.yml` file, you can copy the `newrelic.yml` file into your app config
|
41
|
-
directory OR can generate the file manually with command:
|
38
|
+
If you are not using Bundler, install the gem with:
|
42
39
|
|
43
|
-
|
40
|
+
```bash
|
41
|
+
gem install newrelic_rpm
|
42
|
+
```
|
44
43
|
|
45
|
-
|
46
|
-
is by default read from the `config` directory of the application root
|
47
|
-
and is subsequently searched for in the application root directory,
|
48
|
-
and then in a `~/.newrelic` directory. Once you're up and running you can
|
49
|
-
enable Server Side Config and manage your newrelic configuration from the web
|
50
|
-
UI.
|
44
|
+
and then require the New Relic Ruby agent in your Ruby start-up sequence:
|
51
45
|
|
52
|
-
|
46
|
+
```ruby
|
47
|
+
require 'newrelic_rpm'
|
48
|
+
```
|
53
49
|
|
54
|
-
|
50
|
+
#### Oher Environments
|
55
51
|
|
56
|
-
|
52
|
+
Assuming you have installed the agent per above, you may also need to tell the Ruby agent to start for some frameworks and non-framework environments. To do so, add the following to your Ruby start-up sequence start the agent:
|
57
53
|
|
58
|
-
|
54
|
+
```ruby
|
55
|
+
NewRelic::Agent.manual_start
|
56
|
+
```
|
59
57
|
|
60
|
-
|
58
|
+
### Complete Install Instructions
|
61
59
|
|
62
|
-
For
|
60
|
+
For complete documentation on installing the New Relic Ruby agent, see the following links:
|
63
61
|
|
64
|
-
|
62
|
+
* [Introduction](https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/introduction-new-relic-ruby)
|
63
|
+
* [Install the New Relic Ruby agent](https://docs.newrelic.com/docs/agents/ruby-agent/installation/install-new-relic-ruby-agent)
|
64
|
+
* [Configure the agent](https://docs.newrelic.com/docs/agents/ruby-agent/configuration/ruby-agent-configuration)
|
65
|
+
* [Update the agent](https://docs.newrelic.com/docs/agents/ruby-agent/installation/update-ruby-agent)
|
66
|
+
* [Rails plugin installation](https://docs.newrelic.com/docs/agents/ruby-agent/installation/ruby-agent-installation-rails-plugin)
|
67
|
+
* [GAE Flexible Environment](https://docs.newrelic.com/docs/agents/ruby-agent/installation/install-new-relic-ruby-agent-gae-flexible-environment)
|
68
|
+
* [Pure Rack Apps](http://docs.newrelic.com/docs/ruby/rack-middlewares)
|
69
|
+
* [Ruby agent and Heroku](https://docs.newrelic.com/docs/agents/ruby-agent/installation/ruby-agent-heroku)
|
70
|
+
* [Background Jobs](https://docs.newrelic.com/docs/agents/ruby-agent/background-jobs)
|
71
|
+
* [Uninstall the Ruby agent](https://docs.newrelic.com/docs/agents/ruby-agent/installation/uninstall-ruby-agent)
|
65
72
|
|
66
|
-
|
73
|
+
### Recording Deploys
|
67
74
|
|
68
|
-
|
75
|
+
The Ruby Agent supports recording deployments in New Relic via a command line
|
76
|
+
tool or Capistrano recipes. For more information on these features see
|
77
|
+
[our deployment documentation](http://docs.newrelic.com/docs/ruby/recording-deployments-with-the-ruby-agent)
|
78
|
+
for more information.
|
69
79
|
|
70
|
-
|
80
|
+
## Support
|
71
81
|
|
72
|
-
|
73
|
-
require 'newrelic_rpm'
|
74
|
-
```
|
82
|
+
Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels.
|
75
83
|
|
76
|
-
|
84
|
+
This [troubleshooting framework](https://discuss.newrelic.com/t/ruby-troubleshooting-framework-install/108685) steps you through common troubleshooting questions.
|
77
85
|
|
78
|
-
|
79
|
-
configuration definitions in the newrelic.yml file; e.g., development,
|
80
|
-
staging, production, etc.
|
86
|
+
New Relic offers NRDiag, [a client-side diagnostic utility](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) that automatically detects common problems with New Relic agents. If NRDiag detects a problem, it suggests troubleshooting steps. NRDiag can also automatically attach troubleshooting data to a New Relic Support ticket.
|
81
87
|
|
82
|
-
|
88
|
+
If the issue has been confirmed as a bug or is a Feature request, please file a Github issue.
|
83
89
|
|
84
|
-
|
90
|
+
**Support Channels**
|
85
91
|
|
86
|
-
|
87
|
-
|
88
|
-
|
92
|
+
* [New Relic Documentation](https://docs.newrelic.com/docs/agents/ruby-agent): Comprehensive guidance for using our platform
|
93
|
+
* [New Relic Community](https://discuss.newrelic.com/tags/rubyagent): The best place to engage in troubleshooting questions
|
94
|
+
* [New Relic Developer](https://developer.newrelic.com/): Resources for building a custom observability applications
|
95
|
+
* [New Relic University](https://learn.newrelic.com/): A range of online training for New Relic users of every level
|
96
|
+
* [New Relic Technical Support](https://support.newrelic.com/) 24/7/365 ticketed support. Read more about our [Technical Support Offerings](https://docs.newrelic.com/docs/licenses/license-information/general-usage-licenses/support-plan).
|
89
97
|
|
90
|
-
|
98
|
+
## Privacy
|
91
99
|
|
92
|
-
|
93
|
-
NewRelic::Agent.manual_start
|
94
|
-
```
|
100
|
+
At New Relic we take your privacy and the security of your information seriously, and are committed to protecting your information. We must emphasize the importance of not sharing personal data in public forums, and ask all users to scrub logs and diagnostic information for sensitive information, whether personal, proprietary, or otherwise.
|
95
101
|
|
96
|
-
|
97
|
-
[Rack middlewares documentation](http://docs.newrelic.com/docs/ruby/rack-middlewares).
|
102
|
+
We define “Personal Data” as any information relating to an identified or identifiable individual, including, for example, your name, phone number, post code or zip code, Device ID, IP address and email address.
|
98
103
|
|
99
|
-
|
100
|
-
monitor other web frameworks, background jobs, and daemons.
|
104
|
+
Please review [New Relic’s General Data Privacy Notice](https://newrelic.com/termsandconditions/privacy) for more information.
|
101
105
|
|
102
|
-
|
103
|
-
|
104
|
-
(e.g. [newrelic-redis](https://github.com/evanphx/newrelic-redis)) in the
|
105
|
-
[extends_newrelic_rpm project](https://github.com/newrelic/extends_newrelic_rpm).
|
106
|
+
## Roadmap
|
107
|
+
See our [roadmap](https://github.com/newrelic/newrelic-ruby-agent/blob/main/ROADMAP.md), to learn more about our product vision, understand our plans, and provide us valuable feedback.
|
106
108
|
|
107
|
-
##
|
109
|
+
## Contributing
|
108
110
|
|
109
|
-
|
110
|
-
|
111
|
-
service and sends deep performance data to the UI for your
|
112
|
-
analysis. To view this data, log in to http://rpm.newrelic.com.
|
111
|
+
We encourage contributions to improve the New Relic Ruby agent! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.
|
112
|
+
If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at opensource@newrelic.com.
|
113
113
|
|
114
|
-
|
115
|
-
online. Refer to instructions in *Getting Started*.
|
114
|
+
**A note about vulnerabilities**
|
116
115
|
|
117
|
-
|
116
|
+
As noted in our [security policy](https://github.com/newrelic/newrelic-ruby-agent/security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
|
118
117
|
|
119
|
-
|
120
|
-
tool or Capistrano recipes. For more information on these features see
|
121
|
-
[our deployment documentation](http://docs.newrelic.com/docs/ruby/recording-deployments-with-the-ruby-agent)
|
122
|
-
for more information.
|
118
|
+
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic).
|
123
119
|
|
124
|
-
|
120
|
+
If you would like to contribute to this project, please review [these guidelines](https://github.com/newrelic/newrelic-ruby-agent/blob/main/CONTRIBUTING.md).
|
125
121
|
|
126
|
-
|
127
|
-
|
122
|
+
To [all contributors](https://github.com/newrelic/newrelic-ruby-agent/graphs/contributors), we thank you! Without your contribution, this project would not be what it is today. We also host a community project page dedicated to
|
123
|
+
the [New Relic Ruby agent](https://opensource.newrelic.com/projects/newrelic/newrelic-ruby-agent).
|
128
124
|
|
129
|
-
|
130
|
-
site](http://support.newrelic.com/) or our [community forum](http://forum.newrelic.com)
|
131
|
-
and we'll be happy to help you.
|
125
|
+
## License
|
132
126
|
|
133
|
-
|
134
|
-
on
|
127
|
+
The New Relic Ruby agent is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.
|
128
|
+
The New Relic Ruby agent also uses source code from third-party libraries. Full details on which libraries are used and the terms under which they are licensed can be found in the [THIRD_PARTY_NOTICES.md](https://github.com/newrelic/newrelic-ruby-agent/blob/main/THIRD_PARTY_NOTICES.md).
|
135
129
|
|
136
|
-
|
137
|
-
or email support@newrelic.com.
|
130
|
+
## Thank You
|
138
131
|
|
139
132
|
Thank you, and may your application scale to infinity plus one.
|
140
133
|
|
141
134
|
Lew Cirne, Founder and CEO
|
142
135
|
|
143
|
-
New Relic, Inc.
|
136
|
+
New Relic, Inc.
|