├── .build_ignore ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ ├── feature_request.md │ └── story.md ├── actions │ ├── annotate │ │ ├── README.md │ │ ├── action.yml │ │ ├── dist │ │ │ └── index.js │ │ ├── index.js │ │ ├── package-lock.json │ │ ├── package.json │ │ └── pre-commit │ ├── issue_closer │ │ ├── .eslintrc.json │ │ ├── README.md │ │ ├── action.yml │ │ ├── dist │ │ │ └── index.js │ │ ├── index.js │ │ └── package.json │ ├── simplecov-report │ │ ├── LICENSE │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── .keep │ │ │ └── main.test.ts │ │ ├── action.yml │ │ ├── dist │ │ │ └── index.js │ │ ├── dummy_coverage │ │ │ └── .last_run.json │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src │ │ │ ├── main.ts │ │ │ └── report.ts │ │ └── tsconfig.json │ ├── variable-mapper │ │ ├── LICENSE │ │ ├── README.md │ │ ├── action.yml │ │ ├── dist │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── licenses.txt │ │ │ └── sourcemap-register.js │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src │ │ │ ├── exporter.ts │ │ │ ├── main.ts │ │ │ └── mapper.ts │ │ └── tsconfig.json │ └── workflow-conclusion │ │ ├── LICENSE │ │ ├── README.ja.md │ │ ├── README.md │ │ ├── action.yml │ │ ├── build.json │ │ └── lib │ │ ├── constant.d.ts │ │ ├── main.d.ts │ │ ├── main.js │ │ ├── process.d.ts │ │ ├── process.test.d.ts │ │ └── setup.d.ts ├── dependabot.yml ├── pull_request_template.md ├── versions.yml └── workflows │ ├── add_issues_to_project.yml │ ├── ci.yml │ ├── ci_cron.yml │ ├── ci_jruby.yml │ ├── ci_special.yml │ ├── config_docs.yml │ ├── label_community_cards.yml │ ├── lambda_release.yml │ ├── performance_tests.yml │ ├── pr_closed.yml │ ├── prerelease.yml │ ├── release.yml │ ├── release_notes.yml │ ├── release_pr.yml │ ├── repolinter.yml │ ├── scripts │ ├── generate_release_notes.rb │ ├── rubygems-authenticate.py │ ├── rubygems-publish.rb │ ├── setup_bundler │ └── slack_notifications │ │ ├── README.md │ │ ├── gem_notifier.rb │ │ ├── slack_notifier.rb │ │ └── supported_gems.txt │ └── slack_notifications.yml ├── .gitignore ├── .rubocop.yml ├── .rubocop_todo.yml ├── .simplecov ├── .snyk ├── .yardopts ├── Brewfile ├── CHANGELOG.md ├── CONTRIBUTING.md ├── DOCKER.md ├── Dockerfile ├── Gemfile ├── Guardfile ├── LICENSE ├── README.md ├── Rakefile ├── THIRD_PARTY_NOTICES.md ├── Thorfile ├── bin ├── newrelic ├── newrelic_rpm └── nrdebug ├── docker-compose.yml ├── infinite_tracing ├── .gitignore ├── CHANGELOG.md ├── Gemfile ├── Rakefile ├── lib │ ├── infinite_tracing │ │ ├── agent_integrations.rb │ │ ├── agent_integrations │ │ │ ├── agent.rb │ │ │ ├── datastore_segment.rb │ │ │ ├── external_request_segment.rb │ │ │ └── segment.rb │ │ ├── channel.rb │ │ ├── client.rb │ │ ├── config.rb │ │ ├── connection.rb │ │ ├── constants.rb │ │ ├── proto.rb │ │ ├── proto │ │ │ ├── infinite_tracing_pb.rb │ │ │ └── infinite_tracing_services_pb.rb │ │ ├── record_status_handler.rb │ │ ├── streaming_buffer.rb │ │ ├── suspended_streaming_buffer.rb │ │ ├── transformer.rb │ │ ├── version.rb │ │ └── worker.rb │ ├── newrelic │ │ └── infinite_tracing.rb │ └── proto │ │ └── infinite_tracing.proto ├── newrelic-infinite_tracing.gemspec ├── tasks │ ├── all.rb │ ├── helpers │ │ └── license.rb │ └── proto.rake └── test │ ├── fixtures │ └── span_events │ │ ├── deep_unscoped_with_error.yml │ │ ├── external_expected_error_and_retried.yml │ │ ├── external_ok.yml │ │ ├── external_redirect.yml │ │ ├── single.yml │ │ ├── single_full_attributes.yml │ │ ├── single_with_agent_attributes.yml │ │ └── single_with_user_attributes.yml │ ├── infinite_tracing │ ├── agent_integrations │ │ ├── agent_test.rb │ │ ├── datastore_segment_test.rb │ │ ├── external_request_segment_test.rb │ │ └── segment_test.rb │ ├── channel_test.rb │ ├── client_test.rb │ ├── config_test.rb │ ├── connection_test.rb │ ├── record_status_handler_test.rb │ ├── streaming_buffer_test.rb │ ├── suspended_streaming_buffer_test.rb │ ├── transformer_test.rb │ └── worker_test.rb │ ├── infinite_tracing_test.rb │ ├── support │ ├── enumerator_queue.rb │ ├── fake_trace_observer_helpers.rb │ ├── fixtures.rb │ └── server_response_simulator.rb │ └── test_helper.rb ├── init.rb ├── install.rb ├── lefthook.yml ├── lib ├── boot │ └── strap.rb ├── new_relic │ ├── agent.rb │ ├── agent │ │ ├── adaptive_sampler.rb │ │ ├── agent.rb │ │ ├── agent_helpers │ │ │ ├── connect.rb │ │ │ ├── harvest.rb │ │ │ ├── shutdown.rb │ │ │ ├── special_startup.rb │ │ │ ├── start_worker_thread.rb │ │ │ ├── startup.rb │ │ │ └── transmit.rb │ │ ├── agent_logger.rb │ │ ├── attribute_filter.rb │ │ ├── attribute_pre_filtering.rb │ │ ├── attribute_processing.rb │ │ ├── attributes.rb │ │ ├── audit_logger.rb │ │ ├── autostart.rb │ │ ├── aws.rb │ │ ├── chained_call.rb │ │ ├── commands │ │ │ ├── agent_command.rb │ │ │ ├── agent_command_router.rb │ │ │ └── thread_profiler_session.rb │ │ ├── configuration.rb │ │ ├── configuration │ │ │ ├── default_source.rb │ │ │ ├── dotted_hash.rb │ │ │ ├── environment_source.rb │ │ │ ├── event_harvest_config.rb │ │ │ ├── high_security_source.rb │ │ │ ├── manager.rb │ │ │ ├── manual_source.rb │ │ │ ├── mask_defaults.rb │ │ │ ├── security_policy_source.rb │ │ │ ├── server_source.rb │ │ │ └── yaml_source.rb │ │ ├── connect │ │ │ ├── request_builder.rb │ │ │ └── response_handler.rb │ │ ├── custom_event_aggregator.rb │ │ ├── database.rb │ │ ├── database │ │ │ ├── explain_plan_helpers.rb │ │ │ ├── obfuscation_helpers.rb │ │ │ ├── obfuscator.rb │ │ │ └── postgres_explain_obfuscator.rb │ │ ├── database_adapter.rb │ │ ├── datastores.rb │ │ ├── datastores │ │ │ ├── metric_helper.rb │ │ │ ├── mongo.rb │ │ │ ├── mongo │ │ │ │ ├── event_formatter.rb │ │ │ │ └── metric_translator.rb │ │ │ ├── nosql_obfuscator.rb │ │ │ └── redis.rb │ │ ├── deprecator.rb │ │ ├── distributed_tracing.rb │ │ ├── distributed_tracing │ │ │ ├── cross_app_payload.rb │ │ │ ├── cross_app_tracing.rb │ │ │ ├── distributed_trace_attributes.rb │ │ │ ├── distributed_trace_metrics.rb │ │ │ ├── distributed_trace_payload.rb │ │ │ ├── distributed_trace_transport_type.rb │ │ │ ├── trace_context.rb │ │ │ └── trace_context_payload.rb │ │ ├── encoding_normalizer.rb │ │ ├── error_collector.rb │ │ ├── error_event_aggregator.rb │ │ ├── error_filter.rb │ │ ├── error_trace_aggregator.rb │ │ ├── event_aggregator.rb │ │ ├── event_buffer.rb │ │ ├── event_listener.rb │ │ ├── event_loop.rb │ │ ├── external.rb │ │ ├── guid_generator.rb │ │ ├── harvester.rb │ │ ├── health_check.rb │ │ ├── heap.rb │ │ ├── hostname.rb │ │ ├── http_clients │ │ │ ├── abstract.rb │ │ │ ├── async_http_wrappers.rb │ │ │ ├── curb_wrappers.rb │ │ │ ├── ethon_wrappers.rb │ │ │ ├── excon_wrappers.rb │ │ │ ├── http_rb_wrappers.rb │ │ │ ├── httpclient_wrappers.rb │ │ │ ├── httpx_wrappers.rb │ │ │ ├── net_http_wrappers.rb │ │ │ ├── typhoeus_wrappers.rb │ │ │ └── uri_util.rb │ │ ├── instrumentation.rb │ │ ├── instrumentation │ │ │ ├── action_cable_subscriber.rb │ │ │ ├── action_controller_other_subscriber.rb │ │ │ ├── action_controller_subscriber.rb │ │ │ ├── action_dispatch.rb │ │ │ ├── action_dispatch_subscriber.rb │ │ │ ├── action_mailbox.rb │ │ │ ├── action_mailbox_subscriber.rb │ │ │ ├── action_mailer.rb │ │ │ ├── action_mailer_subscriber.rb │ │ │ ├── action_view_subscriber.rb │ │ │ ├── active_job.rb │ │ │ ├── active_job_subscriber.rb │ │ │ ├── active_merchant.rb │ │ │ ├── active_record.rb │ │ │ ├── active_record_helper.rb │ │ │ ├── active_record_notifications.rb │ │ │ ├── active_record_prepend.rb │ │ │ ├── active_record_subscriber.rb │ │ │ ├── active_storage.rb │ │ │ ├── active_storage_subscriber.rb │ │ │ ├── active_support.rb │ │ │ ├── active_support_broadcast_logger.rb │ │ │ ├── active_support_broadcast_logger │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── active_support_logger.rb │ │ │ ├── active_support_logger │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── active_support_subscriber.rb │ │ │ ├── async_http.rb │ │ │ ├── async_http │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── aws_sdk_firehose.rb │ │ │ ├── aws_sdk_firehose │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── aws_sdk_kinesis.rb │ │ │ ├── aws_sdk_kinesis │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── aws_sdk_lambda.rb │ │ │ ├── aws_sdk_lambda │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── aws_sqs.rb │ │ │ ├── aws_sqs │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── bunny.rb │ │ │ ├── bunny │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── concurrent_ruby.rb │ │ │ ├── concurrent_ruby │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── controller_instrumentation.rb │ │ │ ├── curb.rb │ │ │ ├── curb │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── custom_events.rb │ │ │ ├── custom_events_subscriber.rb │ │ │ ├── delayed_job │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── delayed_job_instrumentation.rb │ │ │ ├── dynamodb.rb │ │ │ ├── dynamodb │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── elasticsearch.rb │ │ │ ├── elasticsearch │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── ethon.rb │ │ │ ├── ethon │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── excon.rb │ │ │ ├── excon │ │ │ │ └── middleware.rb │ │ │ ├── fiber.rb │ │ │ ├── fiber │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── grape.rb │ │ │ ├── grape │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── grpc │ │ │ │ ├── client │ │ │ │ │ ├── chain.rb │ │ │ │ │ ├── instrumentation.rb │ │ │ │ │ ├── prepend.rb │ │ │ │ │ └── request_wrapper.rb │ │ │ │ ├── helper.rb │ │ │ │ └── server │ │ │ │ │ ├── chain.rb │ │ │ │ │ ├── instrumentation.rb │ │ │ │ │ ├── rpc_desc_prepend.rb │ │ │ │ │ └── rpc_server_prepend.rb │ │ │ ├── grpc_client.rb │ │ │ ├── grpc_server.rb │ │ │ ├── httpclient.rb │ │ │ ├── httpclient │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── httprb.rb │ │ │ ├── httprb │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── httpx.rb │ │ │ ├── httpx │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── ignore_actions.rb │ │ │ ├── logger.rb │ │ │ ├── logger │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── logstasher.rb │ │ │ ├── logstasher │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── memcache.rb │ │ │ ├── memcache │ │ │ │ ├── chain.rb │ │ │ │ ├── dalli.rb │ │ │ │ ├── helper.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── middleware_proxy.rb │ │ │ ├── middleware_tracing.rb │ │ │ ├── mongo.rb │ │ │ ├── mongodb_command_subscriber.rb │ │ │ ├── net_http.rb │ │ │ ├── net_http │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── notifications_subscriber.rb │ │ │ ├── opensearch.rb │ │ │ ├── opensearch │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── padrino.rb │ │ │ ├── padrino │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── passenger_instrumentation.rb │ │ │ ├── queue_time.rb │ │ │ ├── rack.rb │ │ │ ├── rack │ │ │ │ ├── chain.rb │ │ │ │ ├── helpers.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── rails3 │ │ │ │ └── action_controller.rb │ │ │ ├── rails_middleware.rb │ │ │ ├── rails_notifications │ │ │ │ ├── action_cable.rb │ │ │ │ ├── action_controller.rb │ │ │ │ ├── action_view.rb │ │ │ │ └── custom_events.rb │ │ │ ├── rake.rb │ │ │ ├── rake │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── rdkafka.rb │ │ │ ├── rdkafka │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── redis.rb │ │ │ ├── redis │ │ │ │ ├── chain.rb │ │ │ │ ├── cluster_middleware.rb │ │ │ │ ├── constants.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ ├── middleware.rb │ │ │ │ └── prepend.rb │ │ │ ├── resque.rb │ │ │ ├── resque │ │ │ │ ├── chain.rb │ │ │ │ ├── helper.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── roda.rb │ │ │ ├── roda │ │ │ │ ├── chain.rb │ │ │ │ ├── ignorer.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ ├── prepend.rb │ │ │ │ └── roda_transaction_namer.rb │ │ │ ├── ruby_kafka.rb │ │ │ ├── ruby_kafka │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── ruby_openai.rb │ │ │ ├── ruby_openai │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── sequel.rb │ │ │ ├── sequel_helper.rb │ │ │ ├── sidekiq.rb │ │ │ ├── sidekiq │ │ │ │ ├── client.rb │ │ │ │ ├── extensions │ │ │ │ │ ├── delay_extensions.rb │ │ │ │ │ └── delayed_class.rb │ │ │ │ └── server.rb │ │ │ ├── sinatra.rb │ │ │ ├── sinatra │ │ │ │ ├── chain.rb │ │ │ │ ├── ignorer.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ ├── prepend.rb │ │ │ │ └── transaction_namer.rb │ │ │ ├── stripe.rb │ │ │ ├── stripe_subscriber.rb │ │ │ ├── thread.rb │ │ │ ├── thread │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── tilt.rb │ │ │ ├── tilt │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── typhoeus.rb │ │ │ ├── typhoeus │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ │ ├── view_component.rb │ │ │ └── view_component │ │ │ │ ├── chain.rb │ │ │ │ ├── instrumentation.rb │ │ │ │ └── prepend.rb │ │ ├── internal_agent_error.rb │ │ ├── javascript_instrumentor.rb │ │ ├── linking_metadata.rb │ │ ├── llm.rb │ │ ├── llm │ │ │ ├── chat_completion_message.rb │ │ │ ├── chat_completion_summary.rb │ │ │ ├── embedding.rb │ │ │ ├── llm_event.rb │ │ │ └── response_headers.rb │ │ ├── local_log_decorator.rb │ │ ├── log_event_aggregator.rb │ │ ├── log_event_attributes.rb │ │ ├── log_once.rb │ │ ├── log_priority.rb │ │ ├── logging.rb │ │ ├── memory_logger.rb │ │ ├── messaging.rb │ │ ├── method_tracer.rb │ │ ├── method_tracer_helpers.rb │ │ ├── monitors.rb │ │ ├── monitors │ │ │ ├── cross_app_monitor.rb │ │ │ ├── distributed_tracing_monitor.rb │ │ │ ├── inbound_request_monitor.rb │ │ │ └── synthetics_monitor.rb │ │ ├── new_relic_service.rb │ │ ├── new_relic_service │ │ │ ├── encoders.rb │ │ │ ├── json_marshaller.rb │ │ │ ├── marshaller.rb │ │ │ └── security_policy_settings.rb │ │ ├── noticeable_error.rb │ │ ├── null_logger.rb │ │ ├── obfuscator.rb │ │ ├── opentelemetry │ │ │ ├── context.rb │ │ │ ├── context │ │ │ │ ├── propagation.rb │ │ │ │ └── propagation │ │ │ │ │ └── trace_propagator.rb │ │ │ ├── trace.rb │ │ │ ├── trace │ │ │ │ ├── span.rb │ │ │ │ ├── tracer.rb │ │ │ │ └── tracer_provider.rb │ │ │ └── transaction_patch.rb │ │ ├── opentelemetry_bridge.rb │ │ ├── parameter_filtering.rb │ │ ├── payload_metric_mapping.rb │ │ ├── pipe_channel_manager.rb │ │ ├── pipe_service.rb │ │ ├── prepend_supportability.rb │ │ ├── priority_sampled_buffer.rb │ │ ├── rules_engine.rb │ │ ├── rules_engine │ │ │ ├── replacement_rule.rb │ │ │ └── segment_terms_rule.rb │ │ ├── sampler.rb │ │ ├── sampler_collection.rb │ │ ├── samplers │ │ │ ├── cpu_sampler.rb │ │ │ ├── delayed_job_sampler.rb │ │ │ ├── memory_sampler.rb │ │ │ ├── object_sampler.rb │ │ │ └── vm_sampler.rb │ │ ├── serverless_handler.rb │ │ ├── serverless_handler_event_sources.json │ │ ├── serverless_handler_event_sources.rb │ │ ├── span_event_aggregator.rb │ │ ├── span_event_primitive.rb │ │ ├── sql_sampler.rb │ │ ├── stats.rb │ │ ├── stats_engine.rb │ │ ├── stats_engine │ │ │ ├── gc_profiler.rb │ │ │ └── stats_hash.rb │ │ ├── synthetics_event_aggregator.rb │ │ ├── system_info.rb │ │ ├── threading │ │ │ ├── agent_thread.rb │ │ │ ├── backtrace_node.rb │ │ │ ├── backtrace_service.rb │ │ │ └── thread_profile.rb │ │ ├── timestamp_sampled_buffer.rb │ │ ├── tracer.rb │ │ ├── transaction.rb │ │ ├── transaction │ │ │ ├── abstract_segment.rb │ │ │ ├── datastore_segment.rb │ │ │ ├── distributed_tracer.rb │ │ │ ├── distributed_tracing.rb │ │ │ ├── external_request_segment.rb │ │ │ ├── message_broker_segment.rb │ │ │ ├── request_attributes.rb │ │ │ ├── segment.rb │ │ │ ├── slowest_sample_buffer.rb │ │ │ ├── synthetics_sample_buffer.rb │ │ │ ├── trace.rb │ │ │ ├── trace_builder.rb │ │ │ ├── trace_context.rb │ │ │ ├── trace_node.rb │ │ │ ├── tracing.rb │ │ │ └── transaction_sample_buffer.rb │ │ ├── transaction_error_primitive.rb │ │ ├── transaction_event_aggregator.rb │ │ ├── transaction_event_primitive.rb │ │ ├── transaction_event_recorder.rb │ │ ├── transaction_metrics.rb │ │ ├── transaction_sampler.rb │ │ ├── transaction_time_aggregator.rb │ │ ├── utilization │ │ │ ├── aws.rb │ │ │ ├── azure.rb │ │ │ ├── ecs.rb │ │ │ ├── ecs_v4.rb │ │ │ ├── gcp.rb │ │ │ ├── pcf.rb │ │ │ └── vendor.rb │ │ ├── utilization_data.rb │ │ ├── vm.rb │ │ ├── vm │ │ │ ├── c_ruby_vm.rb │ │ │ ├── jruby_vm.rb │ │ │ ├── monotonic_gc_profiler.rb │ │ │ └── snapshot.rb │ │ └── worker_loop.rb │ ├── base64.rb │ ├── cli │ │ ├── command.rb │ │ └── commands │ │ │ ├── deployments.rb │ │ │ └── install.rb │ ├── coerce.rb │ ├── collection_helper.rb │ ├── constants.rb │ ├── control.rb │ ├── control │ │ ├── class_methods.rb │ │ ├── frameworks.rb │ │ ├── frameworks │ │ │ ├── external.rb │ │ │ ├── grape.rb │ │ │ ├── padrino.rb │ │ │ ├── rails.rb │ │ │ ├── rails3.rb │ │ │ ├── rails4.rb │ │ │ ├── rails_notifications.rb │ │ │ ├── roda.rb │ │ │ ├── ruby.rb │ │ │ └── sinatra.rb │ │ ├── instance_methods.rb │ │ ├── instrumentation.rb │ │ ├── private_instance_methods.rb │ │ ├── security_interface.rb │ │ └── server_methods.rb │ ├── delayed_job_injection.rb │ ├── dependency_detection.rb │ ├── environment_report.rb │ ├── helper.rb │ ├── language_support.rb │ ├── latest_changes.rb │ ├── local_environment.rb │ ├── metric_data.rb │ ├── metric_spec.rb │ ├── noticed_error.rb │ ├── rack.rb │ ├── rack │ │ ├── agent_hooks.rb │ │ ├── agent_middleware.rb │ │ └── browser_monitoring.rb │ ├── recipes.rb │ ├── recipes │ │ ├── capistrano3.rb │ │ ├── capistrano_legacy.rb │ │ └── helpers │ │ │ └── send_deployment.rb │ ├── supportability_helper.rb │ ├── thread_local_storage.rb │ ├── traced_thread.rb │ └── version.rb ├── newrelic_rpm.rb ├── sequel │ ├── extensions │ │ └── new_relic_instrumentation.rb │ └── plugins │ │ └── new_relic_instrumentation.rb └── tasks │ ├── all.rb │ ├── bump_version.rake │ ├── config.rake │ ├── coverage_report.rake │ ├── gha.rake │ ├── helpers │ ├── config.html.erb │ ├── config.text.erb │ ├── format.rb │ ├── matches.rb │ ├── newrelicyml.rb │ ├── prompt.rb │ └── version_bump.rb │ ├── install.rake │ ├── instrumentation_generator │ ├── README.md │ ├── TODO.md │ ├── instrumentation.thor │ └── templates │ │ ├── Envfile.tt │ │ ├── chain.tt │ │ ├── chain_method.tt │ │ ├── dependency_detection.tt │ │ ├── instrumentation.tt │ │ ├── instrumentation_method.tt │ │ ├── newrelic.yml.tt │ │ ├── prepend.tt │ │ ├── prepend_method.tt │ │ └── test.tt │ ├── multiverse.rake │ ├── multiverse.rb │ ├── newrelic.rb │ ├── newrelicyml.rake │ └── tests.rake ├── newrelic.yml ├── newrelic_rpm.gemspec ├── recipes └── newrelic.rb └── test ├── README.md ├── agent_helper.rb ├── config ├── newrelic.yml ├── test.cert.crt ├── test.cert.key ├── test.cert.readme └── test_control.rb ├── environments ├── .gitignore ├── lib │ └── environments │ │ └── runner.rb ├── norails │ ├── Gemfile │ └── Rakefile ├── rails40 │ ├── .bundler-version │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails41 │ ├── .bundler-version │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails42 │ ├── .bundler-version │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails50 │ ├── .bundler-version │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails51 │ ├── .bundler-version │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails52 │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails60 │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ ├── initializers │ │ │ └── test.rb │ │ └── psych4_monkeypatch.rb │ └── db │ │ └── schema.rb ├── rails61 │ ├── Gemfile │ ├── Rakefile │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails70 │ ├── Gemfile │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ └── config │ │ │ │ └── manifest.js │ │ └── controllers │ │ │ ├── application_controller.rb │ │ │ └── no_method_controller.rb │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails71 │ ├── Gemfile │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ └── config │ │ │ │ └── manifest.js │ │ └── controllers │ │ │ ├── application_controller.rb │ │ │ └── no_method_controller.rb │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails72 │ ├── Gemfile │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ └── config │ │ │ │ └── manifest.js │ │ └── controllers │ │ │ ├── application_controller.rb │ │ │ └── no_method_controller.rb │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb ├── rails80 │ ├── Gemfile │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ └── config │ │ │ │ └── manifest.js │ │ └── controllers │ │ │ ├── application_controller.rb │ │ │ └── no_method_controller.rb │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ └── initializers │ │ │ └── test.rb │ └── db │ │ └── schema.rb └── railsedge │ ├── Gemfile │ ├── Rakefile │ ├── app │ ├── assets │ │ └── config │ │ │ └── manifest.js │ └── controllers │ │ ├── application_controller.rb │ │ └── no_method_controller.rb │ ├── config │ ├── application.rb │ ├── boot.rb │ ├── database.yml │ ├── environment.rb │ └── initializers │ │ └── test.rb │ └── db │ └── schema.rb ├── fixtures ├── cross_agent_tests │ ├── .gitignore │ ├── README.md │ ├── attribute_configuration.json │ ├── aws.json │ ├── cat │ │ ├── README.md │ │ ├── cat_map.json │ │ └── path_hashing.json │ ├── cat_map.json │ ├── collector_hostname.json │ ├── data_collection_server_configuration.json │ ├── data_transport │ │ ├── data_transport.json │ │ └── data_transport.md │ ├── datastores │ │ ├── README.md │ │ ├── datastore_api.json │ │ └── datastore_instances.json │ ├── distributed_tracing │ │ ├── distributed_tracing.json │ │ └── trace_context.json │ ├── docker_container_id │ │ ├── README.md │ │ ├── cases.json │ │ ├── docker-0.9.1.txt │ │ ├── docker-1.0.0.txt │ │ ├── docker-1.1.2-lxc-driver.txt │ │ ├── docker-1.1.2-native-driver-fs.txt │ │ ├── docker-1.1.2-native-driver-systemd.txt │ │ ├── docker-1.3.txt │ │ ├── docker-custom-prefix.txt │ │ ├── docker-gcp.txt │ │ ├── docker-too-long.txt │ │ ├── empty.txt │ │ ├── heroku.txt │ │ ├── invalid-characters.txt │ │ ├── invalid-length.txt │ │ ├── no_cpu_subsystem.txt │ │ ├── ubuntu-14.04-lxc-container.txt │ │ ├── ubuntu-14.04-no-container.txt │ │ └── ubuntu-14.10-no-container.txt │ ├── docker_container_id_v2 │ │ ├── cases.json │ │ ├── docker-20.10.16.txt │ │ ├── docker-24.0.2.txt │ │ ├── docker-too-long.txt │ │ ├── empty.txt │ │ ├── invalid-characters.txt │ │ └── invalid-length.txt │ ├── hybrid_agent.json │ ├── labels.json │ ├── lambda │ │ └── event_source_info.json │ ├── language_agents_security_policies.json │ ├── postgres_explain_obfuscation │ │ ├── README.md │ │ ├── basic_where.colon_obfuscated.txt │ │ ├── basic_where.explain.txt │ │ ├── basic_where.obfuscated.txt │ │ ├── basic_where.query.txt │ │ ├── current_date.colon_obfuscated.txt │ │ ├── current_date.explain.txt │ │ ├── current_date.obfuscated.txt │ │ ├── current_date.query.txt │ │ ├── date.colon_obfuscated.txt │ │ ├── date.explain.txt │ │ ├── date.obfuscated.txt │ │ ├── date.query.txt │ │ ├── embedded_newline.colon_obfuscated.txt │ │ ├── embedded_newline.explain.txt │ │ ├── embedded_newline.obfuscated.txt │ │ ├── embedded_newline.query.txt │ │ ├── embedded_quote.colon_obfuscated.txt │ │ ├── embedded_quote.explain.txt │ │ ├── embedded_quote.obfuscated.txt │ │ ├── embedded_quote.query.txt │ │ ├── floating_point.colon_obfuscated.txt │ │ ├── floating_point.explain.txt │ │ ├── floating_point.obfuscated.txt │ │ ├── floating_point.query.txt │ │ ├── function_with_strings.colon_obfuscated.txt │ │ ├── function_with_strings.explain.txt │ │ ├── function_with_strings.obfuscated.txt │ │ ├── function_with_strings.query.txt │ │ ├── quote_in_table_name.colon_obfuscated.txt │ │ ├── quote_in_table_name.explain.txt │ │ ├── quote_in_table_name.obfuscated.txt │ │ ├── quote_in_table_name.query.txt │ │ ├── subplan.colon_obfuscated.txt │ │ ├── subplan.explain.txt │ │ ├── subplan.obfuscated.txt │ │ ├── subplan.query.txt │ │ ├── where_with_integer.colon_obfuscated.txt │ │ ├── where_with_integer.explain.txt │ │ ├── where_with_integer.obfuscated.txt │ │ ├── where_with_integer.query.txt │ │ ├── where_with_regex_chars.colon_obfuscated.txt │ │ ├── where_with_regex_chars.explain.txt │ │ ├── where_with_regex_chars.obfuscated.txt │ │ ├── where_with_regex_chars.query.txt │ │ ├── where_with_substring.colon_obfuscated.txt │ │ ├── where_with_substring.explain.txt │ │ ├── where_with_substring.obfuscated.txt │ │ ├── where_with_substring.query.txt │ │ ├── with_escape_case1.colon_obfuscated.txt │ │ ├── with_escape_case1.explain.txt │ │ ├── with_escape_case1.obfuscated.txt │ │ ├── with_escape_case1.query.txt │ │ ├── with_escape_case2.colon_obfuscated.txt │ │ ├── with_escape_case2.explain.txt │ │ ├── with_escape_case2.obfuscated.txt │ │ ├── with_escape_case2.query.txt │ │ ├── with_escape_case3.colon_obfuscated.txt │ │ ├── with_escape_case3.explain.txt │ │ ├── with_escape_case3.obfuscated.txt │ │ ├── with_escape_case3.query.txt │ │ ├── with_escape_case4.colon_obfuscated.txt │ │ ├── with_escape_case4.explain.txt │ │ ├── with_escape_case4.obfuscated.txt │ │ ├── with_escape_case4.query.txt │ │ ├── with_escape_case5.colon_obfuscated.txt │ │ ├── with_escape_case5.explain.txt │ │ ├── with_escape_case5.obfuscated.txt │ │ ├── with_escape_case5.query.txt │ │ ├── with_escape_case6.colon_obfuscated.txt │ │ ├── with_escape_case6.explain.txt │ │ ├── with_escape_case6.obfuscated.txt │ │ ├── with_escape_case6.query.txt │ │ ├── with_escape_case7.colon_obfuscated.txt │ │ ├── with_escape_case7.explain.txt │ │ ├── with_escape_case7.obfuscated.txt │ │ ├── with_escape_case7.query.txt │ │ ├── with_escape_case8.colon_obfuscated.txt │ │ ├── with_escape_case8.explain.txt │ │ ├── with_escape_case8.obfuscated.txt │ │ ├── with_escape_case8.query.txt │ │ ├── with_escape_case9.colon_obfuscated.txt │ │ ├── with_escape_case9.explain.txt │ │ ├── with_escape_case9.obfuscated.txt │ │ └── with_escape_case9.query.txt │ ├── proc_cpuinfo │ │ ├── 1pack_1core_1logical.txt │ │ ├── 1pack_1core_2logical.txt │ │ ├── 1pack_2core_2logical.txt │ │ ├── 1pack_4core_4logical.txt │ │ ├── 2pack_12core_24logical.txt │ │ ├── 2pack_20core_40logical.txt │ │ ├── 2pack_2core_2logical.txt │ │ ├── 2pack_2core_4logical.txt │ │ ├── 2pack_4core_4logical.txt │ │ ├── 4pack_4core_4logical.txt │ │ ├── 8pack_8core_8logical.txt │ │ ├── README.md │ │ ├── Xpack_Xcore_2logical.txt │ │ └── malformed_file.txt │ ├── proc_meminfo │ │ ├── README.md │ │ └── meminfo_4096MB.txt │ ├── rules.json │ ├── rum_client_config.json │ ├── rum_footer_insertion_location │ │ ├── close-body-in-comment.html │ │ └── dynamic-iframe.html │ ├── rum_loader_insertion_location │ │ ├── basic.html │ │ ├── body_with_attributes.html │ │ ├── charset_tag.html │ │ ├── charset_tag_after_x_ua_tag.html │ │ ├── charset_tag_before_x_ua_tag.html │ │ ├── charset_tag_with_spaces.html │ │ ├── comments1.html │ │ ├── comments2.html │ │ ├── content_type_charset_tag.html │ │ ├── content_type_charset_tag_after_x_ua_tag.html │ │ ├── content_type_charset_tag_before_x_ua_tag.html │ │ ├── empty_head │ │ ├── gt_in_quotes1.html │ │ ├── gt_in_quotes2.html │ │ ├── gt_in_quotes_mismatch.html │ │ ├── gt_in_single_quotes1.html │ │ ├── gt_in_single_quotes_mismatch.html │ │ ├── head_with_attributes.html │ │ ├── incomplete_non_meta_tags.html │ │ ├── no_end_header.html │ │ ├── no_header.html │ │ ├── no_html_and_no_header.html │ │ ├── no_start_header.html │ │ ├── script1.html │ │ ├── script2.html │ │ ├── x_ua_meta_tag.html │ │ ├── x_ua_meta_tag_multiline.html │ │ ├── x_ua_meta_tag_multiple_tags.html │ │ ├── x_ua_meta_tag_spaces_around_equals.html │ │ ├── x_ua_meta_tag_with_others.html │ │ └── x_ua_meta_tag_with_spaces.html │ ├── sql_obfuscation │ │ ├── README.md │ │ └── sql_obfuscation.json │ ├── sql_parsing.json │ ├── synthetics │ │ ├── README.md │ │ └── synthetics.json │ ├── transaction_segment_terms.json │ ├── url_clean.json │ ├── url_domain_extraction.json │ ├── utilization │ │ ├── README.md │ │ ├── boot_id.json │ │ └── utilization_json.json │ └── utilization_vendor_specific │ │ ├── README.md │ │ ├── aws.json │ │ ├── azure.json │ │ ├── gcp.json │ │ └── pcf.json └── utilization │ ├── aws │ ├── ecs.json │ ├── invalid_chars.json │ ├── missing_value.json │ └── valid.json │ ├── azure │ ├── invalid_chars.json │ ├── missing_value.json │ └── valid.json │ └── gcp │ ├── invalid_chars.json │ ├── missing_value.json │ └── valid.json ├── helpers ├── config_scanning.rb ├── docker.rb ├── exceptions.rb ├── file_searching.rb ├── logging.rb ├── minitest.rb ├── misc.rb ├── mongo_metric_builder.rb ├── ruby_rails_mappings.rb └── transaction_sample.rb ├── intentional_fail.rb ├── minitest ├── test_time_plugin.rb └── test_time_reporter.rb ├── multiverse ├── .gitignore ├── README.md ├── lib │ ├── multiverse.rb │ └── multiverse │ │ ├── bundler_patch.rb │ │ ├── clobber.rb │ │ ├── color.rb │ │ ├── envfile.rb │ │ ├── gem_manifest.rb │ │ ├── output_collector.rb │ │ ├── runner.rb │ │ ├── shell_utils.rb │ │ ├── suite.rb │ │ └── time_report_output.rb ├── suites │ ├── active_record │ │ ├── .gitignore │ │ ├── Envfile │ │ ├── Rakefile │ │ ├── active_record_test.rb │ │ ├── app │ │ │ └── models │ │ │ │ └── models.rb │ │ ├── ar_method_aliasing.rb │ │ ├── before_suite.rb │ │ ├── config │ │ │ ├── database.rb │ │ │ ├── database.yml │ │ │ └── newrelic.yml │ │ └── db │ │ │ └── migrate │ │ │ ├── 20141105131800_create_users_and_aliases.rb │ │ │ ├── 20141106082200_create_orders_and_shipments.rb │ │ │ ├── 20150413011200_add_timestamps_to_orders.rb │ │ │ └── 20150414084400_create_groups.rb │ ├── active_record_pg │ │ ├── .gitignore │ │ ├── Envfile │ │ ├── Rakefile │ │ ├── active_record_test.rb │ │ ├── app │ │ │ └── models │ │ │ │ └── models.rb │ │ ├── ar_method_aliasing.rb │ │ ├── before_suite.rb │ │ ├── config │ │ │ ├── database.rb │ │ │ ├── database.yml │ │ │ └── newrelic.yml │ │ ├── db │ │ │ └── migrate │ │ │ │ ├── 20141105131800_create_users_and_aliases.rb │ │ │ │ ├── 20141106082200_create_orders_and_shipments.rb │ │ │ │ ├── 20150413011200_add_timestamps_to_orders.rb │ │ │ │ └── 20150414084400_create_groups.rb │ │ └── external_request_from_within_ar_block_test.rb │ ├── active_support_broadcast_logger │ │ ├── Envfile │ │ ├── active_support_broadcast_logger_test.rb │ │ └── config │ │ │ └── newrelic.yml │ ├── active_support_logger │ │ ├── Envfile │ │ ├── active_support_logger_test.rb │ │ └── config │ │ │ └── newrelic.yml │ ├── activemerchant │ │ ├── Envfile │ │ └── activemerchant_test.rb │ ├── agent_only │ │ ├── Envfile │ │ ├── adaptive_sampler_test.rb │ │ ├── agent_attributes_test.rb │ │ ├── agent_run_id_handling_test.rb │ │ ├── audit_log_test.rb │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── cross_application_tracing_test.rb │ │ ├── custom_analytics_events_test.rb │ │ ├── custom_queue_time_test.rb │ │ ├── encoding_handling_test.rb │ │ ├── error_events_test.rb │ │ ├── event_data_collection_test.rb │ │ ├── exclusive_time_test.rb │ │ ├── harvest_timestamps_test.rb │ │ ├── http_response_code_test.rb │ │ ├── keepalive_test.rb │ │ ├── key_transactions_test.rb │ │ ├── labels_test.rb │ │ ├── log_events_test.rb │ │ ├── logging_test.rb │ │ ├── marshaling_test.rb │ │ ├── pipe_manager_test.rb │ │ ├── rename_rule_test.rb │ │ ├── rum_instrumentation_test.rb │ │ ├── script │ │ │ ├── env_change.rb │ │ │ ├── loading.rb │ │ │ ├── public_api_when_disabled.rb │ │ │ ├── symbol_env.rb │ │ │ └── warnings.rb │ │ ├── service_timeout_test.rb │ │ ├── set_transaction_name_test.rb │ │ ├── span_events_test.rb │ │ ├── ssl_test.rb │ │ ├── start_up_test.rb │ │ ├── synthetics_test.rb │ │ ├── testing_app.rb │ │ ├── thread_profiling_test.rb │ │ ├── transaction_events_test.rb │ │ ├── transaction_ignoring_test.rb │ │ └── utilization_data_collection_test.rb │ ├── async_http │ │ ├── Envfile │ │ ├── async_http_instrumentation_test.rb │ │ └── config │ │ │ └── newrelic.yml │ ├── aws_sdk_firehose │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── firehose_instrumentation_test.rb │ ├── aws_sdk_kinesis │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── kinesis_instrumentation_test.rb │ ├── aws_sdk_lambda │ │ ├── Envfile │ │ ├── aws_sdk_lambda_instrumentation_test.rb │ │ ├── aws_sdk_monkeypatch.rb │ │ └── config │ │ │ └── newrelic.yml │ ├── awssqs │ │ ├── Envfile │ │ ├── awssqs_instrumentation_test.rb │ │ └── config │ │ │ └── newrelic.yml │ ├── bare │ │ ├── Envfile │ │ └── standalone_instrumentation_test.rb │ ├── bunny │ │ ├── Envfile │ │ ├── bunny_test.rb │ │ └── config │ │ │ └── newrelic.yml │ ├── capistrano │ │ ├── Capfile │ │ ├── Envfile │ │ ├── config │ │ │ ├── deploy.rb │ │ │ ├── deploy │ │ │ │ └── production.rb │ │ │ └── newrelic.yml │ │ └── deployment_test.rb │ ├── capistrano2 │ │ ├── Capfile │ │ ├── Envfile │ │ ├── config │ │ │ ├── deploy.rb │ │ │ └── newrelic.yml │ │ └── deployment_test.rb │ ├── concurrent_ruby │ │ ├── Envfile │ │ ├── concurrent_ruby_instrumentation_test.rb │ │ └── config │ │ │ └── newrelic.yml │ ├── config_file_loading │ │ ├── Envfile │ │ └── config_file_loading_test.rb │ ├── curb │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── curb_test.rb │ ├── deferred_instrumentation │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── sinatra_test.rb │ ├── delayed_job │ │ ├── Envfile │ │ ├── before_suite.rb │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── delayed_job_instrumentation_test.rb │ │ ├── delayed_job_sampler_test.rb │ │ └── unsupported_backend_test.rb │ ├── dynamodb │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── dynamodb_instrumentation_test.rb │ ├── elasticsearch │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── elasticsearch_instrumentation_test.rb │ ├── ethon │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── ethon_instrumentation_test.rb │ ├── excon │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── excon_test.rb │ ├── grape │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── grape_test.rb │ │ ├── grape_test_api.rb │ │ ├── grape_versioning_test.rb │ │ ├── grape_versioning_test_api.rb │ │ └── unsupported_version_test.rb │ ├── grpc │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── grpc_client_test.rb │ │ ├── grpc_server_test.rb │ │ └── helper_test.rb │ ├── high_security │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── high_security_test.rb │ ├── httpclient │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── httpclient_test.rb │ ├── httprb │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── httprb_test.rb │ ├── httpx │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── httpx_instrumentation_test.rb │ ├── hybrid_agent │ │ ├── Envfile │ │ ├── README.md │ │ ├── assertion_parameters.rb │ │ ├── commands.rb │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── hybrid_agent_test.rb │ │ ├── parsing_helpers.rb │ │ ├── span_test.rb │ │ ├── trace_propagator_test.rb │ │ ├── tracer_provider_test.rb │ │ ├── tracer_test.rb │ │ └── transaction_patch_test.rb │ ├── infinite_tracing │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── infinite_tracing_test.rb │ ├── json │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── json_test.rb │ ├── logger │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── logger_instrumentation_test.rb │ ├── logstasher │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── logstasher_instrumentation_test.rb │ ├── marshalling │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── marshalling_test.rb │ ├── memcache │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── dalli_test.rb │ │ ├── memcache_client_test.rb │ │ ├── memcache_test_cases.rb │ │ └── memcached_test.rb │ ├── mongo │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── helpers │ │ │ ├── mongo_helpers.rb │ │ │ ├── mongo_operation_tests.rb │ │ │ ├── mongo_replica_set.rb │ │ │ ├── mongo_replica_set_test.rb │ │ │ ├── mongo_server.rb │ │ │ └── mongo_server_test.rb │ │ ├── mongo2_instrumentation_test.rb │ │ ├── mongo_connection_test.rb │ │ ├── mongo_instrumentation_test.rb │ │ └── mongo_unsupported_version_test.rb │ ├── net_http │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── net_http_core_instrumentation_test.rb │ │ └── net_http_test.rb │ ├── opensearch │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── opensearch_instrumentation_test.rb │ ├── padrino │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── padrino_test.rb │ ├── rack │ │ ├── Envfile │ │ ├── before_suite.rb │ │ ├── builder_map_test.rb │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── example_app.rb │ │ ├── http_response_code_test.rb │ │ ├── nested_non_rack_app_test.rb │ │ ├── puma_rack_builder_test.rb │ │ ├── puma_rack_urlmap_test.rb │ │ ├── rack_auto_instrumentation_test.rb │ │ ├── rack_builder_test.rb │ │ ├── rack_cascade_test.rb │ │ ├── rack_env_mutation_test.rb │ │ ├── rack_parameter_filtering_test.rb │ │ ├── rack_unsupported_version_test.rb │ │ ├── response_content_type_test.rb │ │ └── url_map_test.rb │ ├── rails │ │ ├── Envfile │ │ ├── action_cable_test.rb │ │ ├── action_controller_live_rum_test.rb │ │ ├── action_controller_other_test.rb │ │ ├── activejob_test.rb │ │ ├── app.rb │ │ ├── app │ │ │ └── views │ │ │ │ ├── foos │ │ │ │ └── _foo.html.haml │ │ │ │ └── views │ │ │ │ ├── _a_partial.html.erb │ │ │ │ ├── _mid_partial.html.erb │ │ │ │ ├── _top_partial.html.erb │ │ │ │ ├── deep_partial.html.erb │ │ │ │ ├── haml_view.html.haml │ │ │ │ └── index.html.erb │ │ ├── bad_instrumentation_test.rb │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── dummy.txt │ │ ├── error_tracing_test.rb │ │ ├── gc_instrumentation_test.rb │ │ ├── ignore_test.rb │ │ ├── middleware_instrumentation_test.rb │ │ ├── middlewares.rb │ │ ├── parameter_capture_test.rb │ │ ├── queue_time_test.rb │ │ ├── rails3_app │ │ │ ├── app_rails3_plus.rb │ │ │ └── my_app.rb │ │ ├── rails_logger_test.rb │ │ ├── request_statistics_test.rb │ │ ├── transaction_ignoring_test.rb │ │ └── view_instrumentation_test.rb │ ├── rails_prepend │ │ ├── Envfile │ │ ├── newrelic_prepender │ │ │ ├── lib │ │ │ │ ├── newrelic_prepender.rb │ │ │ │ └── newrelic_prepender │ │ │ │ │ └── version.rb │ │ │ └── newrelic_prepender.gemspec │ │ └── prepended_supportability_test.rb │ ├── rake │ │ ├── Envfile │ │ ├── Rakefile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── instrumentation_test.rb │ │ ├── multitask_test.rb │ │ ├── rake_test.rb │ │ ├── rake_test_helper.rb │ │ └── unsupported_rake_test.rb │ ├── rdkafka │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── rdkafka_instrumentation_test.rb │ ├── redis │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── redis_instrumentation_test.rb │ │ └── redis_unsupported_version_test.rb │ ├── resque │ │ ├── Envfile │ │ ├── Rakefile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── instrumentation_test.rb │ │ └── resque_marshalling_test.rb │ ├── roda │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── ignorer_test.rb │ │ └── roda_instrumentation_test.rb │ ├── roda_agent_disabled │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── shim_test.rb │ ├── ruby_kafka │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── ruby_kafka_instrumentation_test.rb │ ├── ruby_openai │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── openai_helpers.rb │ │ └── ruby_openai_instrumentation_test.rb │ ├── sequel │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── database.rb │ │ ├── sequel_extension_test.rb │ │ ├── sequel_helpers.rb │ │ ├── sequel_plugin_test.rb │ │ └── sequel_safety_test.rb │ ├── sidekiq │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── log │ │ │ └── .gitkeep │ │ ├── sidekiq_args_filtration_test.rb │ │ ├── sidekiq_instrumentation_test.rb │ │ ├── sidekiq_test_helpers.rb │ │ └── sidekiq_with_redis_test.rb │ ├── sidekiq_delay_extensions │ │ ├── Envfile │ │ ├── Rakefile │ │ ├── app │ │ │ └── models │ │ │ │ └── dolce.rb │ │ ├── before_suite.rb │ │ ├── config │ │ │ ├── database.rb │ │ │ ├── database.yml │ │ │ └── newrelic.yml │ │ ├── db │ │ │ ├── migrate │ │ │ │ └── 20250317165716_create_dolces.rb │ │ │ └── schema.rb │ │ ├── sidekiq_delay_extension_instrumentation_test.rb │ │ └── sidekiq_delay_extensions_test_helpers.rb │ ├── sinatra │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── ignoring_test.rb │ │ ├── nested_middleware_test.rb │ │ ├── sinatra_classic_test.rb │ │ ├── sinatra_error_tracing_test.rb │ │ ├── sinatra_metric_explosion_test.rb │ │ ├── sinatra_modular_test.rb │ │ ├── sinatra_parameter_capture_test.rb │ │ ├── sinatra_routes_test.rb │ │ └── sinatra_test_cases.rb │ ├── sinatra_agent_disabled │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── shim_test.rb │ ├── stripe │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── stripe_instrumentation_test.rb │ ├── thread │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── thread_fiber_instrumentation_test.rb │ ├── tilt │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ ├── layout.haml │ │ ├── test.erb │ │ ├── test.haml │ │ └── tilt_instrumentation_test.rb │ ├── typhoeus │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── typhoeus_test.rb │ ├── unicorn │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── unicorn_test.rb │ ├── view_component │ │ ├── Envfile │ │ ├── config │ │ │ └── newrelic.yml │ │ └── view_component_instrumentation_test.rb │ └── yajl │ │ ├── Envfile │ │ ├── config │ │ └── newrelic.yml │ │ └── yajl_test.rb └── test │ └── suite_examples │ ├── one │ ├── a │ │ ├── Envfile │ │ ├── a_test.rb │ │ └── config │ │ │ └── newrelic.yml │ └── b │ │ ├── Envfile │ │ ├── b_test.rb │ │ └── config │ │ └── newrelic.yml │ ├── three │ ├── a │ │ ├── Envfile │ │ └── fail_test.rb │ └── b │ │ ├── Envfile │ │ └── win_test.rb │ └── two │ └── a │ ├── Envfile │ └── fail_test.rb ├── new_relic ├── FAKECHANGELOG ├── agent │ ├── adaptive_sampler_test.rb │ ├── agent │ │ ├── connect_test.rb │ │ ├── start_test.rb │ │ └── start_worker_thread_test.rb │ ├── agent_logger_test.rb │ ├── agent_test.rb │ ├── apdex_from_server_test.rb │ ├── api_tests │ │ └── datastore_api_test.rb │ ├── attribute_filter_test.rb │ ├── attribute_pre_filtering_test.rb │ ├── attribute_processing_test.rb │ ├── audit_logger_test.rb │ ├── autostart_test.rb │ ├── aws_test.rb │ ├── collector_hostname_test.rb │ ├── collector_response_code_test.rb │ ├── commands │ │ ├── agent_command_router_test.rb │ │ ├── agent_command_test.rb │ │ └── thread_profiler_session_test.rb │ ├── configuration │ │ ├── default_source_test.rb │ │ ├── dotted_hash_test.rb │ │ ├── environment_source_test.rb │ │ ├── event_harvest_config_test.rb │ │ ├── high_security_source_test.rb │ │ ├── manager_test.rb │ │ ├── manual_source_test.rb │ │ ├── orphan_configuration_test.rb │ │ ├── security_policy_source_test.rb │ │ ├── server_source_test.rb │ │ └── yaml_source_test.rb │ ├── connect │ │ ├── request_builder_test.rb │ │ └── response_handler_test.rb │ ├── custom_event_aggregator_test.rb │ ├── database │ │ ├── postgres_explain_obfuscator_test.rb │ │ └── sql_obfuscation_test.rb │ ├── database_test.rb │ ├── datastores │ │ ├── metric_helper_test.rb │ │ ├── mongo │ │ │ ├── event_formatter_test.rb │ │ │ └── metric_translator_test.rb │ │ ├── nosql_obfuscator_test.rb │ │ └── redis_test.rb │ ├── datastores_test.rb │ ├── deprecator_test.rb │ ├── distributed_tracing │ │ ├── distributed_trace_metrics_test.rb │ │ ├── distributed_trace_payload_test.rb │ │ ├── distributed_tracing_cross_agent_test.rb │ │ ├── trace_context_cross_agent_test.rb │ │ ├── trace_context_header_data_test.rb │ │ ├── trace_context_payload_test.rb │ │ └── trace_context_test.rb │ ├── distributed_tracing_test.rb │ ├── encoding_normalizer_test.rb │ ├── error_collector_test.rb │ ├── error_event_aggregator_test.rb │ ├── error_filter_test.rb │ ├── error_trace_aggregator_test.rb │ ├── event_aggregator_test.rb │ ├── event_listener_test.rb │ ├── event_loop_test.rb │ ├── external_test.rb │ ├── guid_generator_test.rb │ ├── harvester_test.rb │ ├── health_check_test.rb │ ├── heap_test.rb │ ├── hostname_test.rb │ ├── http_clients │ │ └── uri_util_test.rb │ ├── instrumentation │ │ ├── action_cable_subscriber_test.rb │ │ ├── action_controller_subscriber_test.rb │ │ ├── action_dispatch_subscriber_test.rb │ │ ├── action_mailbox_subscriber_test.rb │ │ ├── action_mailer_subscriber_test.rb │ │ ├── action_view_subscriber_test.rb │ │ ├── active_job_subscriber_test.rb │ │ ├── active_job_test.rb │ │ ├── active_record_helper_test.rb │ │ ├── active_record_subscriber_test.rb │ │ ├── active_storage_subscriber_test.rb │ │ ├── active_support_subscriber_test.rb │ │ ├── controller_instrumentation_test.rb │ │ ├── delayed_job_instrumentation_test.rb │ │ ├── instance_identification_test.rb │ │ ├── instrumentation_test.rb │ │ ├── middleware_proxy_test.rb │ │ ├── middleware_tracing_test.rb │ │ ├── mongodb_command_subscriber_test.rb │ │ ├── net_instrumentation_test.rb │ │ ├── notification_subscriber_test.rb │ │ ├── queue_time_test.rb │ │ ├── rack_test.rb │ │ ├── rails │ │ │ ├── action_cable_subscriber.rb │ │ │ ├── action_controller_subscriber.rb │ │ │ ├── action_dispatch_subscriber.rb │ │ │ ├── action_mailbox_subscriber.rb │ │ │ ├── action_mailer_subscriber.rb │ │ │ ├── action_view_subscriber.rb │ │ │ ├── active_job_subscriber.rb │ │ │ ├── active_record_subscriber.rb │ │ │ ├── active_storage_subscriber.rb │ │ │ ├── active_support_subscriber.rb │ │ │ ├── custom_events_subscriber_test.rb │ │ │ └── notifications_subscriber.rb │ │ ├── sequel_helper_test.rb │ │ ├── sinatra │ │ │ └── transaction_namer_test.rb │ │ ├── sinatra_test.rb │ │ └── task_instrumentation_test.rb │ ├── javascript_instrumentor_test.rb │ ├── linking_metadata_test.rb │ ├── llm │ │ ├── chat_completion_message_test.rb │ │ ├── chat_completion_summary_test.rb │ │ ├── embedding_test.rb │ │ ├── feedback_test.rb │ │ ├── llm_event_test.rb │ │ └── response_headers_test.rb │ ├── llm_test.rb │ ├── local_log_decorator_test.rb │ ├── log_event_aggregator_test.rb │ ├── log_event_attributes_test.rb │ ├── log_priority_test.rb │ ├── logging_test.rb │ ├── memory_logger_test.rb │ ├── messaging_test.rb │ ├── method_interrobang_test.rb │ ├── method_tracer │ │ ├── class_methods │ │ │ └── add_method_tracer_test.rb │ │ └── instance_methods │ │ │ └── trace_execution_scoped_test.rb │ ├── method_tracer_helpers_test.rb │ ├── method_tracer_params_test.rb │ ├── method_tracer_test.rb │ ├── method_visibility_test.rb │ ├── monitors │ │ ├── cross_app_monitor_test.rb │ │ ├── distributed_trace_monitor_test.rb │ │ ├── distributed_tracing_monitor_test.rb │ │ ├── inbound_request_monitor_test.rb │ │ ├── synthetics_monitor_test.rb │ │ └── trace_context_request_monitor_test.rb │ ├── new_relic_service │ │ ├── json_marshaller_test.rb │ │ └── security_policy_settings_test.rb │ ├── new_relic_service_test.rb │ ├── obfuscator_test.rb │ ├── opentelemetry_bridge_test.rb │ ├── parameter_filtering_test.rb │ ├── payload_metric_mapping_test.rb │ ├── pipe_channel_manager_test.rb │ ├── pipe_service_test.rb │ ├── priority_sampled_buffer_test.rb │ ├── rpm_agent_test.rb │ ├── rules_engine_test.rb │ ├── sampler_collection_test.rb │ ├── sampler_test.rb │ ├── samplers │ │ ├── cpu_sampler_test.rb │ │ ├── memory_sampler_test.rb │ │ └── vm_sampler_test.rb │ ├── serverless_handler_event_sources_test.rb │ ├── serverless_handler_test.rb │ ├── span_event_aggregator_test.rb │ ├── span_event_primitive_test.rb │ ├── span_events_test.rb │ ├── sql_sampler_test.rb │ ├── stats_engine │ │ ├── gc_profiler_test.rb │ │ └── stats_hash_test.rb │ ├── stats_engine_test.rb │ ├── stats_test.rb │ ├── supportability_test.rb │ ├── synthetics_event_aggregator_test.rb │ ├── system_info_test.rb │ ├── threading │ │ ├── agent_thread_test.rb │ │ ├── backtrace_node_test.rb │ │ ├── backtrace_service_test.rb │ │ ├── fake_thread.rb │ │ ├── thread_profile_test.rb │ │ └── threaded_test_case.rb │ ├── tracer_state_test.rb │ ├── tracer_test.rb │ ├── transaction │ │ ├── abstract_segment_test.rb │ │ ├── attributes_test.rb │ │ ├── datastore_segment_test.rb │ │ ├── distributed_tracer_test.rb │ │ ├── distributed_tracing_test.rb │ │ ├── external_request_segment_test.rb │ │ ├── message_broker_segment_test.rb │ │ ├── request_attributes_test.rb │ │ ├── segment_test.rb │ │ ├── slowest_sample_buffer_test.rb │ │ ├── synthetics_sample_buffer_test.rb │ │ ├── trace_builder_test.rb │ │ ├── trace_context_test.rb │ │ ├── trace_node_test.rb │ │ ├── trace_test.rb │ │ └── tracing_test.rb │ ├── transaction_error_primitive_test.rb │ ├── transaction_event_aggregator_test.rb │ ├── transaction_event_primitive_test.rb │ ├── transaction_event_recorder_test.rb │ ├── transaction_interrobang_test.rb │ ├── transaction_metrics_test.rb │ ├── transaction_sampler_test.rb │ ├── transaction_test.rb │ ├── transaction_time_aggregator_test.rb │ ├── utilization │ │ ├── aws_test.rb │ │ ├── azure_test.rb │ │ ├── gcp_test.rb │ │ ├── pcf_test.rb │ │ └── vendor_test.rb │ ├── utilization_data_test.rb │ ├── vm │ │ ├── c_ruby_vm_test.rb │ │ ├── monotonic_gc_profiler_test.rb │ │ └── snapshot_test.rb │ ├── vm_test.rb │ └── worker_loop_test.rb ├── agent_test.rb ├── boot │ └── strap_test.rb ├── cli │ └── commands │ │ ├── deployments_test.rb │ │ └── install_test.rb ├── coerce_test.rb ├── collection_helper_test.rb ├── common_aggregator_tests.rb ├── control │ ├── class_methods_test.rb │ ├── frameworks │ │ └── rails_test.rb │ ├── instance_methods_test.rb │ ├── instrumentation_test.rb │ └── security_interface_test.rb ├── control_test.rb ├── data_container_tests.rb ├── dependency_detection_test.rb ├── dispatcher_test.rb ├── environment_report_test.rb ├── evil_server.rb ├── fake_collector.rb ├── fake_external_server.rb ├── fake_instance_metadata_service.rb ├── fake_rpm_site.rb ├── fake_server.rb ├── filtering_test_app.rb ├── framework_test.rb ├── gemspec_files_test.rb ├── healthy_urls_test.rb ├── helper_test.rb ├── http_client_test_cases.rb ├── language_support_test.rb ├── latest_changes_test.rb ├── license_test.rb ├── load_test.rb ├── local_environment_test.rb ├── marshalling_test_cases.rb ├── metric_data_test.rb ├── metric_spec_test.rb ├── multiverse_helpers.rb ├── net_http_test_cases.rb ├── newrelic_rpm_test.rb ├── newrelicyml_test.rb ├── noticed_error_test.rb ├── rack │ ├── agent_hooks_test.rb │ ├── agent_middleware_test.rb │ └── browser_monitoring_test.rb ├── recipes │ └── helpers │ │ └── send_deployment_test.rb ├── slack_notifications_tests │ ├── gem_notifier_tests.rb │ └── slack_notifier_tests.rb ├── supportability_helper_test.rb ├── tasks │ └── bump_version_test.rb ├── test_time_reporter_test.rb ├── thread_local_storage_test.rb └── transaction_ignoring_test_cases.rb ├── nullverse ├── default_source_require_test.rb └── nullverse_helper.rb ├── performance ├── .simplecov ├── Gemfile ├── README.md ├── lib │ ├── performance.rb │ └── performance │ │ ├── baseline.rb │ │ ├── baseline_compare_reporter.rb │ │ ├── baseline_save_reporter.rb │ │ ├── console_reporter.rb │ │ ├── formatting_helpers.rb │ │ ├── hako_client.rb │ │ ├── hako_reporter.rb │ │ ├── instrumentation │ │ ├── cpu_usage.rb │ │ ├── gc_stats.rb │ │ ├── perf_tools.rb │ │ └── stackprof.rb │ │ ├── instrumentor.rb │ │ ├── json_reporter.rb │ │ ├── options.rb │ │ ├── platform.rb │ │ ├── reporting.rb │ │ ├── result.rb │ │ ├── runner.rb │ │ ├── table.rb │ │ ├── test_case.rb │ │ └── timer.rb ├── rails_app │ ├── Rakefile │ ├── app │ │ ├── controllers │ │ │ └── application_controller.rb │ │ └── models │ │ │ └── application_record.rb │ ├── bin │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── credentials.yml.enc │ │ ├── database.yml │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── cors.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ └── inflections.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── master.key │ │ ├── puma.rb │ │ └── routes.rb │ ├── db │ │ └── seeds.rb │ └── lib │ │ └── tasks │ │ └── .keep ├── script │ ├── baselines │ ├── mega-runner │ └── runner └── suites │ ├── active_record.rb │ ├── active_record_subscriber.rb │ ├── agent_attributes.rb │ ├── agent_module.rb │ ├── config.rb │ ├── datastores.rb │ ├── error_collector.rb │ ├── external_segment.rb │ ├── logging.rb │ ├── marshalling.rb │ ├── method_tracer.rb │ ├── queue_time.rb │ ├── rack_middleware.rb │ ├── redis.rb │ ├── rules_engine.rb │ ├── rum_autoinsertion.rb │ ├── segment_terms_rule.rb │ ├── sql_obfuscation.rb │ ├── startup.rb │ ├── stats_hash.rb │ ├── thread_profiling.rb │ ├── trace_context.rb │ ├── trace_context_request_monitor.rb │ ├── trace_execution_scoped.rb │ └── transaction_tracing.rb ├── script ├── before_install │ ├── conditionally_upgrade_rubygems.sh │ ├── gemstash_mirror.sh │ └── update_rubygems.sh ├── before_script │ └── install_mongodb.sh ├── external_server.rb ├── install_mysql55 ├── path_hash.rb └── run_tests ├── simplecov_test_helper.rb ├── test_helper.rb └── warning_test_helper.rb /.build_ignore: -------------------------------------------------------------------------------- 1 | .github/ 2 | .gitignore 3 | .project 4 | .rubocop.yml 5 | .rubocop_todo.yml 6 | .simplecov 7 | .snyk 8 | .yardopts 9 | Brewfile 10 | CONTRIBUTING.md 11 | Dockerfile 12 | DOCKER.md 13 | docker-compose.yml 14 | config/ 15 | config.dot 16 | infinite_tracing/ 17 | Guardfile 18 | lefthook.yml 19 | log/ 20 | README.md 21 | test/ 22 | lib/tasks/bump_version.rb 23 | lib/tasks/coverage_report.rb 24 | lib/tasks/instrumentation_generator/ 25 | lib/tasks/multiverse.rake 26 | lib/tasks/multiverse.rb 27 | lib/tasks/tests.rb 28 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Ruby agent code owners: 2 | * @fallwith @hannahramadan @kaylareopelle @tannalynn 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Troubleshooting 4 | url: https://github.com/newrelic/newrelic-ruby-agent#support 5 | about: checkout the README for troubleshooting directions -------------------------------------------------------------------------------- /.github/actions/annotate/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Annotate Errors' 2 | description: 'Annotates errors if an errors.txt file is present' 3 | author: New Relic 4 | runs: 5 | using: 'node16' 6 | main: 'dist/index.js' 7 | -------------------------------------------------------------------------------- /.github/actions/annotate/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | cd .github/actions/annotate 4 | yarn run package 5 | exec git add dist/index.js 6 | -------------------------------------------------------------------------------- /.github/actions/issue_closer/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Issue Closer' 2 | description: 'Close GitHub Issues on PR merges to non-default branches' 3 | inputs: 4 | token: 5 | description: 'A GitHub token with PR read and Issue close permissions' 6 | required: true 7 | runs: 8 | using: 'node20' 9 | main: 'dist/index.js' 10 | -------------------------------------------------------------------------------- /.github/actions/simplecov-report/__tests__/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/.github/actions/simplecov-report/__tests__/.keep -------------------------------------------------------------------------------- /.github/actions/simplecov-report/__tests__/main.test.ts: -------------------------------------------------------------------------------- 1 | test('test runs', () => { 2 | console.log('todo') 3 | }) 4 | -------------------------------------------------------------------------------- /.github/actions/simplecov-report/dummy_coverage/.last_run.json: -------------------------------------------------------------------------------- 1 | { 2 | "result": { 3 | "covered_percent": 93.08 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.github/actions/simplecov-report/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ['js', 'ts'], 4 | testEnvironment: 'node', 5 | testMatch: ['**/*.test.ts'], 6 | testRunner: 'jest-circus/runner', 7 | transform: { 8 | '^.+\\.ts$': 'ts-jest' 9 | }, 10 | verbose: true 11 | } -------------------------------------------------------------------------------- /.github/actions/variable-mapper/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ['js', 'ts'], 4 | testEnvironment: 'node', 5 | testMatch: ['**/*.test.ts'], 6 | testRunner: 'jest-circus/runner', 7 | transform: { 8 | '^.+\\.ts$': 'ts-jest' 9 | }, 10 | verbose: true 11 | } -------------------------------------------------------------------------------- /.github/actions/workflow-conclusion/build.json: -------------------------------------------------------------------------------- 1 | {"owner":"technote-space","repo":"workflow-conclusion-action","sha":"b74a7a0d9818c8e902cbb4fcc25f6def35dc48b3","ref":"refs/tags/v3.0.3","tagName":"v3.0.3","branch":"gh-actions","tags":["v3.0.3","v3.0","v3"],"updated_at":"2022-12-06T16:52:47.549Z"} -------------------------------------------------------------------------------- /.github/actions/workflow-conclusion/lib/constant.d.ts: -------------------------------------------------------------------------------- 1 | export declare const CONCLUSIONS: string[]; 2 | -------------------------------------------------------------------------------- /.github/actions/workflow-conclusion/lib/main.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /.github/actions/workflow-conclusion/lib/process.test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /.github/actions/workflow-conclusion/lib/setup.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 2 3 | updates: 4 | - package-ecosystem: github-actions 5 | directory: "/" 6 | schedule: 7 | interval: monthly 8 | -------------------------------------------------------------------------------- /.github/workflows/add_issues_to_project.yml: -------------------------------------------------------------------------------- 1 | name: Add new issues to project 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | 8 | jobs: 9 | add-to-project: 10 | name: Add issue to project 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # tag 1.0.2 14 | with: 15 | project-url: https://github.com/orgs/newrelic/projects/84 16 | github-token: ${{ secrets.NEW_RELIC_RUBY_AGENT_BOT_GITHUB_ADD_TO_PROJECT_ACTION }} 17 | -------------------------------------------------------------------------------- /.github/workflows/pr_closed.yml: -------------------------------------------------------------------------------- 1 | name: PR Closed 2 | 3 | on: 4 | pull_request: 5 | types: 6 | - closed 7 | 8 | jobs: 9 | issue_closer: 10 | if: github.event.pull_request.merged == true 11 | runs-on: ubuntu-latest 12 | permissions: write-all 13 | steps: 14 | - name: Clone the repo 15 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag v4.2.2 16 | - name: issue_closer Action 17 | uses: ./.github/actions/issue_closer 18 | with: 19 | token: ${{ secrets.GITHUB_TOKEN }} # permission needed to read PR comments and close issues 20 | -------------------------------------------------------------------------------- /.github/workflows/scripts/rubygems-authenticate.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import argparse 4 | import onetimepass 5 | 6 | if __name__ == '__main__': 7 | 8 | parser = argparse.ArgumentParser( 9 | description='Generate a one-time password from a key' 10 | ) 11 | parser.add_argument('env_var', type=str, help='The name of the environment variable from which to load the MFA key from the service') 12 | args = parser.parse_args() 13 | print(onetimepass.get_totp(os.getenv(args.env_var))) 14 | -------------------------------------------------------------------------------- /.simplecov: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'securerandom' 4 | 5 | if ENV['CI'] 6 | random = SecureRandom.uuid 7 | SimpleCov.command_name(random) 8 | SimpleCov.coverage_dir("coverage_#{random}") 9 | end 10 | 11 | SimpleCov.start do 12 | # enable_coverage(:branch) 13 | SimpleCov.root(File.join(File.dirname(__FILE__), '/lib')) 14 | track_files('**/*.rb') 15 | formatter(SimpleCov::Formatter::SimpleFormatter) if ENV['CI'] 16 | end 17 | -------------------------------------------------------------------------------- /.snyk: -------------------------------------------------------------------------------- 1 | exclude: 2 | global: 3 | # The project Dockerfile is only used to orchestrate container usage for 4 | # local development with containers that are not to be exposed to the 5 | # outside world. We use vanilla "ruby" images and do not layer on any 6 | # additional software dependencies or configurations ourselves that would 7 | # change the original "ruby" images' security profile. We defer all 8 | # security mitigation for the images to the "ruby" image maintainers (who 9 | # themselves are periodically updating their base Ubuntu layers to mitigate 10 | # issues). 11 | - Dockerfile 12 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | brew 'elasticsearch' 4 | brew 'imagemagick' 5 | brew 'memcached' 6 | tap 'mongodb/brew' 7 | brew 'mongodb-community' 8 | brew 'mysql' 9 | brew 'openssl' 10 | brew 'pkg-config' 11 | brew 'postgresql' 12 | brew 'rabbitmq' 13 | brew 'redis' 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG ruby_version=3.1 2 | 3 | FROM ruby:$ruby_version 4 | 5 | WORKDIR /usr/src/app 6 | 7 | COPY . . 8 | RUN bundle install 9 | 10 | CMD ["bundle", "exec", "rake"] 11 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | source 'https://rubygems.org' 6 | gemspec name: 'newrelic_rpm' 7 | -------------------------------------------------------------------------------- /Thorfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | Dir['./lib/tasks/**/*.thor'].sort.each { |f| load f } 6 | -------------------------------------------------------------------------------- /bin/newrelic: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # This command has been renamed "newrelic_rpm" 5 | # executes one of the commands in the new_relic/commands directory 6 | # pass the name of the command as an argument 7 | 8 | load File.dirname(__FILE__) + '/newrelic_rpm' 9 | -------------------------------------------------------------------------------- /bin/newrelic_rpm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # executes one of the commands in the new_relic/commands directory 5 | # pass the name of the command as an argument 6 | 7 | $LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) 8 | require 'new_relic/cli/command' 9 | begin 10 | NewRelic::Cli::Command.run 11 | rescue NewRelic::Cli::Command::CommandFailure => failure 12 | STDERR.puts failure.message 13 | STDERR.puts failure.options if failure.options 14 | exit(1) 15 | end 16 | -------------------------------------------------------------------------------- /infinite_tracing/.gitignore: -------------------------------------------------------------------------------- 1 | LICENSE 2 | CONTRIBUTING.md 3 | -------------------------------------------------------------------------------- /infinite_tracing/Gemfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | source 'https://rubygems.org' 6 | 7 | gemspec name: 'newrelic-infinite_tracing' 8 | 9 | group :development do 10 | gem 'newrelic_rpm', path: '..' 11 | end 12 | -------------------------------------------------------------------------------- /infinite_tracing/lib/infinite_tracing/version.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module InfiniteTracing 8 | VERSION = NewRelic::VERSION 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /infinite_tracing/tasks/all.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # This is required to load in task definitions 6 | Dir.glob(File.join(File.dirname(__FILE__), '*.rake')) do |file| 7 | load file 8 | end 9 | -------------------------------------------------------------------------------- /infinite_tracing/test/fixtures/span_events/single.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: Span 3 | traceId: cb4925eee573c1f9c786fdb2b296459b 4 | guid: 0400ca1d25603072 5 | transactionId: fc81b7e3ba0476e3 6 | sampled: true 7 | priority: 1.274452 8 | timestamp: 1586870228134 9 | duration: 0.0 10 | name: Nested/Controller/Rack/Example::Application/call 11 | nr.entryPoint: true 12 | category: generic 13 | - &1 {} 14 | - *1 -------------------------------------------------------------------------------- /infinite_tracing/test/fixtures/span_events/single_full_attributes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: Span 3 | traceId: cb4925eee573c1f9c786fdb2b296459b 4 | guid: 0400ca1d25603072 5 | transactionId: fc81b7e3ba0476e3 6 | sampled: true 7 | priority: 1.274452 8 | timestamp: 1586870228134 9 | duration: 0.0 10 | name: Nested/Controller/Rack/Example::Application/call 11 | nr.entryPoint: true 12 | category: generic 13 | - luke: Skywalker 14 | white: Walker 15 | - error.message: '500: Internal Server Error' 16 | error.class: ApplicationController::ExternalApiError 17 | error.expected: true 18 | -------------------------------------------------------------------------------- /infinite_tracing/test/fixtures/span_events/single_with_agent_attributes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: Span 3 | traceId: cb4925eee573c1f9c786fdb2b296459b 4 | guid: 0400ca1d25603072 5 | transactionId: fc81b7e3ba0476e3 6 | sampled: true 7 | priority: 1.274452 8 | timestamp: 1586870228134 9 | duration: 0.0 10 | name: Nested/Controller/Rack/Example::Application/call 11 | nr.entryPoint: true 12 | category: generic 13 | - {} 14 | - error.message: '500: Internal Server Error' 15 | error.class: ApplicationController::ExternalApiError 16 | error.expected: true 17 | -------------------------------------------------------------------------------- /infinite_tracing/test/fixtures/span_events/single_with_user_attributes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: Span 3 | traceId: cb4925eee573c1f9c786fdb2b296459b 4 | guid: 0400ca1d25603072 5 | transactionId: fc81b7e3ba0476e3 6 | sampled: true 7 | priority: 1.274452 8 | timestamp: 1586870228134 9 | duration: 0.0 10 | name: Nested/Controller/Rack/Example::Application/call 11 | nr.entryPoint: true 12 | category: generic 13 | - luke: Skywalker 14 | white: Walker 15 | - {} -------------------------------------------------------------------------------- /install.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | if __FILE__ == $0 || $0.include?('script/plugin') || File.basename($0) == 'rake' 6 | $LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), 'lib')) 7 | require 'new_relic/cli/command' 8 | begin 9 | NewRelic::Cli::Install.new(:quiet => true, :app_name => 'My Application').run 10 | rescue NewRelic::Cli::Command::CommandFailure => e 11 | $stderr.puts e.message 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lefthook.yml: -------------------------------------------------------------------------------- 1 | # Lefthook (https://github.com/evilmartians/lefthook) is a git hooks manager 2 | # Install it on your machine by running `gem install lefthook` 3 | pre-commit: 4 | parallel: true 5 | commands: 6 | rubocop: 7 | files: git diff --name-only --staged 8 | glob: "*.rb" 9 | run: rubocop --force-exclusion {files} 10 | -------------------------------------------------------------------------------- /lib/new_relic/agent/chained_call.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # This class is used by NewRelic::Agent.set_sql_obfuscator to chain multiple 6 | # obfuscation blocks when not using the default :replace action 7 | class NewRelic::ChainedCall 8 | def initialize(block1, block2) 9 | @block1 = block1 10 | @block2 = block2 11 | end 12 | 13 | def call(sql) 14 | sql = @block1.call(sql) 15 | @block2.call(sql) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/new_relic/agent/configuration/manual_source.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/agent/configuration/dotted_hash' 6 | 7 | module NewRelic 8 | module Agent 9 | module Configuration 10 | class ManualSource < DottedHash 11 | def initialize(hash) 12 | super(hash, true) 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/new_relic/agent/configuration/mask_defaults.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module Configuration 8 | MASK_DEFAULTS = { 9 | :'thread_profiler' => proc { !NewRelic::Agent::Threading::BacktraceService.is_supported? }, 10 | :'thread_profiler.enabled' => proc { !NewRelic::Agent::Threading::BacktraceService.is_supported? } 11 | } 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/agent' 6 | module NewRelic 7 | module Agent 8 | # stub module that contains instrumentation defined in the 9 | # instrumentation directory 10 | module Instrumentation 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/active_support_logger/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module ActiveSupportLogger::Prepend 7 | include NewRelic::Agent::Instrumentation::ActiveSupportLogger 8 | def broadcast(logger) 9 | broadcast_with_tracing(logger) { super } 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/async_http/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'instrumentation' 6 | 7 | module NewRelic::Agent::Instrumentation 8 | module AsyncHttp::Prepend 9 | include NewRelic::Agent::Instrumentation::AsyncHttp 10 | 11 | def call(method, url, headers = nil, body = nil) 12 | call_with_new_relic(method, url, headers, body) { |hdr| super(method, url, hdr, body) } 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/aws_sdk_firehose/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Firehose::Prepend 7 | include NewRelic::Agent::Instrumentation::Firehose 8 | 9 | INSTRUMENTED_METHODS.each do |method_name| 10 | define_method(method_name) do |*args| 11 | instrument_method_with_new_relic(method_name, *args) { super(*args) } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/aws_sdk_kinesis/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Kinesis::Prepend 7 | include NewRelic::Agent::Instrumentation::Kinesis 8 | 9 | INSTRUMENTED_METHODS.each do |method_name| 10 | define_method(method_name) do |*args| 11 | instrument_method_with_new_relic(method_name, *args) { super(*args) } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/elasticsearch/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Elasticsearch::Prepend 7 | include NewRelic::Agent::Instrumentation::Elasticsearch 8 | 9 | def perform_request(*args) 10 | perform_request_with_tracing(*args) { super } 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/grape/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Grape 7 | module Prepend 8 | def call(env) 9 | begin 10 | super(env) 11 | ensure 12 | Grape::Instrumentation.capture_transaction(env, self) 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/httpclient/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module HTTPClient 7 | module Prepend 8 | include NewRelic::Agent::Instrumentation::HTTPClient::Instrumentation 9 | 10 | def do_get_block(req, proxy, conn, &block) 11 | with_tracing(req, conn) { super } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/httprb/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module HTTPrb 7 | module Prepend 8 | include NewRelic::Agent::Instrumentation::HTTPrb 9 | 10 | def perform(request, options) 11 | with_tracing(request) { super } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/httpx/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module HTTPX 7 | module Prepend 8 | include NewRelic::Agent::Instrumentation::HTTPX 9 | 10 | def send_requests(*requests) 11 | send_requests_with_tracing(*requests) { super } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/logger/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Logger::Prepend 7 | include NewRelic::Agent::Instrumentation::Logger 8 | 9 | def format_message(severity, datetime, progname, msg) 10 | format_message_with_tracing(severity, datetime, progname, msg) { super } 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/logstasher/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module LogStasher::Prepend 7 | include NewRelic::Agent::Instrumentation::LogStasher 8 | 9 | def build_logstash_event(*args) 10 | build_logstash_event_with_new_relic(*args) { super } 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/memcache/chain.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Memcache 7 | module Chain 8 | extend Helper 9 | 10 | def self.instrument!(target_class) 11 | instrument_methods(target_class, client_methods) 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/opensearch/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module OpenSearch::Prepend 7 | include NewRelic::Agent::Instrumentation::OpenSearch 8 | 9 | def perform_request(*args) 10 | perform_request_with_tracing(*args) { super } 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/rake/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Rake 7 | module Prepend 8 | include NewRelic::Agent::Instrumentation::Rake::Tracer 9 | def invoke(*args) 10 | invoke_with_newrelic_tracing(*args) { super } 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/resque/helper.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module Instrumentation 8 | module Resque 9 | module Helper 10 | extend self 11 | 12 | def resque_fork_per_job? 13 | ENV['FORK_PER_JOB'] != 'false' && NewRelic::LanguageSupport.can_fork? 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/resque/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Resque 7 | module Prepend 8 | include NewRelic::Agent::Instrumentation::Resque 9 | 10 | def perform 11 | with_tracing { super } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/thread.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'thread/chain' 6 | require_relative 'thread/prepend' 7 | 8 | DependencyDetection.defer do 9 | named :thread 10 | 11 | executes do 12 | if use_prepend? 13 | prepend_instrument Thread, NewRelic::Agent::Instrumentation::MonitoredThread::Prepend 14 | else 15 | chain_instrument NewRelic::Agent::Instrumentation::MonitoredThread::Chain 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/tilt/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Tilt::Prepend 7 | include NewRelic::Agent::Instrumentation::Tilt 8 | 9 | def render(*args, &block) 10 | render_with_tracing { super } 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/typhoeus/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module Typhoeus 7 | module Prepend 8 | include NewRelic::Agent::Instrumentation::Typhoeus 9 | def run(*args) 10 | with_tracing { super } 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/new_relic/agent/instrumentation/view_component/prepend.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module ViewComponent::Prepend 7 | include NewRelic::Agent::Instrumentation::ViewComponent 8 | 9 | def render_in(*args) 10 | render_in_with_tracing(*args) { super } 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/log_priority.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/agent/event_aggregator' 6 | 7 | # Stateless calculation of priority for a given log event 8 | module NewRelic 9 | module Agent 10 | module LogPriority 11 | extend self 12 | 13 | def priority_for(txn) 14 | return txn.priority if txn 15 | 16 | rand.round(NewRelic::PRIORITY_PRECISION) 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/new_relic/agent/opentelemetry/context.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module OpenTelemetry 8 | module Context 9 | require_relative 'context/propagation' 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/new_relic/agent/opentelemetry/context/propagation.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module OpenTelemetry 8 | module Context 9 | module Propagation 10 | require_relative 'propagation/trace_propagator' 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/opentelemetry/trace.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module OpenTelemetry 8 | module Trace 9 | require_relative 'trace/tracer_provider' 10 | require_relative 'trace/tracer' 11 | require_relative 'trace/span' 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/new_relic/agent/opentelemetry/trace/span.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module OpenTelemetry 8 | module Trace 9 | class Span < ::OpenTelemetry::Trace::Span 10 | attr_accessor :finishable 11 | 12 | def finish(end_timestamp: nil) 13 | finishable&.finish 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/new_relic/agent/prepend_supportability.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module PrependSupportability 8 | def self.record_metrics_for(*classes) 9 | classes.each do |klass| 10 | count = klass.send(:ancestors).index(klass) 11 | ::NewRelic::Agent.record_metric("Supportability/PrependedModules/#{klass}", count) if count > 0 12 | end 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/new_relic/agent/timestamp_sampled_buffer.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/agent/heap' 6 | 7 | module NewRelic 8 | module Agent 9 | class TimestampSampledBuffer < PrioritySampledBuffer 10 | TIMESTAMP_KEY = 'timestamp'.freeze 11 | 12 | private 13 | 14 | def priority_for(event) 15 | -event[0][TIMESTAMP_KEY] 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/new_relic/agent/utilization/azure.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Agent 7 | module Utilization 8 | class Azure < Vendor 9 | vendor_name 'azure' 10 | endpoint 'http://169.254.169.254/metadata/instance/compute?api-version=2017-03-01' 11 | headers 'Metadata' => 'true' 12 | keys %w[vmId name vmSize location] 13 | key_transforms :to_sym 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/new_relic/base64.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module Base64 7 | extend self 8 | 9 | def encode64(bin) 10 | [bin].pack('m') 11 | end 12 | 13 | def decode64(str) 14 | str.unpack1('m') 15 | end 16 | 17 | def strict_encode64(bin) 18 | [bin].pack('m0') 19 | end 20 | 21 | def strict_decode64(str) 22 | str.unpack1('m0') 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/new_relic/control/frameworks.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | class Control 7 | # Contains subclasses of NewRelic::Control that are used when 8 | # starting the agent within an application. Framework-specific 9 | # logic should be included here, as documented within the Control 10 | # abstract parent class 11 | module Frameworks 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/new_relic/control/frameworks/grape.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/control/frameworks/ruby' 6 | module NewRelic 7 | class Control 8 | module Frameworks 9 | # Contains basic control logic for Grape 10 | class Grape < NewRelic::Control::Frameworks::Ruby 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/new_relic/control/frameworks/padrino.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/control/frameworks/sinatra' 6 | module NewRelic 7 | class Control 8 | module Frameworks 9 | # Contains basic control logic for Padrino 10 | class Padrino < NewRelic::Control::Frameworks::Sinatra 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/new_relic/control/frameworks/rails_notifications.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/control/frameworks/rails4' 6 | 7 | module NewRelic 8 | class Control 9 | module Frameworks 10 | class RailsNotifications < NewRelic::Control::Frameworks::Rails4 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/new_relic/delayed_job_injection.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module DelayedJobInjection 7 | extend self 8 | attr_accessor :worker_name 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/new_relic/rack.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # @api public 6 | module NewRelic 7 | # This module contains Rack middlewares used by the Ruby agent. 8 | # 9 | # Generally, these middlewares should be injected automatically when starting 10 | # your application. If automatic injection into the middleware chain is not 11 | # working for some reason, you may also include them manually. 12 | # 13 | # 14 | # @api public 15 | module Rack 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/new_relic/version.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 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 5 | 6 | module NewRelic 7 | module VERSION # :nodoc: 8 | MAJOR = 9 9 | MINOR = 19 10 | TINY = 0 11 | 12 | STRING = "#{MAJOR}.#{MINOR}.#{TINY}" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/tasks/all.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # This is required to load in task definitions 6 | Dir.glob(File.join(File.dirname(__FILE__), '*.rake')) do |file| 7 | load file 8 | end 9 | -------------------------------------------------------------------------------- /lib/tasks/helpers/config.text.erb: -------------------------------------------------------------------------------- 1 | <% sections.each do |(section_key, section_name, section_description, configs)| %><% configs.each do |config| %> 2 | <%= config[:key] %> 3 | <%= config[:description] %> 4 | 5 | Type: <%= config[:type] %> 6 | Default: <%= config[:default] %> 7 | Environ var: <%= config[:env_var] %> 8 | ------------------------------<% end %><% end %> 9 | -------------------------------------------------------------------------------- /lib/tasks/helpers/matches.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module Matches 6 | def look_for_seed(tasks) 7 | matches = tasks.map { |t| /(seed=.*?)[,\]]/.match(t) }.compact 8 | if matches.any? 9 | matches.first[1] 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/tasks/install.rake: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | namespace :newrelic do 6 | desc 'Install a default config/newrelic.yml file' 7 | task :install do 8 | load File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'install.rb')) 9 | end 10 | 11 | desc 'Gratefulness is always appreciated' 12 | task :thanks do 13 | puts 'The Ruby agent team is grateful to Jim Weirich for his kindness and his code. He will be missed.' 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/tasks/instrumentation_generator/templates/Envfile.tt: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | gem '<%= @name.downcase %>' 9 | RB 10 | -------------------------------------------------------------------------------- /lib/tasks/instrumentation_generator/templates/chain_method.tt: -------------------------------------------------------------------------------- 1 | alias_method(:<%= @method.downcase %>_without_new_relic, :<%= @method.downcase %>) 2 | 3 | def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %> 4 | <%= @method.downcase %>_with_new_relic<%= "(#{@args})" unless @args.empty? %> do 5 | <%= @method.downcase %>_without_new_relic<%= "(#{@args})" unless @args.empty? %> 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/tasks/instrumentation_generator/templates/instrumentation_method.tt: -------------------------------------------------------------------------------- 1 | def <%= @method.downcase %>_with_new_relic<%= "(#{@args})" unless @args.empty? %> 2 | # add instrumentation content here 3 | end 4 | -------------------------------------------------------------------------------- /lib/tasks/instrumentation_generator/templates/newrelic.yml.tt: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | <%= @snake_name %>: <%= @instrumentation_method_global_erb_snippet %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /lib/tasks/instrumentation_generator/templates/prepend.tt: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic::Agent::Instrumentation 6 | module <%= @class_name %>::Prepend 7 | include NewRelic::Agent::Instrumentation::<%= @class_name %> 8 | 9 | def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %> 10 | <%= @method.downcase %>_with_new_relic<%= "(#{@args})" unless @args.empty? %> { super } 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/tasks/instrumentation_generator/templates/prepend_method.tt: -------------------------------------------------------------------------------- 1 | def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %> 2 | <%= @method.downcase %>_with_new_relic<%= "(#{@args})" unless @args.empty? %> { super } 3 | end 4 | -------------------------------------------------------------------------------- /lib/tasks/instrumentation_generator/templates/test.tt: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class <%= @class_name %>InstrumentationTest < Minitest::Test 6 | def setup 7 | @stats_engine = NewRelic::Agent.instance.stats_engine 8 | end 9 | 10 | def teardown 11 | NewRelic::Agent.instance.stats_engine.clear_stats 12 | end 13 | 14 | # Add tests here 15 | end 16 | -------------------------------------------------------------------------------- /lib/tasks/multiverse.rake: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Guts of task are in a .rb file to allow requiring from external gems 6 | require "#{File.join(File.dirname(__FILE__))}/multiverse" 7 | -------------------------------------------------------------------------------- /lib/tasks/newrelic.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # 6 | # If you are looking to instrument rake tasks in a Rails environment, but the 7 | # task doesn't depend on :environment, this task may be included to ensure that 8 | # the agent will load. 9 | 10 | NewRelic::Agent.manual_start(:sync_startup => false) 11 | -------------------------------------------------------------------------------- /lib/tasks/newrelicyml.rake: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'helpers/newrelicyml' 6 | 7 | namespace :newrelic do 8 | desc 'Update newrelic.yml with latest config options from default_source.rb' 9 | task :update_newrelicyml do 10 | NewRelicYML.write_file 11 | puts 'newrelic.yml updated' 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /recipes/newrelic.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # The capistrano recipes in plugins are automatically 6 | # loaded from here. From gems, they are available from 7 | # the lib directory. We have to make them available from 8 | # both locations 9 | 10 | require File.join(File.dirname(__FILE__), '..', 'lib', 'new_relic', 'recipes') 11 | -------------------------------------------------------------------------------- /test/environments/.gitignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | test/reports/ 3 | coverage/ 4 | .idea/ 5 | tmp/ 6 | .project 7 | **/db/*.sqlite3 8 | **/vendor/plugins 9 | .DS_Store 10 | .DS\_Store 11 | .svn/ 12 | *~ 13 | pkg/ 14 | /tmp 15 | **/log/*.log 16 | **/tmp/**/* 17 | -------------------------------------------------------------------------------- /test/environments/norails/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Add your own tasks in files placed in lib/tasks ending in .rake, 6 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 7 | 8 | require_relative '../../warning_test_helper' 9 | 10 | require 'rake' 11 | require 'tasks/all' 12 | 13 | ENV['NO_RAILS'] = '1' 14 | 15 | task :default => [:'test:newrelic'] 16 | -------------------------------------------------------------------------------- /test/environments/rails40/.bundler-version: -------------------------------------------------------------------------------- 1 | 1.17.3 2 | -------------------------------------------------------------------------------- /test/environments/rails40/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails40/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails40/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails40/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails41/.bundler-version: -------------------------------------------------------------------------------- 1 | 1.17.3 2 | -------------------------------------------------------------------------------- /test/environments/rails41/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails41/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails41/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails41/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails42/.bundler-version: -------------------------------------------------------------------------------- 1 | 1.17.3 2 | -------------------------------------------------------------------------------- /test/environments/rails42/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails42/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails42/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails42/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails50/.bundler-version: -------------------------------------------------------------------------------- 1 | 1.17.3 2 | -------------------------------------------------------------------------------- /test/environments/rails50/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails50/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails50/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails50/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails51/.bundler-version: -------------------------------------------------------------------------------- 1 | 1.17.3 2 | -------------------------------------------------------------------------------- /test/environments/rails51/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Add your own tasks in files placed in lib/tasks ending in .rake, 6 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 7 | 8 | require_relative 'config/application' 9 | require 'rake' 10 | 11 | RpmTestApp::Application.load_tasks 12 | require 'tasks/all' 13 | 14 | Rake::Task['default'].clear 15 | task :default => [:'test:newrelic'] 16 | -------------------------------------------------------------------------------- /test/environments/rails51/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails51/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails51/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails51/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails52/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails52/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails52/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails52/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails60/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails60/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails60/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails60/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails61/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'rubygems' 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 9 | 10 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 11 | -------------------------------------------------------------------------------- /test/environments/rails61/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: mysql2 3 | username: root 4 | password: <%= ENV['MYSQL_PASSWORD'] %> 5 | host: localhost 6 | database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %> 7 | 8 | sqlite3: &sqlite3 9 | <% if defined?(JRuby) %> 10 | adapter: jdbcsqlite3 11 | <% else %> 12 | adapter: sqlite3 13 | <% end %> 14 | database: db/all.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | host: localhost 18 | 19 | development: 20 | <<: *sqlite3 21 | 22 | test: 23 | <<: *sqlite3 24 | 25 | production: 26 | <<: *sqlite3 27 | -------------------------------------------------------------------------------- /test/environments/rails61/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application' 6 | RpmTestApp::Application.initialize! 7 | -------------------------------------------------------------------------------- /test/environments/rails61/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails70/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Add your own tasks in files placed in lib/tasks ending in .rake, 6 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 7 | 8 | require_relative '../../warning_test_helper' 9 | 10 | require_relative 'config/application' 11 | 12 | Rails.application.load_tasks 13 | 14 | require 'tasks/all' 15 | 16 | Rake::Task['default'].clear 17 | task :default => [:'test:newrelic'] 18 | -------------------------------------------------------------------------------- /test/environments/rails70/app/assets/config/manifest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/environments/rails70/app/assets/config/manifest.js -------------------------------------------------------------------------------- /test/environments/rails70/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class ApplicationController < ActionController::Base 6 | end 7 | -------------------------------------------------------------------------------- /test/environments/rails70/app/controllers/no_method_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application_controller' 6 | 7 | class NoMethodController < ApplicationController; end 8 | -------------------------------------------------------------------------------- /test/environments/rails70/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 6 | 7 | require 'bundler/setup' # Set up gems listed in the Gemfile. 8 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 9 | -------------------------------------------------------------------------------- /test/environments/rails70/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Load the Rails application. 6 | require_relative 'application' 7 | 8 | # Initialize the Rails application. 9 | Rails.application.initialize! 10 | -------------------------------------------------------------------------------- /test/environments/rails70/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails71/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Add your own tasks in files placed in lib/tasks ending in .rake, 6 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 7 | 8 | require_relative '../../warning_test_helper' 9 | 10 | require_relative 'config/application' 11 | 12 | Rails.application.load_tasks 13 | 14 | require 'tasks/all' 15 | 16 | Rake::Task['default'].clear 17 | task :default => [:'test:newrelic'] 18 | -------------------------------------------------------------------------------- /test/environments/rails71/app/assets/config/manifest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/environments/rails71/app/assets/config/manifest.js -------------------------------------------------------------------------------- /test/environments/rails71/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class ApplicationController < ActionController::Base 6 | end 7 | -------------------------------------------------------------------------------- /test/environments/rails71/app/controllers/no_method_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application_controller' 6 | 7 | class NoMethodController < ApplicationController; end 8 | -------------------------------------------------------------------------------- /test/environments/rails71/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 6 | 7 | require 'bundler/setup' # Set up gems listed in the Gemfile. 8 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 9 | -------------------------------------------------------------------------------- /test/environments/rails71/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Load the Rails application. 6 | require_relative 'application' 7 | 8 | # Initialize the Rails application. 9 | Rails.application.initialize! 10 | -------------------------------------------------------------------------------- /test/environments/rails71/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails72/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Add your own tasks in files placed in lib/tasks ending in .rake, 6 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 7 | 8 | require_relative '../../warning_test_helper' 9 | 10 | require_relative 'config/application' 11 | 12 | Rails.application.load_tasks 13 | 14 | require 'tasks/all' 15 | 16 | Rake::Task['default'].clear 17 | task :default => [:'test:newrelic'] 18 | -------------------------------------------------------------------------------- /test/environments/rails72/app/assets/config/manifest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/environments/rails72/app/assets/config/manifest.js -------------------------------------------------------------------------------- /test/environments/rails72/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class ApplicationController < ActionController::Base 6 | end 7 | -------------------------------------------------------------------------------- /test/environments/rails72/app/controllers/no_method_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application_controller' 6 | 7 | class NoMethodController < ApplicationController; end 8 | -------------------------------------------------------------------------------- /test/environments/rails72/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 6 | 7 | require 'bundler/setup' # Set up gems listed in the Gemfile. 8 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 9 | -------------------------------------------------------------------------------- /test/environments/rails72/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Load the Rails application. 6 | require_relative 'application' 7 | 8 | # Initialize the Rails application. 9 | Rails.application.initialize! 10 | -------------------------------------------------------------------------------- /test/environments/rails72/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/rails80/app/assets/config/manifest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/environments/rails80/app/assets/config/manifest.js -------------------------------------------------------------------------------- /test/environments/rails80/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class ApplicationController < ActionController::Base 6 | end 7 | -------------------------------------------------------------------------------- /test/environments/rails80/app/controllers/no_method_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application_controller' 6 | 7 | class NoMethodController < ApplicationController; end 8 | -------------------------------------------------------------------------------- /test/environments/rails80/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 6 | 7 | require 'bundler/setup' # Set up gems listed in the Gemfile. 8 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 9 | -------------------------------------------------------------------------------- /test/environments/rails80/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Load the Rails application. 6 | require_relative 'application' 7 | 8 | # Initialize the Rails application. 9 | Rails.application.initialize! 10 | -------------------------------------------------------------------------------- /test/environments/rails80/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/environments/railsedge/app/assets/config/manifest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/environments/railsedge/app/assets/config/manifest.js -------------------------------------------------------------------------------- /test/environments/railsedge/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class ApplicationController < ActionController::Base 6 | end 7 | -------------------------------------------------------------------------------- /test/environments/railsedge/app/controllers/no_method_controller.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'application_controller' 6 | 7 | class NoMethodController < ApplicationController; end 8 | -------------------------------------------------------------------------------- /test/environments/railsedge/config/boot.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 6 | 7 | require 'bundler/setup' # Set up gems listed in the Gemfile. 8 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 9 | -------------------------------------------------------------------------------- /test/environments/railsedge/config/environment.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # Load the Rails application. 6 | require_relative 'application' 7 | 8 | # Initialize the Rails application. 9 | Rails.application.initialize! 10 | -------------------------------------------------------------------------------- /test/environments/railsedge/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | # File is required to exist by Rails 6 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/README.md: -------------------------------------------------------------------------------- 1 | These tests cover parsing of Docker container IDs on Linux hosts out of 2 | `/proc/self/cgroup` (or `/proc//cgroup` more generally). 3 | 4 | The `cases.json` file lists each filename in this directory containing 5 | example `/proc/self/cgroup` content, and the expected Docker container ID that 6 | should be parsed from that file. 7 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/docker-0.9.1.txt: -------------------------------------------------------------------------------- 1 | 11:hugetlb:/ 2 | 10:perf_event:/ 3 | 9:blkio:/ 4 | 8:freezer:/ 5 | 7:devices:/docker/f37a7e4d17017e7bf774656b19ca4360c6cdc4951c86700a464101d0d9ce97ee 6 | 6:memory:/ 7 | 5:cpuacct:/ 8 | 4:cpu:/docker/f37a7e4d17017e7bf774656b19ca4360c6cdc4951c86700a464101d0d9ce97ee 9 | 3:cpuset:/ 10 | 2:name=systemd:/ -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/empty.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/fixtures/cross_agent_tests/docker_container_id/empty.txt -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/heroku.txt: -------------------------------------------------------------------------------- 1 | 1:hugetlb,perf_event,blkio,freezer,devices,memory,cpuacct,cpu,cpuset:/lxc/b6d196c1-50f2-4949-abdb-5d4909864487 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/invalid-length.txt: -------------------------------------------------------------------------------- 1 | 9:perf_event:/docker/47cbd16b77c5 2 | 8:blkio:/docker/47cbd16b77c5 3 | 7:net_cls:/ 4 | 6:freezer:/docker/47cbd16b77c5 5 | 5:devices:/docker/47cbd16b77c5 6 | 4:memory:/docker/47cbd16b77c5 7 | 3:cpuacct:/docker/47cbd16b77c5 8 | 2:cpu:/docker/47cbd16b77c5 9 | 1:cpuset:/ 10 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.04-lxc-container.txt: -------------------------------------------------------------------------------- 1 | 11:hugetlb:/lxc/p1 2 | 10:perf_event:/lxc/p1 3 | 9:blkio:/lxc/p1 4 | 8:freezer:/lxc/p1 5 | 7:devices:/lxc/p1 6 | 6:memory:/lxc/p1 7 | 5:cpuacct:/lxc/p1 8 | 4:cpu:/lxc/p1 9 | 3:cpuset:/lxc/p1 10 | 2:name=systemd:/user/1000.user/1.session -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.04-no-container.txt: -------------------------------------------------------------------------------- 1 | 11:hugetlb:/user/1000.user/2.session 2 | 10:perf_event:/user/1000.user/2.session 3 | 9:blkio:/user/1000.user/2.session 4 | 8:freezer:/user/1000.user/2.session 5 | 7:devices:/user/1000.user/2.session 6 | 6:memory:/user/1000.user/2.session 7 | 5:cpuacct:/user/1000.user/2.session 8 | 4:cpu:/user/1000.user/2.session 9 | 3:cpuset:/user/1000.user/2.session 10 | 2:name=systemd:/user/1000.user/2.session -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.10-no-container.txt: -------------------------------------------------------------------------------- 1 | 10:hugetlb:/ 2 | 9:perf_event:/ 3 | 8:blkio:/ 4 | 7:net_cls,net_prio:/ 5 | 6:freezer:/ 6 | 5:devices:/ 7 | 4:memory:/ 8 | 3:cpu,cpuacct:/ 9 | 2:cpuset:/ 10 | 1:name=systemd:/user.slice/user-1000.slice/session-2.scope -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/docker_container_id_v2/empty.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/fixtures/cross_agent_tests/docker_container_id_v2/empty.txt -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: ? 3 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.explain.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: (id = 1234) 3 | Filter: ((title)::text = 'sensitive text'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: (id = ?) 3 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.id=1234 AND blogs.title='sensitive text' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_4 (cost=0.00..56.60 rows=1 width=5) 2 | Filter: ? 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_4 (cost=0.00..56.60 rows=1 width=5) 2 | Filter: ((j = 'a'::"char") AND (k = ('now'::cstring)::date)) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_4 (cost=0.00..56.60 rows=1 width=5) 2 | Filter: ((j = ?::"char") AND (k = (?::cstring)::date)) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.query.txt: -------------------------------------------------------------------------------- 1 | explain select * from explain_plan_test_4 where j = 'abcd' and k = current_date 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_4 (cost=0.00..39.12 rows=12 width=5) 2 | Filter: ? 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_4 (cost=0.00..39.12 rows=12 width=5) 2 | Filter: (k = '2001-09-28'::date) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_4 (cost=0.00..39.12 rows=12 width=5) 2 | Filter: (k = ?::date) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.query.txt: -------------------------------------------------------------------------------- 1 | explain select * from explain_plan_test_4 where k = date '2001-09-28'" 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..1.01 rows=1 width=540) 2 | Filter: ? 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..1.01 rows=1 width=540) 2 | Filter: ((title)::text = '\x08\x0C 3 | \r '::text) 4 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..1.01 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.query.txt: -------------------------------------------------------------------------------- 1 | select * from blogs where title = E'\x08\x0c\n\r\t' 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_1 (cost=0.00..24.50 rows=6 width=40) 2 | Filter: ? 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_1 (cost=0.00..24.50 rows=6 width=40) 2 | Filter: (c = 'three''three'::text) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_1 (cost=0.00..24.50 rows=6 width=40) 2 | Filter: (c = ?::text) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.query.txt: -------------------------------------------------------------------------------- 1 | explain select * from explain_plan_test_1 where c = 'three''three' 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_1 (cost=0.00..27.40 rows=6 width=40) 2 | Filter: ? 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_1 (cost=0.00..27.40 rows=6 width=40) 2 | Filter: ((a)::numeric = 10000000000::numeric) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on explain_plan_test_1 (cost=0.00..27.40 rows=6 width=40) 2 | Filter: ((a)::numeric = ?::numeric) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.query.txt: -------------------------------------------------------------------------------- 1 | explain select * from explain_plan_test_1 where a = 1e10 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Hash Join (cost=12.93..26.33 rows=130 width=1113) 2 | Hash Cond: ? 3 | -> Seq Scan on blogs (cost=0.00..11.40 rows=140 width=540) 4 | -> Hash (cost=11.30..11.30 rows=130 width=573) 5 | -> Seq Scan on posts (cost=0.00..11.30 rows=130 width=573) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.explain.txt: -------------------------------------------------------------------------------- 1 | Hash Join (cost=12.93..26.33 rows=130 width=1113) 2 | Hash Cond: (pg_catalog.concat(blogs.title, '-suffix') = (posts.title)::text) 3 | -> Seq Scan on blogs (cost=0.00..11.40 rows=140 width=540) 4 | -> Hash (cost=11.30..11.30 rows=130 width=573) 5 | -> Seq Scan on posts (cost=0.00..11.30 rows=130 width=573) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Hash Join (cost=12.93..26.33 rows=130 width=1113) 2 | Hash Cond: (pg_catalog.concat(blogs.title, ?) = (posts.title)::text) 3 | -> Seq Scan on blogs (cost=0.00..11.40 rows=140 width=540) 4 | -> Hash (cost=11.30..11.30 rows=130 width=573) 5 | -> Seq Scan on posts (cost=0.00..11.30 rows=130 width=573) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs JOIN posts ON posts.title=CONCAT(blogs.title, '-suffix') -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on "explain_plan_test'_3" (cost=0.00..24.50 rows=6 width=40) 2 | Filter: ? 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on "explain_plan_test'_3" (cost=0.00..24.50 rows=6 width=40) 2 | Filter: (i = '"abcd"'::text) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on "explain_plan_test'_3" (cost=0.00..24.50 rows=6 width=40) 2 | Filter: (i = ?::text) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.query.txt: -------------------------------------------------------------------------------- 1 | explain select * from "explain_plan_test'_3" where i = '"abcd"' 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Insert on explain_plan_test_1 (cost=24.50..49.00 rows=580 width=40) 2 | -> Seq Scan on explain_plan_test_2 (cost=24.50..49.00 rows=580 width=40) 3 | Filter: ? 4 | SubPlan 1 5 | -> Seq Scan on explain_plan_test_1 (cost=0.00..21.60 rows=1160 width=4) 6 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.explain.txt: -------------------------------------------------------------------------------- 1 | Insert on explain_plan_test_1 (cost=24.50..49.00 rows=580 width=40) 2 | -> Seq Scan on explain_plan_test_2 (cost=24.50..49.00 rows=580 width=40) 3 | Filter: (NOT (hashed SubPlan 1)) 4 | SubPlan 1 5 | -> Seq Scan on explain_plan_test_1 (cost=0.00..21.60 rows=1160 width=4) 6 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Insert on explain_plan_test_1 (cost=24.50..49.00 rows=580 width=40) 2 | -> Seq Scan on explain_plan_test_2 (cost=24.50..49.00 rows=580 width=40) 3 | Filter: (NOT (hashed SubPlan 1)) 4 | SubPlan 1 5 | -> Seq Scan on explain_plan_test_1 (cost=0.00..21.60 rows=1160 width=4) 6 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.query.txt: -------------------------------------------------------------------------------- 1 | explain insert into explain_plan_test_1 select * from explain_plan_test_2 where explain_plan_test_2.d not in (select a from explain_plan_test_1) 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: ? 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.explain.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: (id = 1234) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: (id = ?) 3 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.id=1234 2 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = '][^|)/('::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title='][^|)/(' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: ? 3 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.explain.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: (id = 15402) 3 | Filter: ((title)::text = 'logs'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Index Scan using blogs_pkey on blogs (cost=0.00..8.27 rows=1 width=540) 2 | Index Cond: (id = ?) 3 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.id=15402 AND blogs.title='logs' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = 'foo''bar'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.query.txt: -------------------------------------------------------------------------------- 1 | EXPLAIN SELECT * FROM blogs WHERE blogs.title=E'foo\'bar' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = '\x08\x0C 3 | \r '::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title=E'\b\f\n\r\t' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = '\x01\x079'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title=E'\1\7\9' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = 'foo''bar'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title='foo\'bar' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = 'U'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title=E'\x55' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = 'data'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title=E'd\u0061t\U00000061' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = 'data'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title=U&'d\0061t\+000061' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = 'слон'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title=U&'\0441\043B\043E\043D' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.colon_obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ? -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.explain.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = 'data'::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.obfuscated.txt: -------------------------------------------------------------------------------- 1 | Seq Scan on blogs (cost=0.00..11.75 rows=1 width=540) 2 | Filter: ((title)::text = ?::text) -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.query.txt: -------------------------------------------------------------------------------- 1 | SELECT * FROM blogs WHERE blogs.title=U&'d!0061t!+000061' UESCAPE '!' -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/proc_cpuinfo/1pack_1core_1logical.txt: -------------------------------------------------------------------------------- 1 | processor : 0 2 | model name : AMD Duron(tm) processor 3 | cache size : 64 KB 4 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/proc_cpuinfo/1pack_1core_2logical.txt: -------------------------------------------------------------------------------- 1 | processor : 0 2 | model name : Intel(R) Pentium(R) 4 CPU 2.80GHz 3 | cache size : 1024 KB 4 | physical id : 0 5 | siblings : 2 6 | core id : 0 7 | cpu cores : 1 8 | processor : 1 9 | model name : Intel(R) Pentium(R) 4 CPU 2.80GHz 10 | cache size : 1024 KB 11 | physical id : 0 12 | siblings : 2 13 | core id : 0 14 | cpu cores : 1 15 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/proc_cpuinfo/1pack_2core_2logical.txt: -------------------------------------------------------------------------------- 1 | processor : 0 2 | model name : Intel(R) Pentium(R) D CPU 3.00GHz 3 | cache size : 2048 KB 4 | physical id : 0 5 | siblings : 2 6 | core id : 0 7 | cpu cores : 2 8 | processor : 1 9 | model name : Intel(R) Pentium(R) D CPU 3.00GHz 10 | cache size : 2048 KB 11 | physical id : 0 12 | siblings : 2 13 | core id : 1 14 | cpu cores : 2 15 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/proc_cpuinfo/malformed_file.txt: -------------------------------------------------------------------------------- 1 | This is a random text file that does NOT adhere to the /proc/cpuinfo format. 2 | xxxYYYZZz 3 | 4 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/proc_meminfo/README.md: -------------------------------------------------------------------------------- 1 | These tests are for determining the physical memory from the data returned by 2 | /proc/meminfo on Linux hosts. The total physical memory of the linux system is 3 | reported as part of the environment values. The key used by the Python agent 4 | is 'Total Physical Memory (MB)'. 5 | 6 | The names of all test files should be of the form `meminfo_nnnnMB.txt`. The 7 | value `nnnn` in the filename is the physical memory of that system in MB. 8 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_footer_insertion_location/close-body-in-comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Comment contains a close body tag 5 | 6 | 7 |

