newrelic/newrelic-ruby-agent
49.7
Weak · 20 September 2026
39.5k
lines of production code
Ruby
primary language
1
measurement over time
What this system is
This system is the New Relic Ruby Agent, an Application Performance Monitoring (APM) tool that automatically instruments Ruby applications to capture performance data. It provides comprehensive visibility into web requests, database interactions, external API calls, and background jobs across a wide range of frameworks and libraries. The agent also supports advanced distributed tracing, including OpenTelemetry interoperability and high-throughput Infinite Tracing, while collecting detailed runtime metrics and log events for observability.
How it got here
2007–2013 — Agent architecture and instrumentation expansion
68 changes.
This period focused on restructuring the New Relic Ruby Agent's core architecture, introducing a modular segment-based tracing system and a layered configuration manager. It significantly expanded instrumentation coverage for major frameworks like Rails, Sinatra, and Padrino, alongside comprehensive support for various HTTP clients, databases, and message brokers. The work was heavily supported by the establishment of robust testing infrastructure, including multiverse suites for dependency isolation and a new performance benchmarking framework.
2014–2021 — Infinite Tracing and instrumentation modernization
69 changes.
This period focused on introducing Infinite Tracing support for high-throughput span streaming and modernizing instrumentation across the agent by migrating from method aliasing to module prepending. Significant architectural refactoring was applied to distributed tracing, VM metrics, and collector communication to improve accuracy and maintainability. The work was accompanied by extensive test coverage expansion, including new multiverse suites for various frameworks and infrastructure updates for CI and cloud utilization detection.
2022–2024 — Broad instrumentation expansion and LLM support
59 changes.
This period focused on significantly expanding the agent's instrumentation coverage to include gRPC, Kafka, OpenAI, DynamoDB, and various web frameworks like Roda and ViewComponent. It also introduced dedicated support for LLM observability with detailed event structures and enhanced the developer experience through new CLI generators and automated documentation tools. Concurrently, the codebase underwent architectural refactoring to improve lifecycle management and thread safety while adding extensive test suites for new and existing integrations.
2025–2026 — OpenTelemetry bridge and testing infrastructure
19 changes.
This period focused on implementing an initial OpenTelemetry bridge to map OTel spans and context to New Relic transactions, alongside instrumentation for the Parallel and Logging gems. Significant effort was also directed toward expanding test coverage, including new suites for the OpenTelemetry bridge, Sidekiq, and Puma, as well as establishing a comprehensive performance testing harness using Perfverse.
Features
Add Elasticsearch instrumentation
The New Relic Ruby agent now automatically instruments Elasticsearch client requests, capturing datastore metrics including host, port, and operation name. It supports both Elasticsearch gem versions prior to 8.0.0 and 8.0.0+, adapting the instrumentation target accordingly. Users can optionally enable the collection of the Elasticsearch cluster name and the actual query statements (with optional obfuscation) via configuration flags.
(repo-wide) · high confidence
Add New Relic instrumentation for the Roda web framework
This change introduces automatic monitoring support for applications built with the Roda framework. The agent now instruments Roda's main route handling and Rack app building processes to capture transaction traces, including request parameters and method names. It also provides configuration options to selectively ignore specific routes or metrics (such as Apdex and end-user performance data) using new \newrelic\ignore\\ directives, allowing users to filter out noise from their New Relic dashboards.
_lib/new\relic/agent/instrumentation/roda · high confidence
Add New Relic instrumentation for the rdkafka Ruby client
This change introduces automatic instrumentation for the rdkafka library, enabling New Relic to monitor Kafka message production and consumption. The instrumentation wraps the Producer's \produce\ method and the Consumer's \each\ method to capture distributed tracing headers and record metrics for message broker nodes, topics, and actions (produce/consume). It also instruments the Config class to attach New Relic configuration to newly created producer and consumer instances, with logic to handle method signature differences between older rdkafka versions and Ruby 2.7+.
_lib/new\relic/agent/instrumentation/rdkafka · high confidence
Add OpenTelemetry context propagation support
The agent now supports extracting and injecting distributed tracing context via OpenTelemetry propagators. A new TracePropagator implementation allows the agent to inject New Relic distributed tracing headers into outbound requests and extract incoming trace context (including trace ID, parent span ID, trace flags, and trace state) to create corresponding OpenTelemetry spans, enabling interoperability with OpenTelemetry-based services.
_lib/new\relic/agent/opentelemetry/context · high confidence
Add Rails 3 controller and view instrumentation
Introduces instrumentation for Rails 3 applications, enabling New Relic to trace controller actions and view rendering. Controller actions are now monitored with filtered request parameters and specific metric paths, while view rendering is instrumented for Rails 3.2 to track template and partial rendering performance.
_lib/new\relic/agent/instrumentation/rails3 · high confidence
Add Ruby Logger instrumentation with tracing and local log decoration
The agent now instruments Ruby's standard Logger class to capture log events for observability. When enabled, log messages are recorded via the log event aggregator and passed through a local log decorator (supporting the new \application\_logging.local\_decorating.enabled\ configuration). The implementation includes a recursion guard to prevent stack overflows from internal agent logging and disables instrumentation for the agent's own audit and internal loggers.
_lib/new\relic/agent/instrumentation/logger · high confidence
Add Tilt template rendering instrumentation
The agent now instruments Tilt template rendering to capture performance metrics and errors. This change introduces a new instrumentation module that wraps the Tilt \render\ method, generating specific metrics (e.g., \View/.../Rendering\) and tracing segments for each template render. It includes logic to handle filename parsing for Sinatra applications and records instrumentation invocation supportability metrics.
_lib/new\relic/agent/instrumentation/tilt · high confidence
Add instrumentation for Async::HTTP client
New Relic now automatically captures performance data for HTTP requests made using the Async::HTTP library. This change introduces instrumentation that wraps the client's \call\ method to create external request segments, allowing users to monitor latency and traceability for async HTTP traffic in their applications.
_lib/new\_relic/agent/instrumentation/async\http · high confidence
Add instrumentation for Concurrent::ThreadPoolExecutor and error handling
The agent now instruments the \Concurrent::ThreadPoolExecutor\#post\ method to wrap submitted tasks in a tracing segment, ensuring that background work is captured in transaction traces. Additionally, it patches \Concurrent::Promises\ internal rejection states to automatically record exceptions via \notice\_error\ when a promise is rejected, improving visibility into asynchronous failures.
_lib/new\_relic/agent/instrumentation/concurrent\ruby · high confidence
Add instrumentation for ViewComponent rendering
The New Relic Ruby agent now automatically instruments ViewComponent, capturing performance metrics for component rendering. This change introduces a new instrumentation module that wraps the \render\_in\ method to start and finish a tracing segment for each component render, ensuring errors are noticed and metrics are recorded. The metric naming logic adapts to different ViewComponent versions by checking for \source\_location\ or \identifier\ to construct accurate metric paths, allowing users to monitor ViewComponent performance in their dashboards.
_lib/new\_relic/agent/instrumentation/view\component · high confidence
Add instrumentation support for Sidekiq DelayExtensions
The agent now instruments Sidekiq's DelayExtensions feature, enabling performance monitoring for jobs created using the \delay\ API. A new \delay\_extensions.rb\ file provides tracing for \Sidekiq::DelayExtensions::GenericJob\, while \delayed\_class.rb\ adds support for \Sidekiq::Extensions::DelayedClass\ specifically for Sidekiq versions prior to 7.0, ensuring compatibility with older Sidekiq setups where these extensions are still available.
_lib/new\relic/agent/instrumentation/sidekiq/extensions · high confidence
Added Ethon HTTP client instrumentation
The agent now automatically traces HTTP requests made via the Ethon library. This includes instrumentation for individual \Ethon::Easy\ requests (capturing method, URL, headers, and errors) and batched requests via \Ethon::Multi\, ensuring these external calls appear in your application's performance monitoring data.
_lib/new\relic/agent/instrumentation/ethon · high confidence
Added New Relic instrumentation for AWS SQS
The agent now automatically instruments the AWS SQS client to capture distributed tracing data for message production and consumption. When using \send\_message\, \send\_message\_batch\, or \receive\_message\, the agent creates message broker segments, records attributes such as the queue name, AWS region, and account ID, and links these spans to the broader trace context.
_lib/new\_relic/agent/instrumentation/aws\_sqs, lib/new\relic/agent/instrumentation/opensearch · high confidence
Added New Relic instrumentation for the Parallel gem
The agent now automatically instruments the Parallel gem to capture transaction metrics from forked worker processes. When the Parallel library is used, the agent ensures the pipe channel listener is active, registers a unique channel for each worker, and applies tracing within the forked context. This ensures that metrics generated in child processes are correctly merged back into the parent process's transaction data, preventing data loss.
_lib/new\relic/agent/instrumentation/parallel · high confidence
Added New Relic instrumentation plugin for Sequel models
A new plugin file has been added to the library to enable automatic performance monitoring of Sequel database operations via the New Relic agent. This plugin instruments both instance methods (such as save, update, and delete) and class methods (such as create and all) on Sequel models, wrapping their execution to generate datastore segments and metrics in New Relic for visibility into database performance.
lib/sequel/plugins · high confidence
Added Ruby Fiber instrumentation with version-specific initialization handling
The agent now instruments Ruby Fibers to capture transaction context when fibers are created. This is implemented via new files in lib/new\relic/agent/instrumentation/fiber, including a chain.rb for alias-based instrumentation and a prepend.rb for module prepending. The instrumentation adapts to Ruby versions: for Ruby \< 2.7, it uses positional arguments (\\args) in the initialize method, while for Ruby 2.7+, it uses keyword arguments (\\*kwargs) to align with language changes. The core logic wraps the fiber's block with thread-tracing support, ensuring that the current transaction context is preserved within the fiber.
_lib/new\relic/agent/instrumentation/fiber · high confidence
Added instrumentation support for the HTTPX library
The agent now automatically traces HTTP requests made using the HTTPX library. This new instrumentation wraps the \send\_requests\ method to create external request segments, capturing request headers, URIs, and response details. It also handles error reporting for failed connections and includes safeguards to prevent crashes when response segments are nil or missing.
_lib/new\relic/agent/instrumentation/httpx · high confidence
Added rake task to generate Infinite Tracing protocol buffer files
A new rake task (\rake proto:generate\) has been added to the agent to automatically generate Ruby gRPC code from the Infinite Tracing \.proto\ definition. This task uses \grpc\_tools\_ruby\_protoc\ to compile the protocol buffers and includes a helper that automatically applies the project's license preamble to the generated files while removing redundant \require\ statements.
_infinite\tracing/tasks · high confidence
Automated generation of Ruby agent configuration documentation and templates
The \lib/tasks/helpers\ directory now includes a suite of new helper modules (\Format\, \NewRelicYML\, \VersionBump\, \Prompt\, \Matches\) and ERB templates (\config.html.erb\, \config.text.erb\) that automate the creation of the Ruby agent's \newrelic.yml\ configuration file and its associated documentation. These tools read directly from the agent's internal \default\_source.rb\ configuration definitions to generate up-to-date HTML and text documentation, ensuring that configuration options, environment variable mappings, and default values are always synchronized with the codebase.
lib/tasks/helpers · high confidence
Automated schema generation and versioning for Fleet Control
This change introduces a new tooling suite in \.fleetControl/schemaGeneration\ that automatically generates the JSON Schema (Draft 2020-12) used by Fleet Control to validate and render Ruby agent configuration. The \generate\_schema.rb\ script derives the schema directly from the agent's \DEFAULTS\, ensuring it stays in sync with the codebase, while \schema\_diff.rb\ and \bump\_schema\_version.rb\ analyze changes between releases to automatically recommend and apply semantic version bumps (major, minor, or patch) based on breaking, additive, or cosmetic modifications. This automation is integrated into the release process via GitHub Actions to ensure the schema published with each release accurately reflects the current agent configuration capabilities.
.fleetControl/schemaGeneration · high confidence
Infinite Tracing integration for segment span events
This change introduces the agent integration layer for Infinite Tracing within the \agent\_integrations\ directory. It adds an \Agent\ class extension to manage the infinite tracer lifecycle, including starting the gRPC streaming thread, handling force restarts, and closing connections. Additionally, it implements \record\_span\_event\ methods in \Segment\, \DatastoreSegment\, and \ExternalRequestSegment\ to forward span data to the infinite tracer, ensuring that span events are only recorded when the transaction is not ignored.
_infinite\_tracing/lib/infinite\_tracing/agent\integrations · high confidence
Initial OpenTelemetry bridge for span and transaction mapping
The agent now includes an initial bridge that maps OpenTelemetry spans to New Relic transactions and segments. This change introduces patches to handle span links and span events, ensuring that OTel span data is correctly translated into New Relic's internal format. It also adds support for RPC client and server mappings, as well as Redis datastore translation, allowing for more accurate tracing of distributed systems and database interactions.
_lib/new\relic/agent/opentelemetry · high confidence
Initial OpenTelemetry bridge implementation for trace instrumentation
The New Relic Ruby agent now includes a bridge that allows OpenTelemetry (OTel) spans to be recorded as New Relic transactions and segments. This change introduces new classes in \lib/new\_relic/agent/opentelemetry/trace\ (\Span\, \Tracer\, \TracerProvider\) that map OTel concepts to New Relic's internal model. Specifically, OTel spans with \server\ or \consumer\ kinds can initiate New Relic transactions, while \client\, \producer\, \internal\, or \nil\ kinds create segments. The bridge supports translating OTel attributes into New Relic intrinsic, agent, and custom span attributes, handles span links and events, and respects exclusion lists for specific tracers. This enables users to instrument their applications with OpenTelemetry SDKs while having that telemetry captured by the New Relic agent.
_lib/new\relic/agent/opentelemetry/trace · high confidence
Instrument ActiveSupport::Logger broadcast method for tracing
The agent now instruments the \broadcast\ method of \ActiveSupport::Logger\ to capture distributed tracing context when logs are forwarded to additional loggers. This ensures that log broadcasting events are recorded in New Relic, providing visibility into log propagation behavior within Rails applications.
_lib/new\_relic/agent/instrumentation/active\_support\logger · high confidence
Introduce Infinite Tracing support with batching and compression
Adds the Infinite Tracing feature to the Ruby agent, enabling high-throughput span event streaming to a Trace Observer via gRPC. This implementation introduces configurable batching (sending spans in groups of 100 or after a time limit) and gzip compression to reduce network overhead. It includes a new streaming buffer architecture that handles queue management, span transformation, and connection resilience, allowing the agent to automatically reconnect or suspend streaming based on server signals.
_infinite\_tracing/lib/infinite\tracing · high confidence
Introduce vendor-based utilization detection for AWS, Azure, GCP, ECS, and PCF
The agent now uses a new \Vendor\ base class and specific subclasses (AWS, Azure, GCP, ECS, ECS v4, PCF) to detect and collect utilization metadata from various cloud environments. This change introduces structured detection logic for each provider, including AWS IMDSv2 token handling, GCP metadata parsing with zone/machine type trimming, and PCF environment variable checks. Users running on these platforms will now have their utilization data (such as instance ID, type, and location) collected via these dedicated vendor classes, replacing or augmenting previous detection mechanisms.
_lib/new\relic/agent/utilization · high confidence
New Claude Code development workflow with automated quality gates
This change introduces a structured development environment for Claude Code, starting with a comprehensive development guide (.claude/development.md) that documents the Ruby agent's testing infrastructure (Minitest, Multiverse, Docker services) and Git workflow (using the \dev\ branch). It adds two automated stop hooks: check\_comments.sh enforces a strict 'WHY-only' comment policy by reviewing diffs via an AI judge, and check\_rubocop.sh blocks commits if RuboCop reports offenses. Additionally, an instrumentation skill is provided to scaffold new agent instrumentations for third-party gems, including decision trees for category selection, file layout contracts, and design preview generation.
.claude · high confidence
New DynamoDB instrumentation for AWS SDK v2
The New Relic Ruby agent now includes instrumentation for the AWS SDK for Ruby v2 (DynamoDB). This change adds new files (chain.rb, instrumentation.rb, prepend.rb) that wrap DynamoDB client methods (such as get\_item, put\_item, query, scan) to capture distributed tracing segments. Users will see DynamoDB operations recorded as datastore segments with attributes including the table name, AWS region, operation type, and resource ARN, enabling visibility into DynamoDB performance within their traces.
_lib/new\relic/agent/instrumentation/dynamodb · high confidence
New HTTP client instrumentation wrappers for AsyncHTTP, Curb, Ethon, Excon, HTTPX, http.rb, HTTPClient, and Net::HTTP
The agent now includes dedicated wrapper classes for a broad set of HTTP libraries, enabling detailed external request tracing. This change introduces instrumentation support for AsyncHTTP, Curb, Ethon, Excon, HTTPX, http.rb, HTTPClient, and Net::HTTP, alongside existing Typhoeus support. These wrappers standardize how the agent captures request details (such as method, URI, and headers) and response status codes, ensuring consistent external segment data across different client implementations.
_lib/new\_relic/agent/http\clients · high confidence
New Kinesis instrumentation with message broker spans
The agent now instruments the AWS SDK for Kinesis, adding tracing for data-plane operations (put\_record, put\_records, get\_records) as message broker segments with produce/consume actions, while control-plane operations are traced as standard segments. This change introduces new instrumentation files (chain.rb, instrumentation.rb, prepend.rb) that wrap Kinesis client methods, capture stream ARNs and names, and record platform attributes for better visibility into Kinesis stream activity.
_lib/new\_relic/agent/instrumentation/aws\_sdk\kinesis · high confidence
New LLM event structure with detailed response headers and error attributes
The agent now captures LLM interactions using a new event structure (\LlmEvent\ and subclasses like \ChatCompletionSummary\, \ChatCompletionMessage\, and \Embedding\) that records specific attributes such as token counts, model details, and duration. A key addition is the \ResponseHeaders\ module, which extracts and maps OpenAI-specific HTTP headers (including rate limits, organization, version, and request IDs) into event attributes. Additionally, error handling has been enhanced to attach specific error codes, status codes, and parameters to LLM events when exceptions occur, providing deeper visibility into failures.
_lib/new\relic/agent/llm · high confidence
New OpenTelemetry attribute translators for HTTP, Datastore, RPC, and Messaging
The agent now includes a new set of OpenTelemetry attribute translators that map OTel semantic conventions to New Relic attributes for HTTP client/server, Datastore (including Redis), RPC (gRPC), and Messaging (Kafka, RabbitMQ, SQS, SNS, Kinesis) spans. These translators ensure that telemetry data from OpenTelemetry-instrumented services is correctly translated and attributed within New Relic, improving the accuracy and completeness of performance monitoring for these specific interaction types.
_lib/new\relic/agent/opentelemetry/translators · high confidence
New Rails notifications-based instrumentation for Action Cable, Controller, View, and Custom Events
The agent now includes a new instrumentation layer under \rails\_notifications\ that monitors Rails internals via ActiveSupport::Notifications. This adds support for Action Cable (Rails 5+ only, covering perform\_action, transmit, and broadcast events), Action Controller (Rails 4+, covering process\_action and fragment/cache operations), Action View (Rails 4+, covering render events), and custom ActiveSupport events defined in the \active\_support\_custom\_events\_names\ configuration. This provides a more granular and modern way to track these Rails components compared to previous methods.
_lib/new\_relic/agent/instrumentation/rails\notifications · high confidence
New Rake task infrastructure for configuration, versioning, and testing
The Ruby agent now includes a comprehensive set of Rake tasks in lib/tasks to streamline development and release workflows. Users can generate configuration documentation and JSON schemas via \rake newrelic:config:docs\ and \rake newrelic:config:schema\, update the \newrelic.yml\ file with the latest settings using \rake newrelic:update\_newrelicyml\, and manage version bumps with \rake newrelic:version:bump\. Testing is enhanced with \rake test:multiverse\ for functional suite execution, \rake test:newrelic\ for unit tests (supporting line-number-based filtering via \TEST=file.rb:line\), and CI-specific coverage report collation via \rake coverage:report\. Additionally, \rake gha:update\_versions\ automates GitHub Actions dependency updates.
lib/tasks · high confidence
New Relic Ruby Agent adds gRPC server instrumentation
The agent now instruments gRPC servers to capture distributed tracing and transaction metrics. This change introduces new files in the server instrumentation directory that wrap the \GRPC::RpcServer\ (for port binding and server startup) and \GRPC::RpcDesc\ (for handling request-response, client-streaming, server-streaming, and bidi-streaming RPCs). The instrumentation extracts host, port, and method information from the server configuration and request metadata, processes distributed tracing headers to link traces, and records transaction data including request headers and URI details for visibility in New Relic.
_lib/new\relic/agent/instrumentation/grpc/server · high confidence
New Relic Ruby agent adds instrumentation for OpenAI API calls
The New Relic Ruby agent now automatically instruments the OpenAI Ruby library to capture LLM-specific metrics and events. This change introduces instrumentation for both chat completions and embeddings, recording details such as model names, token counts, and message content (when content recording is enabled). It also supports custom LLM attributes from transaction metadata and provides supportability metrics to track usage of the instrumentation itself.
_lib/new\_relic/agent/instrumentation/ruby\openai · high confidence
New Relic Ruby agent adds instrumentation for the ruby-kafka library
The New Relic Ruby agent now automatically instruments the ruby-kafka library to capture distributed tracing and metrics for Kafka messaging. This change introduces chain and prepend-based instrumentation strategies to wrap the Kafka Producer's produce method and the Consumer's each\_message method, enabling automatic insertion of distributed trace headers and the recording of message broker segments. Additionally, it instruments the Kafka Client to propagate New Relic configuration to producers and consumers, and records specific metrics for Kafka nodes, actions, and topics.
_lib/new\_relic/agent/instrumentation/ruby\kafka · high confidence
New Relic Ruby agent can now be injected into Bundler-based apps without modifying dependencies
A new bootstrap file (lib/boot/strap.rb) allows the New Relic Ruby agent to be introduced to a production-ready Ruby app via the RUBYOPT environment variable, patching Bundler's require method to load the agent before the app's gems. This enables instrumentation without adding the agent as a direct dependency or modifying the app's Gemfile.
lib/boot · high confidence
New Relic agent now instruments the Ruby 'Logging' gem
The agent now captures log events from applications using the 'Logging' gem. When enabled, it decorates log data with New Relic context and records structured logging events, including any MDC (Mapped Diagnostic Context) data, allowing these logs to appear in the New Relic UI.
_lib/new\relic/agent/instrumentation/logging · high confidence
New Relic instrumentation extension for Sequel
Added a new \new\_relic\_instrumentation\ extension for Sequel databases that automatically instruments database connections with New Relic. This extension registers itself as \:new\_relic\_instrumentation\ and handles SQL query logging, datastore segment tracking, and SQL statement explanation for multi-threaded connection pools (specifically supporting \ThreadedConnectionPool\ and \TimedQueueConnectionPool\ on Ruby 3.2+).
lib/sequel/extensions · high confidence
New gRPC client instrumentation for distributed tracing
The agent now instruments the gRPC client library to automatically capture distributed tracing data for outgoing calls. This change introduces new files in the client instrumentation directory that wrap the standard gRPC client stub methods (unary, server-streaming, client-streaming, and bidirectional streaming) to create external request segments. These segments record metadata such as the target host, procedure name, and gRPC status codes, enabling visibility into gRPC service dependencies within the New Relic APM interface.
_lib/new\relic/agent/instrumentation/grpc/client · high confidence
New instrumentation for Grape API framework
Added support for automatic instrumentation of Grape API applications, enabling New Relic to capture transaction names, request parameters, and API version information. The implementation includes a new chain-based instrumentation strategy (chain.rb) and a prepend-based strategy (prepend.rb) to wrap the Grape API call method, ensuring that transaction data is captured correctly for both older and newer versions of the Grape gem.
_lib/new\relic/agent/instrumentation/grape · high confidence
New instrumentation for HTTPClient and HTTPrb libraries
Added support for automatic distributed tracing of HTTP requests made via the HTTPClient and HTTPrb gems. The agent now wraps the \do\_get\_block\ method in HTTPClient and the \perform\ method in HTTPrb to capture external request segments, including request/response headers and error handling, allowing these libraries to be monitored in New Relic dashboards.
_lib/new\relic/agent/instrumentation/httpclient · high confidence
New instrumentation generator CLI for scaffolding new library support
Developers can now use the \thor instrumentation:scaffold\ command to automatically generate the file structure required to add new instrumentation for a Ruby library. This CLI tool creates the necessary instrumentation files (chain, instrumentation, prepend, dependency detection), test suites, configuration files, and updates the default source configuration, significantly reducing the manual effort and toil involved in adding support for new gems.
_lib/tasks/instrumentation\generator · high confidence
New instrumentation generator templates for chain and prepend strategies
The instrumentation generator now includes a complete set of Thor templates (Envfile, chain, chain\_method, dependency\_detection, instrumentation, instrumentation\_method, newrelic.yml, prepend, prepend\_method, and test) to scaffold new library instrumentations. These templates support both the legacy method-chaining approach and the modern Module\#prepend strategy, allowing developers to generate the necessary Ruby code, dependency detection logic, and test scaffolding for new integrations.
_lib/tasks/instrumentation\generator/templates · high confidence
New nrdebug diagnostic tool and newrelic\_rpm CLI entry point
The repository now includes a new \bin/nrdebug\ executable that integrates a diagnostic tool into the Ruby agent, allowing users to capture detailed backtraces from all Ruby threads in a target process via GDB, along with process metadata like CPU, memory, and open files. Additionally, the \bin/newrelic\_rpm\ script has been added as the primary CLI entry point, delegating to the \NewRelic::Cli::Command\ runner to execute agent commands, replacing the previously deprecated \newrelic\_cmd\ binary.
bin · high confidence
New samplers for CPU, memory, VM, objects, and Delayed Job metrics
The agent now includes dedicated samplers to collect detailed runtime and infrastructure metrics. The new CPU sampler tracks user and system utilization and time, with support for JRuby 1.7.0+. The memory sampler adapts to the platform (Linux, macOS, Solaris, FreeBSD, JRuby) to report physical memory usage. The VM sampler records garbage collection runs, heap live/free counts, thread counts, object allocations, and cache invalidations. The object sampler reports live object counts via ObjectSpace. Additionally, the Delayed Job sampler monitors queue length, failed jobs, and locked jobs, breaking down queue metrics by name or priority where supported.
_lib/new\relic/agent/samplers · high confidence
NewRelic Ruby Agent initialization and public API exposed
The \lib/new\_relic/agent.rb\ file is introduced, establishing the core \NewRelic\ module and its public API. This change provides the foundational entry point for the Ruby agent, enabling users to initialize the agent, configure monitoring settings, and access instrumentation methods directly through the \NewRelic::Agent\ interface.
_lib/new\relic · high confidence
Architecture
New Relic Ruby agent control module restructured into sub-modules
The New Relic Ruby agent's core control logic has been reorganized from a monolithic structure into distinct sub-modules (class\_methods, instance\_methods, instrumentation, server\_methods, security\_interface, and frameworks). This refactoring improves maintainability and extensibility by separating concerns such as framework detection, instrumentation loading, server connection, and security agent initialization. Users will experience no functional changes, but the internal architecture is now more modular, facilitating easier debugging and future enhancements to specific agent components.
_lib/new\relic/control · high confidence
Refactor agent lifecycle into modular helper components
The agent's core lifecycle logic has been reorganized into distinct, reusable modules within the \AgentHelpers\ namespace. Connection handling, data harvesting, shutdown procedures, startup sequencing, worker thread management, and data transmission are now isolated into separate files (\connect.rb\, \harvest.rb\, \shutdown.rb\, \special\_startup.rb\, \start\_worker\_thread.rb\, \startup.rb\, and \transmit.rb\). This structural change improves code maintainability and separation of concerns without altering the external behavior of the agent.
_lib/new\_relic/agent/agent\helpers · high confidence
Refactored connect service request and response handling
The connect service logic has been reorganized into dedicated modules: a new RequestBuilder class now constructs the payload sent to the New Relic collector, including environment metadata and event harvest configuration, while a new ResponseHandler class manages the application of server-side configuration updates to the agent. This change improves code modularity and separation of concerns within the agent's communication layer with the backend.
_lib/new\relic/agent/connect · high confidence
Behavioural changes
Configurable New Relic agent initialization timing in Rails
The New Relic agent now supports deferred initialization in Rails applications via the NEW\_RELIC\_DEFER\_RAILS\_INITIALIZATION environment variable. When enabled, the agent includes method tracers before other config initializers run but delays the full plugin initialization until after config initializers have loaded, allowing applications to configure the agent using standard Rails config mechanisms. If the environment variable is not set, the agent initializes before config initializers as before.
lib · high confidence
Defer trace creation until harvest
The agent now defers the creation of transaction traces until the harvest phase, rather than creating them immediately. This change, implemented via the introduction of TraceBuilder and AbstractSegment\#finalize, optimizes resource usage by avoiding the allocation of trace data for transactions that may be dropped or filtered later in the process.
_lib/new\relic/agent · high confidence
Deferred loading of Infinite Tracing library
The Infinite Tracing library is now loaded via a deferred dependency detection mechanism, ensuring that it only initializes after the New Relic Agent core has been fully configured. This change prevents premature loading issues and ensures that the library respects the agent's configuration state before requiring its internal components such as the worker, connection, and client modules.
_infinite\tracing/lib/newrelic · high confidence
Delayed Job instrumentation now uses module prepending
The New Relic Ruby agent has refactored its Delayed Job instrumentation to use Ruby's module prepend mechanism instead of alias chaining. This change ensures that the agent's tracing hooks are applied before any other modifications to the \Delayed::Worker\ and \Delayed::Job\ classes, improving compatibility with other gems that also monkey-patch these classes. For users, this results in more reliable transaction and span data capture for background jobs, particularly in environments where multiple libraries interact with Delayed Job.
_lib/new\_relic/agent/instrumentation/delayed\job · high confidence
Excon instrumentation refactored to use external segments and Tracer API
The Excon HTTP client instrumentation has been rewritten to use the new external segment API and Tracer, replacing the previous middleware-based approach. This change ensures that tracing segments are properly started and finished using the dedicated Tracer, handles idempotent requests correctly by preventing duplicate instrumentation, and updates header processing to use the new process\_response\_headers method. Users will see more accurate and consistent distributed tracing data for Excon requests, with improved handling of errors and response headers.
_lib/new\relic/agent/instrumentation/excon · high confidence
Introduces dedicated StatsHash and GCProfiler components for metric collection
The stats engine now uses a new \StatsHash\ class to store metrics, separating scoped and unscoped data into distinct internal hashes and providing explicit methods for recording and merging transaction metrics. Additionally, a new \GCProfiler\ module has been added to capture garbage collection time and call counts, recording them as specific metrics (\GC/Transaction/all\, \GC/Transaction/allWeb\, \GC/Transaction/allOther\) based on the transaction type.
_lib/new\_relic/agent/stats\engine · high confidence
Introduces new segment and distributed tracing architecture
The agent introduces a new segment hierarchy with \AbstractSegment\ as the base class, alongside new concrete segment types for datastores (\DatastoreSegment\), external requests (\ExternalRequestSegment\), and message brokers (\MessageBrokerSegment\). This change also centralizes distributed tracing logic into a new \DistributedTracer\ class and \DistributedTracing\ module, which handle the creation and acceptance of trace payloads and headers. Additionally, a new \RequestAttributes\ class is added to manage the collection and assignment of HTTP request attributes to transactions.
_lib/new\relic/agent/transaction · high confidence
MongoDB instrumentation refactored into dedicated metric and event formatter modules
The MongoDB datastore instrumentation has been restructured to improve clarity and supportability. A new \EventFormatter\ module now handles the formatting of MongoDB commands for query capture, including obfuscation of specific keys like \filter\, \query\, and \pipeline\, and removal of denylisted keys. A new \MetricTranslator\ module centralizes the logic for translating MongoDB operations into metrics, handling collection name extraction from selectors, supporting new operations like \createIndexes\, and ensuring metric consistency for renamed operations (e.g., mapping \delete\ to \remove\ for older driver versions). This refactoring separates concerns, making the instrumentation easier to maintain and extend.
_lib/new\relic/agent/datastores/mongo · high confidence
New --force option for the newrelic install command
The \newrelic install\ CLI command now accepts a \--force\ (or \-f\) flag, allowing users to overwrite an existing \newrelic.yml\ configuration file. Previously, the command would fail with an error if the target file already existed; with this change, users can explicitly choose to replace the current configuration without manual deletion.
_lib/new\relic/cli/commands · high confidence
New Curb instrumentation using method prepending
The New Relic Ruby agent now instruments the Curb HTTP client library using Ruby's method prepending mechanism instead of the previous aliasing approach. This change introduces new files (chain.rb, instrumentation.rb, prepend.rb) to wrap Curb::Easy and Curb::Multi methods (such as http, perform, and add) with tracing segments, ensuring that external request metrics are captured correctly for both serial and parallel requests while avoiding potential conflicts with other libraries that might monkey-patch the same classes.
_lib/new\relic/agent/instrumentation/curb · high confidence
New Relic Ruby Agent configuration system refactored with layered sources and type coercion
The agent's configuration management has been rewritten to use a layered source architecture (Default, YAML, Environment, Server, High Security, and Manual sources) managed by a new Configuration::Manager. This change introduces strict type coercion for configuration values, supports dotted-key notation via a new DottedHash class, and enforces high-security mode overrides (e.g., disabling capture\_params, obfuscating SQL). It also adds support for event harvest configuration from the server, allowing dynamic adjustment of sampling rates and report periods for transaction, custom, error, and log events.
_lib/new\relic/agent/configuration · high confidence
Padrino instrumentation refactored to use method prepending
The New Relic agent's instrumentation for the Padrino framework has been updated to use Ruby's method prepending mechanism instead of the previous module inclusion and aliasing approach. This change modifies how the agent wraps the \dispatch\ and \invoke\_route\ methods in Padrino applications, ensuring that tracing is applied via prepended modules. Users of the agent with Padrino applications will experience this as a transparent update to the underlying instrumentation strategy, which may affect compatibility with older Padrino versions or custom monkey-patches that relied on the previous aliasing structure.
_lib/new\_relic/agent/instrumentation/bunny, lib/new\_relic/agent/instrumentation/padrino, lib/new\relic/agent/instrumentation/resque · high confidence
Rack instrumentation refactored to use prepending and support Rack v3+ middleware patterns
The Rack instrumentation mechanism has been rewritten to use Ruby module prepending instead of aliasing, which improves compatibility with modern Ruby and Rack versions. This change introduces support for Rack v3+ middleware patterns, specifically handling the shift where \Rack::Builder\#run\ accepts a block instead of arguments. The new implementation also includes deferred dependency detection to ensure all libraries are loaded before instrumentation hooks are applied, and adds version checks to ensure compatibility with Rack 1.1.0+ and Puma 3.9.0+.
_lib/new\relic/agent/instrumentation/rack · high confidence
Rake instrumentation now uses method prepending
The New Relic Ruby agent has refactored its Rake task instrumentation to use Ruby's \prepend\ mechanism instead of aliasing. This change modifies how the agent hooks into \Rake::Task\#invoke\ and \\#execute\, ensuring that the original methods are called via \super\ rather than through aliased methods. This approach improves compatibility with other gems that may also instrument Rake tasks, reducing the risk of method resolution conflicts or broken call chains.
_lib/new\relic/agent/instrumentation/rake · high confidence
Re-architected framework detection into modular control classes
The agent's framework detection logic has been restructured from a monolithic implementation into distinct, modular classes under \NewRelic::Control::Frameworks\. New files define specific control classes for Ruby, Rails (with inheritance chains for Rails 3, 4, and Notifications), Sinatra, Padrino, Grape, Roda, and an External context. This change introduces framework-specific initialization, environment resolution, and instrumentation shimming (e.g., including \ControllerInstrumentation::Shim\ into \Sinatra::Base\ or \Roda\), while also adding support for previously uninstrumented frameworks like Grape and Roda.
_lib/new\relic/control/frameworks · high confidence
Redis instrumentation refactored to support Redis gem v5 and clustering
The Redis instrumentation has been restructured to support both the legacy Redis gem (v3–v4) and the newer Redis gem v5+ (which uses redis-client). This change introduces a modular instrumentation layer that uses prepending for standard Redis clients, middleware for redis-client-based connections, and a dedicated cluster middleware to ensure Redis Cluster environments are monitored. Users benefit from consistent APM visibility across different Redis client versions and cluster setups, with improved error capturing and configuration handling.
_lib/new\relic/agent/instrumentation/redis · high confidence
Refactor ActiveRecord instrumentation to use Segments instead of Events
The \ActiveRecordSubscriber\ has been refactored to utilize the new Segment-based tracing API (\Tracer.start\_datastore\_segment\) rather than the legacy EventedSubscriber/Event model. This change improves the consistency of database metrics and transaction traces by aligning ActiveRecord instrumentation with the agent's modern segment architecture, ensuring that datastore operations are recorded with the same granularity and structure as other external calls.
_lib/new\relic/agent/instrumentation · high confidence
Refactored CLI command loading and execution logic
The CLI command infrastructure has been restructured to improve maintainability and namespace clarity. The core command dispatcher is now centralized in a new \lib/new\_relic/cli/command.rb\ file, which handles argument parsing, help display, and the dynamic loading of command subclasses from the \commands/\ directory. This change also includes renaming the executable from \bin/newrelic\ to \bin/newrelic\_rpm\ to better reflect its association with the RPM agent, and cleans up the loading mechanism for \Cli::Command\ subclasses to ensure they are registered correctly upon inheritance.
_lib/new\relic/cli · high confidence
Refactored Net::HTTP instrumentation to use module prepending
The Net::HTTP instrumentation mechanism has been updated to use Ruby's module prepending strategy instead of the previous class-eval aliasing approach. This change introduces a dedicated \Prepend\ module that wraps the \request\ method, ensuring that tracing logic is applied via \request\_with\_tracing\ before delegating to the original implementation. This architectural shift improves compatibility with modern Ruby patterns and ensures that the instrumentation correctly intercepts HTTP requests for external request segment creation, header processing, and OpenAI-specific response header population without interfering with the underlying \Net::HTTP\ class structure.
_lib/new\_relic/agent/instrumentation/net\http · high confidence
Refactored RUM middleware into dedicated AgentMiddleware base class
The Real User Monitoring (RUM) browser monitoring logic has been restructured to improve code organization and safety. The previous \TransactionReset\ module has been renamed to \AgentMiddleware\, providing a shared base class that handles transaction naming and includes the \MiddlewareTracing\ module. The \BrowserMonitoring\ middleware now inherits from this new base class, centralizing common instrumentation logic. Additionally, a new \AgentHooks\ middleware was introduced to handle cases where middleware instrumentation is disabled, ensuring the agent can still capture necessary data by manually tracing calls.
_lib/new\relic/rack · high confidence
Refactored SQL obfuscation and explain plan handling for improved accuracy and multi-dialect support
The database agent's SQL obfuscation logic has been restructured to support dialect-specific cleaning for MySQL, PostgreSQL, SQLite, Oracle, and Cassandra, replacing the previous generic approach. This change introduces dedicated helper modules to manage regex components per dialect, ensuring that literals like UUIDs, dollar-quoted strings, and comments are handled correctly for each database type. Additionally, explain plan processing for PostgreSQL has been separated into its own obfuscator to prevent false positives from backslash-escaped strings, and the system now safely skips explain plans for multi-query SQL expressions to avoid executing unintended statements.
_lib/new\relic/agent/database · high confidence
Refactored VM metrics collection with monotonic GC timing and CRuby/JRuby separation
The VM metrics subsystem has been restructured to improve accuracy and compatibility. A new MonotonicGCProfiler ensures that GC total time is measured as a steadily increasing value without double-counting, addressing previous issues with GC::Profiler resets. The previous generic VM class has been removed and replaced with specific implementations: CRubyVM now gathers detailed GC stats (runs, counts, heap usage) and RubyVM-specific metrics (method/constant cache invalidations) with version-aware gating for Ruby 3.2+, while JRubyVM provides a simplified snapshot focusing on GC runs and thread count. Both implementations use a shared Snapshot class to record metrics, and the codebase now relies on Process.clock\_gettime for timestamps and NewRelic::Helper.version\_satisfied? for version checks.
_lib/new\relic/agent/vm · high confidence
Refactored collector data marshalling and encoding into modular components
The New Relic agent's collector communication layer has been restructured to improve maintainability and support new configuration options. Data marshalling is now handled by a new \JsonMarshaller\ class that explicitly warns users about incompatible versions of the \yajl-ruby\ gem (specifically versions older than 1.2.1) to prevent thread profiling segfaults. Encoding logic has been extracted into a dedicated \Encoders\ module, introducing support for a \simple\_compression\ configuration option that allows users to bypass gzip/deflate compression in favor of identity encoding, which can reduce CPU overhead. Additionally, the system now respects a \normalize\_json\_string\_encodings\ setting to control whether string encodings are normalized before JSON serialization, and the base64 dependency has been removed in favor of a custom internal implementation.
_lib/new\_relic/agent/new\_relic\service · high confidence
Refactored datastore metrics and added Redis argument recording
The agent now uses a centralized \MetricHelper\ to generate structured datastore metrics (statement, operation, instance, and rollup) for all database integrations, replacing the previous metric naming logic. Additionally, Redis instrumentation has been enhanced to record command arguments in transaction traces, with support for truncating long arguments and handling binary data, while MongoDB monitoring is now gated to supported versions (2.1.0+) to ensure compatibility.
_lib/new\relic/agent/datastores · high confidence
Refactored distributed tracing and synthetics monitoring into dedicated monitor classes
The agent's handling of incoming distributed tracing and synthetics headers has been restructured into new, dedicated monitor classes (\DistributedTracing::Monitor\, \SyntheticsMonitor\) that inherit from a shared \InboundRequestMonitor\ base. This change consolidates previously scattered logic, standardizes header deserialization via \JSON.parse\, and ensures these monitors only activate after the agent is fully configured. For users, this represents an internal architectural cleanup that improves code maintainability and consistency without altering the external behavior of distributed tracing or synthetics support.
_lib/new\relic/agent/monitors · high confidence
Refactored distributed tracing into modular components with W3C TraceContext support
The distributed tracing logic has been reorganized into dedicated modules (DistributedTraceAttributes, DistributedTraceMetrics, DistributedTracePayload, DistributedTraceTransportType, TraceContext, and TraceContextPayload) to improve code clarity and maintainability. This change introduces support for W3C TraceContext headers (traceparent/tracestate) alongside New Relic's proprietary headers, allowing the agent to parse and insert both formats. It also adds new distributed trace metrics (DurationByCaller, TransportDuration, ErrorsByCaller) and ensures trace context payloads are correctly formatted, including handling invalid payloads and preventing scientific notation in priority values.
_lib/new\_relic/agent/distributed\tracing · high confidence
Refactored rules engine into dedicated ReplacementRule and SegmentTermsRule classes
The rules engine logic has been restructured by extracting specific rule types into their own files: \ReplacementRule\ and \SegmentTermsRule\. \ReplacementRule\ now handles match-expression-based replacements, supporting options to ignore matches, replace all occurrences, or apply replacements to individual path segments. \SegmentTermsRule\ manages prefix-based term replacement, ensuring prefixes match on complete segments and collapsing adjacent placeholder segments to improve URL normalization. This change improves code organization and execution performance by separating distinct rule behaviors.
_lib/new\_relic/agent/rules\engine · high confidence
Refactored thread profiler and agent command routing
The agent command handling in this location has been restructured to improve clarity and reliability. A new AgentCommand class now encapsulates raw collector commands, while the AgentCommandRouter serves as the central dispatcher, managing handlers for profiler start/stop commands and integrating with the BacktraceService. The ThreadProfilerSession class now manages the lifecycle of thread profiling sessions, including starting, stopping, and harvesting data, with improved error handling for unsupported environments (like Resque) and disabled configurations. This refactoring also includes cleanup of unused code and better logging.
_lib/new\relic/agent/commands · high confidence
Sidekiq instrumentation refactored for v7.0+ with span kinds and attribute filtering
The Sidekiq instrumentation has been restructured into dedicated client and server middleware classes to support Sidekiq v7.0+. For users, this introduces span.kind=consumer for Sidekiq jobs, enabling better visibility into background task execution in distributed traces. The server middleware now supports the new sidekiq.separate\_transactions configuration to isolate job transactions from web transactions, and implements attribute pre-filtering for sidekiq.args to control which job arguments are recorded. Additionally, error reporting is suppressed when sidekiq.ignore\_retry\_errors is enabled, and distributed trace headers are only processed when present.
_lib/new\relic/agent/instrumentation/sidekiq · high confidence
Sinatra instrumentation refactored to support ignore settings and improved transaction naming
The Sinatra instrumentation has been restructured into modular components (chain, prepend, ignorer, transaction\_namer) to enhance reliability and feature support. Users can now explicitly ignore specific routes, Apdex calculations, or end-user timing data using the new \newrelic\_ignore\, \newrelic\_ignore\_apdex\, and \newrelic\_ignore\_enduser\ DSL methods. Transaction naming logic has been moved to a dedicated namer class, improving accuracy for both standard Sinatra routes and Padrino applications, while also including safeguards against ReDoS attacks by limiting route text length during processing.
_lib/new\relic/agent/instrumentation/sinatra · high confidence
Standardized repository configuration and build ignore lists
The repository now uses a standardized \.build\_ignore\ file to explicitly define which files and directories are excluded from the gem build (such as \.github/\, \test/\, \config/\, and various documentation files), replacing the previous implicit or scattered ignore logic. A comprehensive \.gitignore\ file has been added to manage local development artifacts, build outputs, and IDE files. Additionally, a new \.rubocop.yml\ configuration file has been introduced, setting the target Ruby version to 2.7 and enabling plugins for \rubocop-minitest\, \rubocop-performance\, and \rubocop-rake\ to enforce consistent code style and linting across the project.
(repo-wide) · high confidence
Thread profiling now uses a subscription model with dedicated agent threads
The threading module has been refactored to replace the previous X-Ray session mechanism with a new subscription-based BacktraceService. Agent operations now run in dedicated AgentThread instances that explicitly disable tracing to prevent cross-thread transaction state access, ensuring thread-local data isolation. The new service aggregates thread backtraces into structured profiles (ThreadProfile) using a BacktraceNode tree, supporting bucketing for agent, background, request, and other threads, and sends these profiles to the collector only when subscribed to specific transactions.
_lib/new\relic/agent/threading · high confidence
Thread tracing now shares only the current transaction
The thread instrumentation has been refactored to limit the data shared with new threads to the current transaction context, rather than propagating the entire agent state. This change, implemented in the new \MonitoredThread\ module (replacing the previous \ThreadMonitor\), ensures that child threads inherit necessary tracing information without carrying over unrelated internal state, reducing potential side effects and memory overhead while maintaining visibility into thread execution.
_lib/new\relic/agent/instrumentation/thread · high confidence
Typhoeus instrumentation now uses prepend instead of aliasing
The New Relic Ruby agent has refactored its Typhoeus HTTP client instrumentation to use Ruby's prepend mechanism rather than the previous aliasing approach. This change modifies how the agent wraps the \Typhoeus::Hydra\#run\ method and individual requests, ensuring that the original implementation is preserved via \super\ calls. For users, this provides a more robust instrumentation layer that is less likely to conflict with other gems or future changes to the Typhoeus library, while maintaining the same external behavior of tracing requests and recording supportability metrics.
_lib/new\relic/agent/instrumentation/typhoeus · high confidence
Updated Dalli instrumentation to support Dalli 5.x and modern Ruby prepend APIs
The Memcached instrumentation for the Dalli gem has been refactored to support Dalli versions 3.1.0 through 5.1.0+, including the new Meta protocol and optional arguments in multi-key operations. The implementation now uses Ruby's module prepend mechanism for instrumentation, which improves compatibility with modern Ruby versions and avoids method aliasing conflicts. Additionally, the agent now correctly captures datastore instance information (host and port) for Dalli 2.6.4+ and handles Unix domain sockets, ensuring accurate service mapping in New Relic dashboards.
_lib/new\relic/agent/instrumentation/memcache · high confidence
gRPC instrumentation helper for method cleaning and host filtering
Added a helper module for the gRPC instrumentation that provides utilities to normalize RPC method names by stripping leading slashes and to filter out specific hosts based on a configurable denylist, ensuring that internal New Relic tracing endpoints are excluded from instrumentation.
_lib/new\relic/agent/instrumentation/grpc · high confidence
Fixes
Fix exception in Rails broadcast logger instrumentation
The New Relic agent now correctly instruments Rails broadcasted loggers without raising exceptions. The implementation ensures that when a log is broadcast, the agent records the event for the primary logger while temporarily skipping instrumentation on the broadcasted loggers to prevent recursive errors, then restores their instrumentation state afterward.
_lib/new\_relic/agent/instrumentation/active\_support\_broadcast\logger · high confidence
Test coverage
Add ActiveRecord multiverse test suite; Add ActiveRecord test suite configuration files; Add HTTPClient instrumentation tests; Add JSON serialization test suite; Add Rails 6.1 test environment configuration; Add Rails 8.0 test environment scaffold; Add multiverse test suite for ActiveRecord with PostgreSQL; Add multiverse test suite for Padrino framework support; Add test infrastructure for Rails 4.2 and Rails 5.0 environments; Add test suite for Sidekiq Delay Extensions instrumentation; Added ActiveRecord database migration test fixtures; Added Perfverse performance testing infrastructure; Added PostgreSQL ActiveRecord migration tests; Added RUM insertion location test fixtures; Added Rails 3+ test application for multiverse suite; Added Rails 6.0 test environment configuration; Added Rails 7 test application for New Relic agent verification; Added Rails 7 test initializer with Bloodhound model for method tracing; Added Rails 7.1 test environment; Added Rails 8.0 performance test application configuration; Added Rails 8.1 edge test environment configuration; Added Rails 8.1 test environment scaffold; Added Rails edge test environment scaffolding; Added Rails environment configuration files for the performance test app; Added Sequel multiverse test suite; Added basic marshalling test suite; Added comprehensive test coverage for the Ruby agent configuration system; Added datastore API cross-agent tests; Added functional tests for Puma instrumentation; Added integration tests for Infinite Tracing agent behavior and segment streaming; Added memcache instrumentation tests for Dalli, MemCache, and Memcached gems; Added multiverse test scripts for agent startup, environment handling, and API safety; Added multiverse test suite examples for execution modes; Added multiverse test suite examples for gem isolation; Added multiverse test suite for MongoDB instrumentation; Added multiverse test suite for Rack and Puma instrumentation; Added multiverse test suite for Sidekiq instrumentation; Added multiverse test suite for Unicorn integration; Added multiverse tests for ActiveMerchant integration; Added multiverse tests for Delayed Job instrumentation and sampling; Added multiverse tests for Ruby logging instrumentation; Added multiverse tests for Typhoeus HTTP client instrumentation; Added multiverse tests for Yajl JSON marshalling; Added multiverse tests for the http.rb gem; Added performance reporting infrastructure for generating agent benchmark graphs; Added performance test suites for agent instrumentation and core components; Added test configuration and fixtures for unit testing; Added test configuration for the active\_record\_pg multiverse suite; Added test coverage for AWS SQS instrumentation; Added test coverage for DynamoDB instrumentation; Added test coverage for Infinite Tracing components; Added test coverage for Rails 7.0 environment setup; Added test coverage for Rails instrumentation subscribers; Added test coverage for Rails instrumentation subscribers and helper modules; Added test coverage for agent monitors; Added test coverage for gRPC client and server instrumentation; Added test coverage for standalone method tracers; Added test coverage for utilization vendor classes; Added test environment for Rails 4.2.0.beta1; Added test environment setup for Rails 5.0; Added test harness for Rails prepend metrics; Added test helper modules for configuration scanning, Docker detection, and metrics; Added test infrastructure files for the Rails performance app; Added test infrastructure for Infinite Tracing; Added test infrastructure for MongoDB server and replica set management; Added test infrastructure for Rails performance testing; Added test initializer for Rails 6.0 agent instrumentation; Added test initializers for Rails environments; Added test suite for Bunny RabbitMQ instrumentation; Added test suite for Excon HTTP client instrumentation; Added test suite for New Relic agent behavior with the Parallel gem; Added test suite for OpenTelemetry hybrid agent bridge; Added test suite for Sidekiq error handling when ignore\_retry\_errors is enabled; Added test suite for high security mode enforcement; Added test suite for running tests without the agent; Added test support utilities for Infinite Tracing; Added tests for ActiveSupport Logger broadcast behavior; Added tests for ActiveSupport::BroadcastLogger instrumentation; Added tests for CPU, Memory, and VM samplers; Added tests for HTTP client URI utility functions; Added tests for MongoDB event formatting and metric translation; Added tests for NewRelicService JSON marshaller configuration; Added tests for OpenSearch instrumentation; Added tests for Rails prepend supportability metrics; Added tests for Roda agent-disabled shim behavior; Added tests for Roda instrumentation and ignore configurations; Added tests for SQL and Postgres Explain plan obfuscation; Added tests for Sinatra agent-disabled shims; Added tests for Slack notification gem and notifier scripts; Added tests for Stripe instrumentation user data filtering and metric cardinality; Added tests for Tilt template instrumentation; Added tests for VM GC profiling and snapshotting; Added tests for ViewComponent instrumentation; Added tests for agent lifecycle, configuration, and data coercion; Added tests for connect request builder and response handler; Added tests for datastore metric helper, Redis command formatting, and NoSQL obfuscation; Added tests for deferred Sinatra instrumentation; Added tests for newrelic.yml config file loading logic; Added tests for schema generation, diffing, and version bumping logic; Added tests for the GitHub Actions release notes generation script; Added tests for the New Relic CLI install command; Added tests for the boot/strap bundler patcher; Added tests for thread and fiber instrumentation parent-child relationships and argument preservation; Added tests for trace\_execution\_scoped metric recording and timing; Added tests for version bump rake task; Added unit tests for GC profiling and StatsHash; Added unit tests for LLM event classes and feedback API; Added unit tests for New Relic Control module components; Added unit tests for New Relic Rack middleware components; Added unit tests for Rails browser monitoring installation; Added unit tests for Sinatra transaction naming logic; Added unit tests for agent command routing and thread profiling; Added unit tests for agent startup, connection, and worker thread logic; Added unit tests for distributed tracing metrics, payloads, and W3C Trace Context parsing; Added unit tests for method tracer class methods; Added unit tests for the threading subsystem; Added unit tests for transaction tracing components; Expanded test coverage for New Relic Ruby agent internals; Introduce Ruby Agent performance testing framework; Introduce multiverse test infrastructure and Minitest timing plugin; Introduce standardized test infrastructure and helpers; New multiverse test suite for agent-only functionality; New performance test runner scripts for baseline and multi-commit testing; New test runner script and external server helper; Rails multiverse test suite updated for Rails 8.0 and Ruby 3.3; Refactored CI installation scripts for better environment control.
Dependencies
New GitHub Actions and Ruby test environment dependencies
This change introduces new GitHub Actions for CI automation and establishes explicit dependency constraints for the Ruby agent's test environments. The \newrelic-annotate\ action adds \@actions/core\ 1.11.1 and \@vercel/ncc\ 0.27.0, while the \issue\_closer\ action uses \@actions/core\ 1.10.0 and \@vercel/ncc\ 0.36.1. The \simplecov-report\ action pins \@actions/core\ 1.9.0 and \@zeit/ncc\ 0.22.3, and the \variable-mapper\ action uses \@actions/core\ 1.10.0 and \@vercel/ncc\ 0.34.0. For the Ruby agent, the main gemspec and test environments now explicitly declare \logger\ as a runtime dependency and pin \mocha\ to \\~\> 1.16\. Test environments for Rails 4.0 through 7.2 and Rails 8.0/edge are created with specific gem versions, including conditional constraints for \sqlite3\ (e.g., \\< 2\ for Rails 6.0/6.1, \\>= 2.1\ for Rails 8.0/edge) and \i18n\ (pinned \\< 1.15.0\ for Ruby 3.1).
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 50.
Lenses
- Code Health 87
- Architecture 93
- Maturity 37
- Readiness 53
- Security 52
Changes since last survey
- 300 commits — 266 feature/other, 34 fixes
By area
- (repo) — 94 commits
- lib/new_relic — 55 commits
- (root) — 44 commits
- test/multiverse — 25 commits
- .github/workflows — 22 commits
- test/new_relic — 20 commits
- .fleetControl/schemaGeneration — 14 commits
- lib/tasks — 6 commits
- test/perfverse — 6 commits
- .github/actions — 4 commits
- .claude/CLAUDE.md — 3 commits
- .claude/development.md — 2 commits
- .fleetControl/configurationDefinitions.yml — 2 commits
- .claude/hooks — 1 commit
- .fleetControl/schemas — 1 commit
- test/environments — 1 commit
Notable commits
- fix: Add entry for Dalli 5.1 arg fix
- fix: Fix for fake active record in db test
- fix: Fix method naming
- fix: Fix order of entries
- fix: Fix quotes
- fix: Fix spacing
- fix: Fix tilt test
- fix: Fix: Call run from rake file
- fix: Merge branch 'dev' into fix-config-docs-workflow
- fix: Merge pull request #3599 from newrelic/fix-spacing-changelog
- fix: Merge pull request #3600 from newrelic/fix-safe-nav-test-coverage
- fix: Merge pull request #3621 from newrelic/fix-config-docs-workflow
- fix: Merge pull request #3627 from newrelic/small-fixes
- fix: Merge pull request #3633 from newrelic/fix-boolean-env-var-casing
- fix: Merge pull request #3640 from ydah/fix/async-http-segment-safety
- fix: Merge pull request #3643 from newrelic/changelog-for-dalli-5-1-fix
- fix: Merge pull request #3655 from newrelic/fix-changelog
- fix: Revert
- fix: Revert "Add server span kind to web category transactions"
- fix: Trim whitespace, fix capitalization
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
newrelic/newrelic-ruby-agent was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 3245f6171d6b18ca942e959839fb9eaac21fcce8 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.