The quick brown fox jumps over the lazy dog.

8 | 9 | EXPECTED_RUM_FOOTER_LOCATION 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/basic.html: -------------------------------------------------------------------------------- 1 | 2 | EXPECTED_RUM_LOADER_LOCATION 3 | im a title 4 | 5 | 8 | 9 | im some body text 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/body_with_attributes.html: -------------------------------------------------------------------------------- 1 | EXPECTED_RUM_LOADER_LOCATION 2 | This isn't great HTML but it's what we've got. 3 | 4 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | 5 | 8 | EXPECTED_RUM_LOADER_LOCATION 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag_after_x_ua_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | 5 | EXPECTED_RUM_LOADER_LOCATION 6 | 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag_before_x_ua_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | 5 | EXPECTED_RUM_LOADER_LOCATION 6 | 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag_with_spaces.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | 5 | 8 | EXPECTED_RUM_LOADER_LOCATION 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/content_type_charset_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | 5 | 8 | EXPECTED_RUM_LOADER_LOCATION 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/content_type_charset_tag_after_x_ua_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | 5 | EXPECTED_RUM_LOADER_LOCATION 6 | 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/content_type_charset_tag_before_x_ua_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | 5 | EXPECTED_RUM_LOADER_LOCATION 6 | 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/empty_head: -------------------------------------------------------------------------------- 1 | 2 | 3 | im some body text 4 | 5 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/head_with_attributes.html: -------------------------------------------------------------------------------- 1 | 2 | EXPECTED_RUM_LOADER_LOCATION 3 | im a title 4 | 5 | 8 | 9 | im some body text 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/incomplete_non_meta_tags.html: -------------------------------------------------------------------------------- 1 | 2 | EXPECTED_RUM_LOADER_LOCATION 3 | 4 | 2 | 3 | EXPECTED_RUM_LOADER_LOCATION 4 | Cribbed from the Java agent 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/no_header.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | EXPECTED_RUM_LOADER_LOCATION 5 | Cribbed from the Java agent 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/no_html_and_no_header.html: -------------------------------------------------------------------------------- 1 | EXPECTED_RUM_LOADER_LOCATION 2 | This isn't great HTML but it's what we've got. 3 | 4 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/no_start_header.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | EXPECTED_RUM_LOADER_LOCATION 7 | Cribbed from the Java agent 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | EXPECTED_RUM_LOADER_LOCATION 5 | 8 | 9 | im some body text 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_multiline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | EXPECTED_RUM_LOADER_LOCATION 6 | 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_multiple_tags.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | EXPECTED_RUM_LOADER_LOCATION 5 | 6 | 9 | 10 | 11 | im some body text 12 | 13 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_spaces_around_equals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | EXPECTED_RUM_LOADER_LOCATION 5 | 8 | 9 | im some body text 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_with_others.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | EXPECTED_RUM_LOADER_LOCATION 5 | 6 | 9 | 10 | im some body text 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_with_spaces.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | im a title 4 | EXPECTED_RUM_LOADER_LOCATION 5 | 8 | 9 | im some body text 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/utilization/aws/ecs.json: -------------------------------------------------------------------------------- 1 | {"DockerId":"1234567890987654321"} 2 | -------------------------------------------------------------------------------- /test/fixtures/utilization/aws/invalid_chars.json: -------------------------------------------------------------------------------- 1 | { 2 | "privateIp": "172.31.2.236", 3 | "devpayProductCodes": null, 4 | "availabilityZone": "us-west-2c", 5 | "version": "2010-08-31", 6 | "instanceId": "****ff7489fa7", 7 | "billingProducts": null, 8 | "instanceType": "c4.2xlarge", 9 | "accountId": "682381637236", 10 | "architecture": "x86_64", 11 | "kernelId": null, 12 | "ramdiskId": null, 13 | "imageId": "ami-f3d14f93", 14 | "pendingTime": "2017-07-14T20:35:22Z", 15 | "region": "us-west-2" 16 | } 17 | -------------------------------------------------------------------------------- /test/fixtures/utilization/aws/missing_value.json: -------------------------------------------------------------------------------- 1 | { 2 | "privateIp": "172.31.2.236", 3 | "devpayProductCodes": null, 4 | "availabilityZone": "us-west-2c", 5 | "version": "2010-08-31", 6 | "instanceId": "i-08987cdeff7489fa7", 7 | "billingProducts": null, 8 | "instanceType": null, 9 | "accountId": "682381637236", 10 | "architecture": "x86_64", 11 | "kernelId": null, 12 | "ramdiskId": null, 13 | "imageId": "ami-f3d14f93", 14 | "pendingTime": "2017-07-14T20:35:22Z", 15 | "region": "us-west-2" 16 | } 17 | -------------------------------------------------------------------------------- /test/fixtures/utilization/aws/valid.json: -------------------------------------------------------------------------------- 1 | { 2 | "privateIp": "172.31.2.236", 3 | "devpayProductCodes": null, 4 | "availabilityZone": "us-west-2c", 5 | "version": "2010-08-31", 6 | "instanceId": "i-08987cdeff7489fa7", 7 | "billingProducts": null, 8 | "instanceType": "c4.2xlarge", 9 | "accountId": "682381637236", 10 | "architecture": "x86_64", 11 | "kernelId": null, 12 | "ramdiskId": null, 13 | "imageId": "ami-f3d14f93", 14 | "pendingTime": "2017-07-14T20:35:22Z", 15 | "region": "us-west-2" 16 | } 17 | -------------------------------------------------------------------------------- /test/fixtures/utilization/azure/invalid_chars.json: -------------------------------------------------------------------------------- 1 | { 2 | "location": "eastus", 3 | "name": "***rubytest***", 4 | "offer": "UbuntuServer", 5 | "osType": "Linux", 6 | "platformFaultDomain": "0", 7 | "platformUpdateDomain": "0", 8 | "publisher": "Canonical", 9 | "sku": "16.04-LTS", 10 | "version": "16.04.201706191", 11 | "vmId": "c84ffaa7-1b0a-4aa6-9f5c-0912655d9870", 12 | "vmSize": "Standard_DS1_v2" 13 | } 14 | -------------------------------------------------------------------------------- /test/fixtures/utilization/azure/missing_value.json: -------------------------------------------------------------------------------- 1 | { 2 | "location": "eastus", 3 | "offer": "UbuntuServer", 4 | "osType": "Linux", 5 | "platformFaultDomain": "0", 6 | "platformUpdateDomain": "0", 7 | "publisher": "Canonical", 8 | "sku": "16.04-LTS", 9 | "version": "16.04.201706191", 10 | "vmId": "c84ffaa7-1b0a-4aa6-9f5c-0912655d9870", 11 | "vmSize": "Standard_DS1_v2" 12 | } 13 | -------------------------------------------------------------------------------- /test/fixtures/utilization/azure/valid.json: -------------------------------------------------------------------------------- 1 | { 2 | "location": "eastus", 3 | "name": "rubytest", 4 | "offer": "UbuntuServer", 5 | "osType": "Linux", 6 | "platformFaultDomain": "0", 7 | "platformUpdateDomain": "0", 8 | "publisher": "Canonical", 9 | "sku": "16.04-LTS", 10 | "version": "16.04.201706191", 11 | "vmId": "c84ffaa7-1b0a-4aa6-9f5c-0912655d9870", 12 | "vmSize": "Standard_DS1_v2" 13 | } 14 | -------------------------------------------------------------------------------- /test/helpers/docker.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | def docker? 6 | File.exist?('/.dockerenv') 7 | end 8 | -------------------------------------------------------------------------------- /test/intentional_fail.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class IntentionalFail < Minitest::Test 6 | # This test suite is provided to facilitate testing that build scripts (e.g. 7 | # rake test) return the correct exit codes when tests fail. 8 | def test_fail 9 | assert false 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /test/minitest/test_time_plugin.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'test_time_reporter' 6 | 7 | module Minitest 8 | def self.plugin_test_time_init(options) 9 | Minitest.reporter << TestTimeReporter.new 10 | end 11 | 12 | def self.plugin_test_time_options(opts, options) 13 | # ... 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /test/multiverse/.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | *.swp 3 | .bundler_work_area 4 | Gemfile 5 | Gemfile.lock 6 | Gemfile.* 7 | Gemfile.*.lock 8 | *.log 9 | *.db 10 | .idea 11 | tags 12 | *.sqlite3 13 | *.pid 14 | -------------------------------------------------------------------------------- /test/multiverse/suites/active_record/.gitignore: -------------------------------------------------------------------------------- 1 | db/schema.rb 2 | -------------------------------------------------------------------------------- /test/multiverse/suites/active_record/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'config/database' 6 | 7 | desc 'Setup for ActiveRecord' 8 | task :environment do 9 | if defined?(DatabaseTasks) 10 | ActiveRecord::Base.configurations = DatabaseTasks.database_configuration 11 | ActiveRecord::Base.establish_connection(DatabaseTasks.env.to_sym) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/multiverse/suites/active_record/config/database.yml: -------------------------------------------------------------------------------- 1 | mysql: &mysql 2 | adapter: <%= 3 | if defined?(JRuby) 4 | 'jdbcmysql' 5 | else 6 | 'mysql2' 7 | end %> 8 | socket: <%= (`uname -s` =~ /Linux/ ) ? "" :"/tmp/mysql.sock" %> 9 | username: <%= ENV.fetch("MYSQL_USERNAME", "root") %> 10 | password: <%= ENV["MYSQL_PASSWORD"] %> 11 | host: <%= ENV.fetch("MYSQL_HOST", "localhost") %> 12 | port: <%= ENV["MYSQL_PORT"] %> 13 | database: <%= ENV.fetch("DATABASE_NAME", "rails_blog") %> 14 | 15 | development: 16 | <<: *mysql 17 | 18 | test: 19 | <<: *mysql 20 | 21 | production: 22 | <<: *mysql 23 | -------------------------------------------------------------------------------- /test/multiverse/suites/active_record/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | ca_bundle_path: ../../../config/test.cert.crt 9 | app_name: test 10 | host: localhost 11 | api_host: localhost 12 | port: <%= $collector && $collector.port %> 13 | transaction_trace: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/active_record_pg/.gitignore: -------------------------------------------------------------------------------- 1 | db/schema.rb 2 | -------------------------------------------------------------------------------- /test/multiverse/suites/active_record_pg/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | require File.expand_path('config/database') 6 | 7 | desc 'Setup for ActiveRecord' 8 | task :environment do 9 | if defined?(DatabaseTasks) 10 | ActiveRecord::Base.configurations = DatabaseTasks.database_configuration 11 | ActiveRecord::Base.establish_connection(DatabaseTasks.env.to_sym) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/multiverse/suites/active_record_pg/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | ca_bundle_path: ../../../config/test.cert.crt 9 | app_name: test 10 | host: localhost 11 | api_host: localhost 12 | port: <%= $collector && $collector.port %> 13 | transaction_trace: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/agent_only/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile <<~RB 6 | gem 'minitest', "#{RUBY_VERSION >= '3.0.0' ? '5.3.3' : '4.7.5'}" 7 | gem 'rack', '< 2.1.0' 8 | gem 'rack-test', '>= 0.8.0' 9 | RB 10 | -------------------------------------------------------------------------------- /test/multiverse/suites/agent_only/script/env_change.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 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 5 | 6 | ENV['NEW_RELIC_LOG_FILE_PATH'] = 'STDOUT' 7 | 8 | require 'newrelic_rpm' 9 | 10 | NewRelic::Agent.manual_start(:env => 'production') 11 | -------------------------------------------------------------------------------- /test/multiverse/suites/agent_only/script/symbol_env.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 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 5 | 6 | ENV['NEW_RELIC_LOG_FILE_PATH'] = 'STDOUT' 7 | 8 | require 'newrelic_rpm' 9 | 10 | NewRelic::Agent.manual_start(:env => :development) 11 | -------------------------------------------------------------------------------- /test/multiverse/suites/agent_only/script/warnings.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 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 5 | 6 | require 'bundler/setup' 7 | require 'newrelic_rpm' 8 | 9 | NewRelic::Agent::Tracer.in_transaction(name: 'ponies', category: :controller) do 10 | end 11 | 12 | NewRelic::Agent.notice_error('oops') 13 | 14 | NewRelic::Agent.instance.send(:transmit_data) 15 | 16 | puts NewRelic::VERSION::STRING 17 | -------------------------------------------------------------------------------- /test/multiverse/suites/async_http/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | async_http: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/aws_sdk_firehose/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | gem 'aws-sdk-firehose' 9 | RB 10 | -------------------------------------------------------------------------------- /test/multiverse/suites/aws_sdk_firehose/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | aws_sdk_firehose: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/aws_sdk_kinesis/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | gem 'aws-sdk-kinesis' 9 | RB 10 | -------------------------------------------------------------------------------- /test/multiverse/suites/aws_sdk_kinesis/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | aws_sdk_kinesis: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/aws_sdk_lambda/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | suite_condition('Requires Ruby v2.5+') { RUBY_VERSION.split('.')[0..1].join('.').to_f >= 2.5 } 6 | 7 | instrumentation_methods :chain, :prepend 8 | 9 | gemfile <<~RB 10 | gem 'aws-sdk-lambda' 11 | RB 12 | -------------------------------------------------------------------------------- /test/multiverse/suites/aws_sdk_lambda/aws_sdk_monkeypatch.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NRMonkeyPatch 6 | def encode_eventstream_response(rules, data, builder) 7 | # the original method calls `#inject` on the `data` argument, which will 8 | # fail if `data` is `nil`, so `||` in an empty hash when `nil` 9 | 10 | super(rules, data || {}, builder) 11 | end 12 | end 13 | 14 | Aws::Stubbing::Protocols::RestJson.prepend(NRMonkeyPatch) 15 | -------------------------------------------------------------------------------- /test/multiverse/suites/aws_sdk_lambda/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | aws_sdk_lambda: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/awssqs/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | gem 'aws-sdk-sqs' 9 | gem 'nokogiri' 10 | RB 11 | -------------------------------------------------------------------------------- /test/multiverse/suites/awssqs/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | aws_sqs: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/bare/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile <<~RB 6 | gem 'newrelic_rpm', :require => false, :path => File.expand_path('../../../../') 7 | RB 8 | -------------------------------------------------------------------------------- /test/multiverse/suites/bunny/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | ca_bundle_path: ../../../config/test.cert.crt 9 | instrumentation: 10 | bunny: <%= $instrumentation_method %> 11 | app_name: test 12 | host: localhost 13 | api_host: localhost 14 | port: <%= $collector && $collector.port %> 15 | transaction_tracer: 16 | record_sql: obfuscated 17 | enabled: true 18 | stack_trace_threshold: 0.5 19 | transaction_threshold: 1.0 20 | capture_params: false 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/capistrano/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | suite_condition("Capistrano 3 flaky on JRuby") do 6 | RUBY_PLATFORM != 'java' 7 | end 8 | 9 | CAPISTRANO_VERSIONS = [ 10 | nil, 11 | '3.17.0' 12 | ] 13 | 14 | def gem_list(capistrano_version = nil) 15 | <<~RB 16 | gem 'sshkit', '1.16.0' 17 | gem 'rack' 18 | 19 | gem 'capistrano'#{capistrano_version} 20 | RB 21 | end 22 | 23 | create_gemfiles(CAPISTRANO_VERSIONS) 24 | -------------------------------------------------------------------------------- /test/multiverse/suites/capistrano/config/deploy/production.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | role :app, %w[deploy@example.com] 6 | role :web, %w[deploy@example.com] 7 | role :db, %w[deploy@example.com] 8 | 9 | server 'example.com', user: 'deploy', roles: %w[web app], my_property: :my_value 10 | -------------------------------------------------------------------------------- /test/multiverse/suites/capistrano/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | production: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | agent_enabled: true 7 | monitor_mode: true 8 | license_key: bootstrap_newrelic_admin_license_key_000 9 | ca_bundle_path: ../../../config/test.cert.crt 10 | app_name: test 11 | host: localhost 12 | api_host: localhost 13 | api_port: <%= ENV["FAKE_RPM_SITE_PORT"] %> 14 | transaction_tracer: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | disable_serialization: false 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/capistrano2/Capfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'new_relic/recipes' 4 | 5 | load 'deploy' 6 | load 'config/deploy' 7 | -------------------------------------------------------------------------------- /test/multiverse/suites/capistrano2/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | suite_condition("Capistrano testing is flaky on JRuby") do 6 | RUBY_PLATFORM != 'java' 7 | end 8 | 9 | gemfile <<~RB 10 | gem 'capistrano', '~> 2.15.5' 11 | gem 'rack' 12 | 13 | RB 14 | -------------------------------------------------------------------------------- /test/multiverse/suites/concurrent_ruby/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | concurrent_ruby: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/curb/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | ca_bundle_path: ../../../config/test.cert.crt 9 | instrumentation: 10 | curb: <%= $instrumentation_method %> 11 | app_name: test 12 | host: localhost 13 | api_host: localhost 14 | port: <%= $collector && $collector.port %> 15 | transaction_tracer: 16 | record_sql: obfuscated 17 | enabled: true 18 | stack_trace_threshold: 0.5 19 | transaction_threshold: 1.0 20 | capture_params: false 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/delayed_job/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | delayed_job: <%= $instrumentation_method %> 10 | app_name: test 11 | host: 127.0.0.1 12 | api_host: 127.0.0.1 13 | transaction_trace: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/dynamodb/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | gem 'aws-sdk-dynamodb' 9 | gem 'nokogiri' 10 | RB 11 | -------------------------------------------------------------------------------- /test/multiverse/suites/dynamodb/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | dynamodb: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/elasticsearch/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | ELASTICSEARCH_VERSIONS = [ 8 | # [nil, 2.5], # temporarily stop testing elasticsearch 9 9 | ['8.12.0', 2.5], 10 | ['7.17.1', 2.4] 11 | ] 12 | 13 | def gem_list(elasticsearch_version = nil) 14 | <<~RB 15 | gem 'elasticsearch'#{elasticsearch_version} 16 | 17 | RB 18 | end 19 | 20 | create_gemfiles(ELASTICSEARCH_VERSIONS) 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/elasticsearch/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | elasticsearch: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/ethon/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | ethon: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/excon/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | excon_versions = [ 6 | [nil], 7 | ['0.56.0'] 8 | ] 9 | 10 | def gem_list(excon_version = nil) 11 | <<~RB 12 | gem 'excon'#{excon_version} 13 | gem 'rack' 14 | 15 | RB 16 | end 17 | 18 | create_gemfiles(excon_versions) 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/excon/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | app_name: test 9 | host: 127.0.0.1 10 | api_host: 127.0.0.1 11 | transaction_tracer: 12 | record_sql: obfuscated 13 | enabled: true 14 | stack_trace_threshold: 0.5 15 | transaction_threshold: 1.0 16 | capture_params: false 17 | -------------------------------------------------------------------------------- /test/multiverse/suites/grape/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | instrumentation: 8 | grape: <%= $instrumentation_method %> 9 | license_key: bootstrap_newrelic_admin_license_key_000 10 | ca_bundle_path: ../../../config/test.cert.crt 11 | app_name: test 12 | host: localhost 13 | api_host: localhost 14 | port: <%= $collector && $collector.port %> 15 | transaction_tracer: 16 | record_sql: obfuscated 17 | enabled: true 18 | stack_trace_threshold: 0.5 19 | transaction_threshold: 1.0 20 | capture_params: false 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/high_security/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile <<~RB 6 | gem 'rack' 7 | 8 | RB 9 | -------------------------------------------------------------------------------- /test/multiverse/suites/httpclient/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | HTTPCLIENT_VERSIONS = [ 7 | [nil, 2.4], 8 | ['2.8.3', 2.4] 9 | ] 10 | 11 | def gem_list(httpclient_version = nil) 12 | <<~RB 13 | gem 'httpclient'#{httpclient_version} 14 | gem 'rack' 15 | 16 | RB 17 | end 18 | 19 | create_gemfiles(HTTPCLIENT_VERSIONS) 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/httprb/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | httprb: <%= $instrumentation_method %> 10 | ca_bundle_path: ../../../config/test.cert.crt 11 | app_name: test 12 | host: localhost 13 | api_host: localhost 14 | port: <%= $collector && $collector.port %> 15 | transaction_tracer: 16 | record_sql: obfuscated 17 | enabled: true 18 | stack_trace_threshold: 0.5 19 | transaction_threshold: 1.0 20 | capture_params: false 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/httpx/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | HTTPX_VERSIONS = [ 8 | # [nil, 2.7], 9 | ['1.4.4', 2.7], 10 | ['1.0.0', 2.7] 11 | ] 12 | 13 | def gem_list(httpx_version = nil) 14 | <<~GEM_LIST 15 | gem 'httpx'#{httpx_version} 16 | gem 'rack' 17 | GEM_LIST 18 | end 19 | 20 | create_gemfiles(HTTPX_VERSIONS) 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/httpx/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | httpx: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/hybrid_agent/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | suite_condition('OpenTelemetry requires CRuby version 3.1+') do 6 | RUBY_VERSION >= '3.1.0' 7 | end 8 | 9 | gemfile <<~RB 10 | gem 'opentelemetry-api' 11 | RB 12 | -------------------------------------------------------------------------------- /test/multiverse/suites/hybrid_agent/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | app_name: test 9 | log_level: debug 10 | host: 127.0.0.1 11 | api_host: 127.0.0.1 12 | transaction_trace: 13 | record_sql: obfuscated 14 | enabled: true 15 | stack_trace_threshold: 0.5 16 | transaction_threshold: 1.0 17 | capture_params: false 18 | opentelemetry_bridge.enabled: true 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/infinite_tracing/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | distributed_tracing: 4 | enabled: true 5 | span_events: 6 | enabled: true 7 | infinite_tracing: 8 | trace_observer: 9 | host: http://localhost 10 | monitor_mode: true 11 | license_key: bootstrap_newrelic_admin_license_key_000 12 | ca_bundle_path: ../../../config/test.cert.crt 13 | app_name: test 14 | host: localhost 15 | api_host: localhost 16 | port: <%= $collector && $collector.port %> 17 | -------------------------------------------------------------------------------- /test/multiverse/suites/json/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile <<~RB 6 | gem 'rack' 7 | 8 | RB 9 | -------------------------------------------------------------------------------- /test/multiverse/suites/json/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.24 6 | log_level: debug 7 | monitor_mode: true 8 | license_key: bootstrap_newrelic_admin_license_key_000 9 | ca_bundle_path: ../../../config/test.cert.crt 10 | app_name: test 11 | host: localhost 12 | api_host: localhost 13 | port: <%= $collector && $collector.port %> 14 | transaction_tracer: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | capture_params: false 19 | browser_monitoring: 20 | auto_instrument: true 21 | marshaller: json 22 | -------------------------------------------------------------------------------- /test/multiverse/suites/json/json_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require File.join(File.dirname(__FILE__), '..', '..', '..', 'new_relic', 'marshalling_test_cases') 6 | 7 | # This is intended as a sanity check for our serialization to JSON via the 8 | # json gem across various Ruby versions. 9 | class JsonTest < Minitest::Test 10 | include MultiverseHelpers 11 | include MarshallingTestCases 12 | 13 | setup_and_teardown_agent 14 | end 15 | -------------------------------------------------------------------------------- /test/multiverse/suites/logger/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | # nothin' 9 | RB 10 | -------------------------------------------------------------------------------- /test/multiverse/suites/logger/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | logger: <%= $instrumentation_method %> 10 | app_name: test 11 | host: 127.0.0.1 12 | api_host: 127.0.0.1 13 | transaction_trace: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | application_logging: 20 | forwarding: 21 | enabled: true 22 | -------------------------------------------------------------------------------- /test/multiverse/suites/logstasher/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | logstasher_versions = [ 8 | [nil, 2.7] 9 | ] 10 | 11 | # Lock down activesupport version due to a logstasher test incompatiability with 7.1. 12 | def gem_list(logstasher_versions = nil) 13 | <<~RB 14 | gem 'logstasher'#{logstasher_versions} 15 | gem 'activesupport', '< 7.1' 16 | RB 17 | end 18 | 19 | create_gemfiles(logstasher_versions) 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/logstasher/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | logstasher: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | application_logging: 21 | forwarding: 22 | enabled: true 23 | -------------------------------------------------------------------------------- /test/multiverse/suites/marshalling/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile <<~RB 6 | gem 'rack' 7 | 8 | RB 9 | -------------------------------------------------------------------------------- /test/multiverse/suites/marshalling/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.24 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | ca_bundle_path: ../../../config/test.cert.crt 9 | app_name: test 10 | host: localhost 11 | api_host: localhost 12 | port: <%= $collector && $collector.port %> 13 | transaction_tracer: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | capture_params: false 18 | browser_monitoring: 19 | auto_instrument: true 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/mongo/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | app_name: test 9 | ca_bundle_path: ../../../config/test.cert.crt 10 | app_name: test 11 | host: localhost 12 | api_host: localhost 13 | port: <%= $collector && $collector.port %> 14 | transaction_tracer: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/mongo/helpers/mongo_helpers.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelic 6 | module MongoHelpers 7 | def mongo_logger 8 | if ENV['VERBOSE'] 9 | Mongo::Logger.Logger 10 | else 11 | filename = File.join(`pwd`.chomp, 'log', 'mongo_test.log') 12 | Logger.new(filename) 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /test/multiverse/suites/net_http/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | gem 'rack' 9 | 10 | RB 11 | -------------------------------------------------------------------------------- /test/multiverse/suites/net_http/net_http_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'net_http_test_cases' 6 | 7 | class NetHttpTest < Minitest::Test 8 | include NetHttpTestCases 9 | end 10 | -------------------------------------------------------------------------------- /test/multiverse/suites/opensearch/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | opensearch: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/padrino/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | # Sinatra 3+ 8 | gemfile <<~RB 9 | gem 'activesupport' 10 | gem 'padrino' 11 | gem 'rack-test' 12 | gem 'sinatra', '< 4' 13 | RB 14 | 15 | # Sinatra <3 16 | gemfile <<~RB 17 | gem 'activesupport', '~> 3' 18 | gem 'padrino', '0.15.1' 19 | gem 'rack-test', '>= 0.8.0', :require => 'rack/test' 20 | gem 'sinatra', '< 3' 21 | RB 22 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/app/views/foos/_foo.html.haml: -------------------------------------------------------------------------------- 1 | = foo.inspect 2 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/app/views/views/_a_partial.html.erb: -------------------------------------------------------------------------------- 1 | <%- advance_process_time(@delay) if @delay %> 2 | This is a partial 3 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/app/views/views/_mid_partial.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'a_partial' %> 2 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/app/views/views/_top_partial.html.erb: -------------------------------------------------------------------------------- 1 | <% (1..10).each do |i| %> 2 | <%= render 'mid_partial', :i => i %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/app/views/views/deep_partial.html.erb: -------------------------------------------------------------------------------- 1 | <%- 10.times do |i| %> 2 | <%= render 'top_partial' %> 3 | <%- end %> 4 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/app/views/views/haml_view.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %title Hello 5 | %body 6 | hello from haml 7 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/app/views/views/index.html.erb: -------------------------------------------------------------------------------- 1 | <%- advance_process_time(@delay) if @delay %> 2 | <%- 3.times do |i| %> 3 | <%= render "a_partial" %> 4 | <%- end%> 5 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails/dummy.txt: -------------------------------------------------------------------------------- 1 | hello! -------------------------------------------------------------------------------- /test/multiverse/suites/rails/rails3_app/app_rails3_plus.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'action_controller/railtie' 6 | require 'active_model' 7 | require 'filtering_test_app' 8 | # NOTE: my_app should be brought in before rails/test_help, 9 | # but after filtering_test_app. This is because logic to maintain 10 | # the test db schema will expect a Rails app to be in play. 11 | require_relative 'my_app' 12 | require 'rails/test_help' 13 | -------------------------------------------------------------------------------- /test/multiverse/suites/rails_prepend/newrelic_prepender/lib/newrelic_prepender/version.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module NewRelicPrepender 6 | VERSION = '0.1.0' 7 | end 8 | -------------------------------------------------------------------------------- /test/multiverse/suites/rake/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | attributes: 4 | include: 5 | - "*" 6 | rake: 7 | tasks: 8 | - "default" 9 | instrumentation: 10 | rake: <%= $instrumentation_method %> 11 | monitor_mode: true 12 | license_key: bootstrap_newrelic_admin_license_key_000 13 | ca_bundle_path: ../../../config/test.cert.crt 14 | app_name: test 15 | host: localhost 16 | api_host: localhost 17 | port: <%= $collector && $collector.port %> 18 | transaction_tracer: 19 | transaction_threshold: -10 20 | enabled: true 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/rake/unsupported_rake_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative 'rake_test_helper' 6 | 7 | if !NewRelic::Agent::Instrumentation::Rake.should_install? 8 | class UnsupportedRakeTest < Minitest::Test 9 | include MultiverseHelpers 10 | include RakeTestHelper 11 | 12 | setup_and_teardown_agent 13 | 14 | def test_we_hear_nothing 15 | run_rake 16 | 17 | refute_any_rake_metrics 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/rdkafka/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | rdkafka: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/resque/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | RESQUE_VERSIONS = [ 6 | [nil], 7 | ['2.2.0'], 8 | ['1.27.0'] 9 | ] 10 | 11 | def gem_list(resque_version = nil) 12 | <<~RB 13 | gem 'resque'#{resque_version} 14 | #{"gem 'rackup'" if RUBY_VERSION >= '2.7.8'} 15 | RB 16 | end 17 | 18 | create_gemfiles(RESQUE_VERSIONS) 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/resque/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | require File.join(File.dirname(__FILE__), 'resque_setup') 6 | require 'resque/tasks' 7 | -------------------------------------------------------------------------------- /test/multiverse/suites/roda/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | RODA_VERSIONS = [ 8 | [nil, 2.4], 9 | ['3.19.0', 2.4] 10 | ] 11 | 12 | def gem_list(roda_version = nil) 13 | <<~RB 14 | gem 'roda'#{roda_version} 15 | gem 'rack' 16 | gem 'rack-test', '>= 0.8.0', :require => 'rack/test' 17 | RB 18 | end 19 | 20 | create_gemfiles(RODA_VERSIONS) 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/roda/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | roda: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/roda_agent_disabled/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | RODA_VERSIONS = [ 8 | [nil, 2.4], 9 | ['3.19.0', 2.4] 10 | ] 11 | 12 | def gem_list(roda_version = nil) 13 | <<~RB 14 | gem 'roda'#{roda_version} 15 | gem 'rack' 16 | gem 'rack-test', '>= 0.8.0', :require => 'rack/test' 17 | RB 18 | end 19 | 20 | create_gemfiles(RODA_VERSIONS) 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/ruby_kafka/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | suite_condition('Skip in CI on newer ruby versions') do 6 | # will run locally OR on CI for ruby < 3.4.0 7 | !ENV['CI'] || RUBY_VERSION < '3.4.0' 8 | end 9 | 10 | instrumentation_methods :chain, :prepend 11 | 12 | gemfile <<~RB 13 | gem 'ruby-kafka' 14 | RB 15 | -------------------------------------------------------------------------------- /test/multiverse/suites/ruby_kafka/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | ruby_kafka: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/sequel/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | ca_bundle_path: ../../../config/test.cert.crt 9 | app_name: test 10 | host: localhost 11 | api_host: localhost 12 | port: <%= $collector && $collector.port %> 13 | transaction_tracer: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | SIDEKIQ_VERSIONS = [ 6 | [nil, 3.2], 7 | ['7.3.9', 2.7], 8 | ['6.4.0', 2.5], 9 | ['5.0.3', 2.4, 2.5] 10 | ] 11 | 12 | def gem_list(sidekiq_version = nil) 13 | <<-RB 14 | gem 'sidekiq'#{sidekiq_version} 15 | gem 'newrelic_rpm', :require => false, :path => File.expand_path('../../../../') 16 | RB 17 | end 18 | 19 | create_gemfiles(SIDEKIQ_VERSIONS) 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | app_name: test 9 | ca_bundle_path: ../../../config/test.cert.crt 10 | app_name: test 11 | host: localhost 12 | api_host: localhost 13 | port: <%= $collector && $collector.port %> 14 | transaction_tracer: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | log_file_path: log 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq/log/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/multiverse/suites/sidekiq/log/.gitkeep -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq_delay_extensions/Rakefile: -------------------------------------------------------------------------------- 1 | # This file is distributed under new relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/license for complete details. 3 | # frozen_string_literal: true 4 | 5 | require File.expand_path('config/database') 6 | 7 | desc 'Setup for ActiveRecord' 8 | task :environment do 9 | if defined?(DatabaseTasks) 10 | ActiveRecord::Base.configurations = DatabaseTasks.database_configuration 11 | ActiveRecord::Base.establish_connection(DatabaseTasks.env.to_sym) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq_delay_extensions/app/models/dolce.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'new_relic/agent/datastores' 6 | require 'active_record' 7 | 8 | class Dolce < ActiveRecord::Base 9 | COMPLETION_VAR = :@@nr_job_complete 10 | 11 | def long_running_task 12 | @@nr_job_complete = true 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq_delay_extensions/config/database.yml: -------------------------------------------------------------------------------- 1 | default: &default 2 | adapter: 'postgresql' 3 | encoding: unicode 4 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 5 | host: <%= File.exist?('/.dockerenv') ? 'postgres' : 'localhost' %> 6 | username: <%= ENV.fetch("POSTGRES_USERNAME", "") %> 7 | password: <%= ENV.fetch("POSTGRES_PASSWORD", "") %> 8 | database: <%= ENV.fetch("DATABASE_NAME", "rails_blog") %> 9 | 10 | development: 11 | <<: *default 12 | 13 | test: 14 | <<: *default 15 | 16 | production: 17 | <<: *default 18 | -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq_delay_extensions/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | app_name: test 9 | ca_bundle_path: ../../../config/test.cert.crt 10 | app_name: test 11 | host: localhost 12 | api_host: localhost 13 | port: <%= $collector && $collector.port %> 14 | transaction_tracer: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | log_file_path: log 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/sidekiq_delay_extensions/db/migrate/20250317165716_create_dolces.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class CreateDolces < ActiveRecord::Migration[8.0] 6 | def change 7 | create_table(:dolces) do |t| 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /test/multiverse/suites/sinatra_agent_disabled/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | SINATRA_VERSIONS = [ 6 | [nil, 2.4], 7 | ['2.1.0', 2.4], 8 | ['2.0.0', 2.4] 9 | ] 10 | 11 | def gem_list(sinatra_version = nil) 12 | <<~RB 13 | gem 'sinatra'#{sinatra_version} 14 | gem 'rack', '~> 2.2' 15 | gem 'rack-test', '>= 0.8.0', :require => 'rack/test' 16 | 17 | RB 18 | end 19 | 20 | create_gemfiles(SINATRA_VERSIONS) 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/stripe/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | agent_enabled: true 7 | monitor_mode: true 8 | license_key: bootstrap_newrelic_admin_license_key_000 9 | app_name: test 10 | host: localhost 11 | api_host: localhost 12 | port: <%= $collector && $collector.port %> 13 | transaction_tracer: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | disable_serialization: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/thread/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | instrumentation_methods :chain, :prepend 6 | 7 | gemfile <<~RB 8 | # this can't be empty or the tests won't run 9 | RB 10 | -------------------------------------------------------------------------------- /test/multiverse/suites/thread/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | fiber: <%= $instrumentation_method %> 10 | thread: <%= $instrumentation_method %> 11 | app_name: test 12 | log_level: debug 13 | host: 127.0.0.1 14 | api_host: 127.0.0.1 15 | transaction_trace: 16 | record_sql: obfuscated 17 | enabled: true 18 | stack_trace_threshold: 0.5 19 | transaction_threshold: 1.0 20 | capture_params: false 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/tilt/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | tilt: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/tilt/layout.haml: -------------------------------------------------------------------------------- 1 | %head 2 | %title Tilt Test Application 3 | %body 4 | = yield 5 | -------------------------------------------------------------------------------- /test/multiverse/suites/tilt/test.erb: -------------------------------------------------------------------------------- 1 | 2 |

Hello from ERB!

3 | 4 | -------------------------------------------------------------------------------- /test/multiverse/suites/tilt/test.haml: -------------------------------------------------------------------------------- 1 | %h1 Hello from Haml! 2 | -------------------------------------------------------------------------------- /test/multiverse/suites/unicorn/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | ca_bundle_path: ../../../config/test.cert.crt 9 | app_name: test 10 | host: localhost 11 | api_host: localhost 12 | port: <%= $collector && $collector.port %> 13 | transaction_tracer: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | -------------------------------------------------------------------------------- /test/multiverse/suites/view_component/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.5 6 | monitor_mode: true 7 | license_key: bootstrap_newrelic_admin_license_key_000 8 | instrumentation: 9 | view_component: <%= $instrumentation_method %> 10 | app_name: test 11 | log_level: debug 12 | host: 127.0.0.1 13 | api_host: 127.0.0.1 14 | transaction_trace: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | transaction_threshold: 1.0 19 | capture_params: false 20 | -------------------------------------------------------------------------------- /test/multiverse/suites/yajl/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | suite_condition("Yajl not supported for JRuby") do 6 | RUBY_PLATFORM != 'java' 7 | end 8 | 9 | YAJL_VERSIONS = [ 10 | [nil, 2.4], 11 | ['1.2.1', 2.4] 12 | ] 13 | 14 | def gem_list(yajl_version = nil) 15 | <<~RB 16 | gem 'rack' 17 | gem 'yajl-ruby'#{yajl_version}, require: ['yajl', 'yajl/json_gem'] 18 | 19 | RB 20 | end 21 | 22 | create_gemfiles(YAJL_VERSIONS) 23 | -------------------------------------------------------------------------------- /test/multiverse/suites/yajl/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | error_collector: 4 | enabled: true 5 | apdex_t: 0.24 6 | log_level: debug 7 | monitor_mode: true 8 | license_key: bootstrap_newrelic_admin_license_key_000 9 | ca_bundle_path: ../../../config/test.cert.crt 10 | app_name: test 11 | host: localhost 12 | api_host: localhost 13 | port: <%= $collector && $collector.port %> 14 | transaction_tracer: 15 | record_sql: obfuscated 16 | enabled: true 17 | stack_trace_threshold: 0.5 18 | capture_params: false 19 | browser_monitoring: 20 | auto_instrument: true 21 | -------------------------------------------------------------------------------- /test/multiverse/suites/yajl/yajl_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require File.join(File.dirname(__FILE__), '..', '..', '..', 'new_relic', 'marshalling_test_cases') 6 | 7 | # This is the problematic thing that overrides our JSON marshalling 8 | require 'yajl/json_gem' 9 | 10 | class YajlTest < Minitest::Test 11 | include MultiverseHelpers 12 | include MarshallingTestCases 13 | 14 | setup_and_teardown_agent 15 | end 16 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/one/a/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile <<-RUBY 6 | gem "timetrap" 7 | RUBY 8 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/one/a/a_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'test/unit' 6 | class ATest < Test::Unit::TestCase 7 | def test_timetrap_is_loaded 8 | assert Timetrap 9 | end 10 | 11 | def test_haml_is_not_loaded 12 | refute defined?(Haml) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/one/a/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | browser_monitoring: 4 | auto_instrument: true 5 | error_collector: 6 | enabled: true 7 | apdex_t: 0.5 8 | monitor_mode: true 9 | license_key: bootstrap_newrelic_admin_license_key_000 10 | app_name: test 11 | host: 127.0.0.1 12 | api_host: 127.0.0.1 13 | transaction_tracer: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | log_level: debug 20 | disable_serialization: false 21 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/one/b/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile <<~RUBY 6 | gem "haml" 7 | RUBY 8 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/one/b/b_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'test/unit' 6 | class BTest < Test::Unit::TestCase 7 | def test_timetrap_is_not_loaded 8 | refute defined?(Timetrap) 9 | end 10 | 11 | def test_haml_is_loaded 12 | assert Haml 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/one/b/config/newrelic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | development: 3 | browser_monitoring: 4 | auto_instrument: true 5 | error_collector: 6 | enabled: true 7 | apdex_t: 0.5 8 | monitor_mode: true 9 | license_key: bootstrap_newrelic_admin_license_key_000 10 | app_name: test 11 | host: 127.0.0.1 12 | api_host: 127.0.0.1 13 | transaction_tracer: 14 | record_sql: obfuscated 15 | enabled: true 16 | stack_trace_threshold: 0.5 17 | transaction_threshold: 1.0 18 | capture_params: false 19 | log_level: debug 20 | disable_serialization: false 21 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/three/a/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile "#noop" 6 | execute_mode 'spawn' 7 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/three/a/fail_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'test/unit' 6 | class ATest < Test::Unit::TestCase 7 | def test_failure 8 | fail 'This test is failing!!!' 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/three/b/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile "#noop" 6 | execute_mode 'fork' 7 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/three/b/win_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'test/unit' 6 | class ATest < Test::Unit::TestCase 7 | def test_success 8 | assert 'This test is not failing!!!' 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/two/a/Envfile: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | gemfile "#noop" 6 | -------------------------------------------------------------------------------- /test/multiverse/test/suite_examples/two/a/fail_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'test/unit' 6 | class ATest < Test::Unit::TestCase 7 | def test_failure 8 | fail 'This test is failing!!!' 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/new_relic/FAKECHANGELOG: -------------------------------------------------------------------------------- 1 | # New Relic Ruby Agent Release Notes # 2 | 3 | ## v3.7.2 4 | 5 | * Mongo instrumentation improvements 6 | 7 | Mongo Mongo Mongo 8 | 9 | * Patch (3.7.2.4242) 10 | 11 | Patch for something 12 | 13 | * Patch later on (3.7.2.5000) 14 | 15 | This isn't the patch from * (3.7.2.4242) but we like to act like it. 16 | 17 | ## v3.7.1 18 | 19 | * MongoDB support 20 | 21 | Mongo supported 22 | -------------------------------------------------------------------------------- /test/new_relic/agent/apdex_from_server_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative '../../test_helper' 6 | 7 | class NewRelic::Agent::ApdexFromServerTest < Minitest::Test 8 | def test_true 9 | # we need tests in this file - TBD 10 | assert true 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/new_relic/agent/instrumentation/active_support_subscriber_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative '../../../test_helper' 6 | require 'new_relic/agent/instrumentation/active_support_subscriber' 7 | 8 | if defined?(ActiveSupport) 9 | require_relative 'rails/active_support_subscriber' 10 | else 11 | puts "Skipping tests in #{File.basename(__FILE__)} because Active Support is unavailable" if ENV['VERBOSE_TEST_OUTPUT'] 12 | end 13 | -------------------------------------------------------------------------------- /test/new_relic/agent/instrumentation/notification_subscriber_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative '../../../test_helper' 6 | require 'new_relic/agent/instrumentation/notifications_subscriber' 7 | 8 | if defined?(ActiveSupport) 9 | require_relative 'rails/notifications_subscriber' 10 | else 11 | puts "Skipping tests in #{File.basename(__FILE__)} because Active Support is unavailable" if ENV['VERBOSE_TEST_OUTPUT'] 12 | end 13 | -------------------------------------------------------------------------------- /test/new_relic/agent/vm/snapshot_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative '../../../test_helper' 6 | require 'new_relic/agent/vm/snapshot' 7 | 8 | class NewRelic::Agent::VM::SnapshotTestCase < Minitest::Test 9 | def test_records_taken_at_on_initialization 10 | t = nr_freeze_process_time 11 | snap = NewRelic::Agent::VM::Snapshot.new 12 | 13 | assert_equal(t, snap.taken_at) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /test/new_relic/load_test.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require_relative '../test_helper' 6 | require 'resolv' 7 | require 'mocha/minitest' 8 | 9 | class LoadTest < Minitest::Test 10 | def test_loading_agent_when_disabled_does_not_resolv_addresses 11 | ::Resolv.expects(:getaddress).never 12 | ::IPSocket.expects(:getaddress).never 13 | 14 | require_relative('../test_helper') 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /test/nullverse/nullverse_helper.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'minitest/autorun' 6 | 7 | unless defined?(Minitest::Test) 8 | Minitest::Test = MiniTest::Unit::TestCase 9 | end 10 | 11 | $:.unshift(File.expand_path('../../../lib', __FILE__)) 12 | -------------------------------------------------------------------------------- /test/performance/.simplecov: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | SimpleCov.start do 4 | enable_coverage(:branch) 5 | SimpleCov.root(File.join(File.expand_path('../../..', __FILE__), 'lib')) 6 | SimpleCov.command_name('Performance Tests') 7 | SimpleCov.coverage_dir(File.join(File.expand_path('../coverage', __FILE__))) 8 | track_files('**/*.rb') 9 | add_filter('chain.rb') 10 | formatter(SimpleCov::Formatter::SimpleFormatter) if ENV['CI'] 11 | end 12 | -------------------------------------------------------------------------------- /test/performance/Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source 'https://rubygems.org' 4 | 5 | gem 'newrelic_rpm', path: File.expand_path('../../..', __FILE__) 6 | 7 | gem 'rails', '~> 8.0' 8 | gem 'puma' 9 | gem 'sqlite3' 10 | 11 | gem 'mocha' 12 | gem 'redis' 13 | gem 'simplecov' 14 | gem 'stackprof' 15 | gem 'webrick' if RUBY_VERSION >= '3.0' 16 | 17 | gem 'logger' 18 | -------------------------------------------------------------------------------- /test/performance/lib/performance/json_reporter.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | module Performance 6 | class JSONReporter 7 | def initialize(results, elapsed, options = {}) 8 | @results = results 9 | end 10 | 11 | def report 12 | puts JSON.dump(@results.map { |result| result.to_h }) 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /test/performance/rails_app/Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Add your own tasks in files placed in lib/tasks ending in .rake, 4 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 5 | 6 | require_relative 'config/application' 7 | 8 | Rails.application.load_tasks 9 | -------------------------------------------------------------------------------- /test/performance/rails_app/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # ApplicationController 4 | class ApplicationController < ActionController::API; end 5 | -------------------------------------------------------------------------------- /test/performance/rails_app/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # ApplicationRecord 4 | class ApplicationRecord < ActiveRecord::Base 5 | primary_abstract_class 6 | end 7 | -------------------------------------------------------------------------------- /test/performance/rails_app/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | APP_PATH = File.expand_path('../config/application', __dir__) 5 | require_relative '../config/boot' 6 | require 'rails/commands' 7 | -------------------------------------------------------------------------------- /test/performance/rails_app/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | require_relative '../config/boot' 5 | require 'rake' 6 | Rake.application.run 7 | -------------------------------------------------------------------------------- /test/performance/rails_app/config.ru: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # This file is used by Rack-based servers to start the application. 4 | 5 | require_relative 'config/environment' 6 | 7 | run Rails.application 8 | Rails.application.load_server 9 | -------------------------------------------------------------------------------- /test/performance/rails_app/config/boot.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 4 | 5 | require 'bundler/setup' # Set up gems listed in the Gemfile. 6 | -------------------------------------------------------------------------------- /test/performance/rails_app/config/credentials.yml.enc: -------------------------------------------------------------------------------- 1 | 2yJzOeMbqq0miWOmHzZySDz3axFUS2ZsevXDjBM8U7Ej5MVq31kYkvGNAW0AtDS1uTlXw1zm2KE5mo9BWCi/IF8+S7ZEFzBIYBPeHqm0JKzjNQzvLs53IWrzn/2Y5p5Dzq6xrf2V4ynRN48GlhxwjLOYljdesu7S0BgZ8a9jEibFpSkA+LCJr9VSN/OzGB2VYfvPmLdlkDf8xzY3Tdpes8rRlvkrjdQuB0rj4PnJJnbbyZeob+iBjQGmauJC8F9aBfGQLPPSJOD2MlknEg4do5Hb2Ww7K6qmhHnb3GNT1U+cIlYFBeXy+gDu1ej95XeP3+/moMNq2xAPQD1FlJjsShtO5qcgB04IUd0j3PrmlU6a0Vr4TxBZFtMUrQmBssNq0+cm1NXizJKSWF+P5fGALAS6CwsDNKlE+CIA--NacdlfNSgsq/IdOh--cmkergkegow0wesAIYt8Dg== -------------------------------------------------------------------------------- /test/performance/rails_app/config/environment.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Load the Rails application. 4 | require_relative 'application' 5 | 6 | # Initialize the Rails application. 7 | Rails.application.initialize! 8 | -------------------------------------------------------------------------------- /test/performance/rails_app/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of 6 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported 7 | # notations and behaviors. 8 | Rails.application.config.filter_parameters += %i[ 9 | passw secret token _key crypt salt certificate otp ssn 10 | ] 11 | -------------------------------------------------------------------------------- /test/performance/rails_app/config/master.key: -------------------------------------------------------------------------------- 1 | f90163e638adfc14ea89887c9c1e04ef -------------------------------------------------------------------------------- /test/performance/rails_app/config/routes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Rails.application.routes.draw do 4 | # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html 5 | 6 | # Defines the root path route ("/") 7 | # root "articles#index" 8 | end 9 | -------------------------------------------------------------------------------- /test/performance/rails_app/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | # This file should contain all the record creation needed to seed the database with its default values. 3 | # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). 4 | # 5 | # Examples: 6 | # 7 | # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) 8 | # Character.create(name: "Luke", movie: movies.first) 9 | -------------------------------------------------------------------------------- /test/performance/rails_app/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newrelic/newrelic-ruby-agent/6ea1b4b03fe0aa0c0dd0714414d5ff9a19022856/test/performance/rails_app/lib/tasks/.keep -------------------------------------------------------------------------------- /test/performance/script/runner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file is distributed under New Relic's license terms. 4 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 5 | # frozen_string_literal: true 6 | 7 | require 'logger' 8 | APP_PATH = File.expand_path('../rails_app/config/application', __dir__) 9 | require_relative '../rails_app/config/boot' 10 | require 'rails/command' 11 | require_relative '../lib/performance' 12 | 13 | Rails::Command.invoke(:runner, %w[Performance::Runner.new.run_and_report] + ARGV) 14 | -------------------------------------------------------------------------------- /test/performance/suites/startup.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | class StartupShutdown < Performance::TestCase 6 | def test_startup_shutdown 7 | measure(1) do 8 | NewRelic::Agent.manual_start 9 | NewRelic::Agent.shutdown 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/script/before_install/gemstash_mirror.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # our testing kicks off > 180 travis "builds" so let's use a local gemstash 4 | # mirror for all of our rubygems needs if we are in our internal testing env 5 | 6 | set -ev 7 | 8 | if [ -n "$GEMSTASH_MIRROR" ]; then 9 | bundle config mirror.https://rubygems.org $GEMSTASH_MIRROR 10 | fi 11 | -------------------------------------------------------------------------------- /test/script/before_install/update_rubygems.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Some Ruby and RubyGems versions are incompatible: 4 | # 5 | # * RubyGems 3.x won't install on Ruby 2.2 or older 6 | # * RubyGems 2.x fails our no-warnings check on Ruby 2.6 or later 7 | 8 | set -ev 9 | 10 | gem update --system --force || (gem i rubygems-update -v '<3' && update_rubygems) 11 | -------------------------------------------------------------------------------- /test/script/before_script/install_mongodb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Travis default Mongo is currently 2.4.14, which has some instrumentation differences with >= 2.6. 4 | 5 | set -ev 6 | 7 | if [[ $GROUP == "database" ]]; then 8 | wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz -O /tmp/mongodb.tgz 9 | mkdir -p /tmp/mongodb/data 10 | tar -xvf /tmp/mongodb.tgz -C /tmp/mongodb 11 | /tmp/mongodb/mongodb-linux-x86_64-${MONGODB}/bin/mongod --dbpath /tmp/mongodb/data --bind_ip 127.0.0.1 --noauth &> /dev/null & 12 | fi 13 | -------------------------------------------------------------------------------- /test/script/install_mysql55: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -u 3 | 4 | MYSQL55_PATH='/usr/local/mysql55' 5 | 6 | wget https://github.com/mysql/mysql-server/archive/refs/tags/mysql-5.5.63.tar.gz \ 7 | && tar xzf mysql-5.5.63.tar.gz \ 8 | && cd mysql-server-mysql-5.5.63/ \ 9 | && cmake . -DCMAKE_INSTALL_PREFIX=$MYSQL55_PATH \ 10 | -DMYSQL_DATADIR=$MYSQL55_PATH/data \ 11 | -DDOWNLOAD_BOOST=1 \ 12 | -DWITH_BOOST=/tmp/boost \ 13 | -DWITH_SSL=bundled \ 14 | && make \ 15 | && make install \ 16 | && cd .. \ 17 | && rm -rf mysql-5.5.63.tar.gz mysql-server-mysql-5.5.63 18 | -------------------------------------------------------------------------------- /test/warning_test_helper.rb: -------------------------------------------------------------------------------- 1 | # This file is distributed under New Relic's license terms. 2 | # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. 3 | # frozen_string_literal: true 4 | 5 | require 'warning' 6 | Gem.path.each do |path| 7 | Warning.ignore(//, path) 8 | end 9 | 10 | # this is to ignore warnings that happen on the CI only 11 | # the site_ruby part of the path needs to be removed if it exists otherwise the CI keeps doing the warnings 12 | Warning.ignore(//, Gem::RUBYGEMS_DIR.gsub('site_ruby/', '')) 13 | --------------------------------------------------------------------------------