Importante
Major Version Update: This version of the Ruby agent is a SemVer MAJOR update and contains breaking changes. MAJOR versions may drop support for language runtimes that have reached End-of-Life according to the maintainer. Additionally, MAJOR versions may drop support for and remove certain instrumentation. For more details on these changes please see the migration guide here.
Importante
We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.
See the New Relic Ruby agent EOL policy for information about agent releases and support dates.
v10.0.0
Breaking Change: Remove support for Ruby 2.4 and 2.5
Support for Ruby versions 2.4 and 2.5 has been removed. The new minimum required Ruby version is now 2.6. PR#3314
Breaking Change: Removal of Cross Application Tracing (CAT)
Previously, Cross Application Tracing (CAT) was deprecated in favor of Distributed Tracing. CAT functionality has now been removed. The configuration option
cross_application_tracer.enabledhas been removed. Public API methodsNewRelic::Agent::External.process_request_metadata,NewRelic::Agent::External.get_response_metadata,NewRelic::Agent::Transaction::ExternalRequestSegment#process_response_metadata,NewRelic::Agent::Transaction::ExternalRequestSegment#get_request_metadata, andNewRelic::Agent::Transaction::ExternalRequestSegment#read_response_headershave also been removed. PR#3333Breaking Change: Rename ActiveJob metrics and segments
ActiveJob metrics have been updated to include the job's class name for more specific reporting. This is a breaking change and may require updating custom dashboards or alerts. PR#3370 PR#3320
- Old format:
Ruby/ActiveJob/<QueueName>/<Method> - New format:
Ruby/ActiveJob/<QueueName>/<ClassName>/<Method>
In addition, segments created for Active Job enqueuing actions now include the job class.
- Old format:
ActiveJob/<QueueAdapter>/Queue/<Event>/Named/<QueueName> - New format:
ActiveJob/<QueueAdapter>/Queue/<Event>/Named/<QueueName>/<ClassName>
- Old format:
Breaking Change: Rename
bin/newreliccommand tobin/newrelic_rpmThe executable file for the agent's CLI has been renamed from
bin/newrelictobin/newrelic_rpm. This change resolves a name collision with the standalone New Relic CLI tool. PR#3323Breaking Change: Remove the
newrelic deploymentsCLI commandThe deprecated
newrelic deploymentsCLI command has been removed. To track changes and deployments in New Relic, please see our guide to Change Tracking for a list of available options. PR#3299Breaking Change: Remove the NewRelic::Agent::SqlSampler#notice_sql method
Users should call
NewRelic::Agent::Datastores.notice_sqlinstead. PR#3338Breaking Change: Remove unused arguments from various NewRelic::Agent::Datastores APIs
The following APIs from the
NewRelic::Agent::Datastoresclass have had method arguments removed:NewRelic::Agent::Datastores.notice_sql, previously had three positional arguments,query,scoped_metricandelapsed. Now, it only hasquery.NewRelic::Agent::Datastores.notice_statement, previously had two positional argumentsqueryandelapsed. Now it only hasquery.NewRelic::Agent::Datastores.wraprequires a proc. Previously the proc received three arguments: the result of the yield, the most specific scoped metric name, and the elapsed time of the call. Now, it only receives one: the result of the yield.
The values of the removed arguments are derived from the current segment at the time of the call. PR#3347
Breaking Change: Remove experimental feature Configurable Security Policies (CSP)
The experimental feature, Configurable Security Policies (CSP), is no longer supported and has been removed. PR#3292
Breaking Change: Remove support for Puma versions < 3.9.0
The minimum version of Puma now supported is 3.9.0 or higher. PR#3326
Breaking Change: Improve configuration validation and coercion
The internals used to coerce and validate the values provided for agent configuration are now more performant and more accurate.
- Warning messages will now be logged to the newrelic_agent.log file when nil is provided as a config value for a setting that does not support it.
- Integer values are permitted for Float configuration types
- Float values are permitted for Integer configuration types
- Fatal interruptions are prevented when a default value can be found to replace an invalid input value PR#3341
Breaking Change: Replace 'default' option with 'adaptive' for distributed tracing remote parent samplers
Previously, the default option for
distributed_tracing.sampler.remote_parent_sampledanddistributed_tracing.sampler.remote_parent_not_sampledwasdefault, which used the pre-existing adaptive sampler. Thedefaultoption has been renamed toadaptive. PR#3363Feature: Add
loggeras a dependencyThe
loggergem is now listed as a dependency of the agent to ensure continued logging functionality and support for Ruby 4.0.0 and newer versions. PR#3293Feature: Add Active Support notification allowlist configuration option
A new configuration option,
instrumentation.active_support_notifications.active_support_events, allows users to define an allowlist of Active Support notifications event names for the agent to subscribe to. By default, the agent subscribes to all Active Support: Caching and Active Support: Messages events. PR#3327Feature: Use Ruby's built-in Gzip compression
The agent now uses the built-in
Zlib.gzipmethod from the Ruby standard library for compression, replacing the previous custom implementation. PR#3332Feature: Add argument validation for the
NewRelic::Agent#record_custom_eventAPIThe
NewRelic::Agent#record_custom_eventAPI now raises anArgumentErrorwhen an invalidevent_typeis provided. A valid event type must consist only of alphanumeric characters, underscores (_), colons (:), or spaces (). PR#3319Feature: Add root sampling configuration options
You can now configure the sampling behavior for traces that originate within the current service using
distributed_tracing.sampler.root. PR#3330There are four modes available:
Mode Description adaptiveUses the existing adaptive sampler algorithm always_offMarks 0% of root traces as sampled always_onMarks 100% of root traces as sampled trace_id_ratio_basedSamples traces based on a ratio set in distributed_tracing.sampler.root.trace_id_ratio_based.ratio. The ratio must be float between 0.0 and 1.0Feature: Add Trace ID Ratio Based sampling options
The agent can now sample traces using the OpenTelemetry Trace ID Ratio Based sampler algorithm. PR#3330 This samples traces based on a probability between 0.0 and 1.0 based on the trace ID.
To use this option, you must first set your distributed tracing sampler configuration to
trace_id_ratio_basedand then set the correspondingdistributed_tracing.sampler.*.trace_id_ratio_based.ratiosampler to a Float between 0.0 and 1.0.For example:
distributed_tracing.sampler.remote_parent_sampled: 'trace_id_ratio_based'distributed_tracing.sampler.remote_parent_sampled.trace_id_ratio_based.ratio': 0.5This configuration would sample approximately 50% of your traces for all traces where the remote parent is sampled.
This option is available for:
distributed_tracing.sampler.rootdistributed_tracing.sampler.remote_parent_sampleddistributed_tracing.sampler.remote_parent_not_sampled
Feature: Add Entity GUID to Agent Control health check files
When the agent is started within an Agent Control environment, a health check file is created at the configured file location for every agent process. This file now includes the guid of the entity related to the agent when available. PR#3371
Bugfix: Resolve a
NoMethodErrorin GCP utilization detection.The GCP metadata discovery logic will now gracefully handle
nilor unexpected values, preventing service initialization crashes. PR#3388
Importante
Recomendamos actualizar a la última versión del agente tan pronto como esté disponible. Si no puede actualizar a la última versión, actualice su agente a una versión que no tenga más de 90 días de antigüedad. Obtenga más información sobre cómo mantener al agente actualizado.
Consulte la política de fin de vida del agente Ruby New Relic para obtener información sobre los lanzamientos del agente y las fechas de soporte.
versión 9.24.0
característica: Recordatorio de desuso para SqlSampler#notice_sql API
El método
NewRelic::Agent::SqlSampler#notice_sqlestá obsoleto y se eliminará en una futura versión principal. En su lugar, el usuario debería llamar aNewRelic::Agent::Datastores.notice_sql. PR#3345característica: Aviso de desuso para el segundo y tercer argumento en Datastores.notice_sql API
El segundo (
scoped_metric) y tercer (elapsed) argumento del métodoNewRelic::Agent::Datastores.notice_sqlestán obsoletos. Hace tiempo que no se emplean con este método. En cambio, estos valores se establecerán en función del segmento actual cuando se llame a la API. PR#3345característica: Aviso de desuso para el segundo argumento en Datastores.notice_statement API
El segundo argumento (
elapsed) en el métodoNewRelic::Agent::Datastores.notice_statementestá obsoleto. Hace tiempo que no se emplea este método. En cambio, este valor se establecerá en función del segmento actual cuando se llama a la API. PR#3346característica: Aviso de desuso para el segundo y tercer argumento de proc en APIDatastores.wrap
El método
NewRelic::Agent::Datastores.wrapestá cambiando. En una futura versión principal, proc solo aceptará un único argumento, el resultado del rendimiento. El nombre de la métrica con alcance y los argumentos transcurridos se eliminarán, ya que se eliminan del métodoDatastores.notice_sql. El nombre de la métrica con alcance y los valores transcurridos se derivan del segmento actual cuando se realiza el ajuste. PR#3346
Importante
Recomendamos actualizar a la última versión del agente tan pronto como esté disponible. Si no puede actualizar a la última versión, actualice su agente a una versión que no tenga más de 90 días de antigüedad. Obtenga más información sobre cómo mantener al agente actualizado.
Consulte la política de fin de vida del agente Ruby New Relic para obtener información sobre los lanzamientos del agente y las fechas de soporte.
v9.23.0
característica: Agregar sidekiq.ignore_retry_errors opción de configuración
Se agregó una nueva opción de configuración,
sidekiq.ignore_retry_errors, para controlar si se capturan los reintentos de trabajo de Sidekiq. Los errores de reintento se capturan de forma predeterminada, pero ahora sisidekiq.ignore_retry_errorsse establece entrue, el agente ignorará las excepciones generadas durante los intentos de reintento de Sidekiq y solo informará el error si el trabajo falla permanentemente. Gracias DonGiulio por reconocer esta mejora y aportar una solución. PR#3317característica: Aviso de obsolescencia para la grabación de despliegue mediante Capistrano
El envío de información de despliegue de aplicaciones mediante una receta de Capistrano está obsoleto y se eliminará en la versión 10.0.0 del agente. Para el registro de despliegue, consulte nuestra guía de seguimiento de cambios para obtener una lista de las opciones disponibles.
característica: Emplee la configuración de ejemplificación principal remota para tomar decisiones en más escenarios
Anteriormente, las opciones de configuración
distributed_tracing.sampler.remote_parent_sampledydistributed_tracing.sampler.remote_parent_not_sampledse empleaban para la decisión de ejemplificación sola cuando estaban presentes los encabezadostraceparentytracestate. Ahora, estas opciones de configuración se aplican en los casos en que falta el encabezadotracestatey cuando solo está disponible el encabezadonewrelic. Este cambio hace que la ejemplificación de latitud distribuida sea más consistente y previsible. PR#3306
Importante
Recomendamos actualizar a la última versión del agente tan pronto como esté disponible. Si no puede actualizar a la última versión, actualice su agente a una versión que no tenga más de 90 días de antigüedad. Obtenga más información sobre cómo mantener al agente actualizado.
Consulte la política de fin de vida del agente Ruby New Relic para obtener información sobre los lanzamientos del agente y las fechas de soporte.
versión 9.22.0
característica: Instrumentación en un solo paso para Kubernetes
El APM Kubernetes implementa automáticamente la conexión automática de la aplicación y gestiona las actualizaciones del agente dentro del despliegue Kubernetes. Esta función salió de la vista previa y ahora está disponible de forma general. Obtenga más información sobre la conexión automática de Kubernetes. PR#2635 PR#3287
Característica: Aviso de desuso para Ruby 2.4 y Ruby 2.5
La compatibilidad del agente Ruby con las versiones Ruby 2.4 y 2.5 está obsoleta y se eliminará en la versión 10.0.0 del agente. La nueva versión mínima requerida de Ruby será Ruby 2.6 y dejaremos de realizar pruebas con Ruby 2.4 y 2.5. PR#3288
Característica: Aviso de desuso del comando
newrelic deploymentsLa compatibilidad para grabar la implementación mediante el comando
newrelic deploymentsahora está obsoleta y se eliminará en la versión 10.0.0 del agente.En el futuro, habrá varias formas automatizadas y manuales de registrar cambios en New Relic. Consulte nuestra guía de seguimiento de cambios para obtener una lista de las opciones disponibles. PR#3262
Característica: Recordatorio de obsolescencia para el seguimiento de múltiples aplicaciones
El seguimiento de múltiples aplicaciones quedó obsoleto desde la versión principal 8.0.0 del agente Ruby. Eliminaremos el soporte para este producto por completo en la versión 10.0.0 del agente. PR#3288
Característica: Garantizar la compatibilidad con Ruby 3.5 cambiar al método#source_location
Se actualizó el agente para analizar correctamente el valor de retorno del método #source_location, que está cambiando en Ruby 3.5 de una matriz de dos elementos a una matriz de cinco elementos. Este cambio mantiene el soporte para versiones anteriores de Ruby y al mismo tiempo agrega soporte para la versión futura. PR#3257
Importante
Recomendamos actualizar a la última versión del agente tan pronto como esté disponible. Si no puede actualizar a la última versión, actualice su agente a una versión que no tenga más de 90 días de antigüedad. Obtenga más información sobre cómo mantener al agente actualizado.
Consulte la New Relic Ruby política de fin de vida del agente para obtener información sobre los lanzamientos del agente y las fechas de soporte.
v9.21.0
Característica: En modo Serverless APM, use el nombre de la fuente del evento como prefijo del nombre de la transacción
El agente ahora empleará el nombre de origen del evento como prefijo para el nombre de la transacción en el modo APM Serverless. Esto ayudará a identificar mejor la fuente de la transacción en la UI New Relic. PR#3245
Bugfix: revertir la lógica modificada sobre cómo rastreamos el hilo en el que comienza el lapso
Este cambio restaura el comportamiento anterior de seguimiento del hilo en el que comienza el lapso, solucionando los problemas que surgieron de la lógica actualizada. Gracias @david-zw-liu por informarnos sobre esto. PR#3248
Importante
We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.
See the New Relic Ruby agent EOL policy for information about agent releases and support dates.
v9.20.0
Feature: Add ECS Docker ID for Fargate
Previously, the Ruby agent did not record the Docker ID when running in an AWS ECS Fargate environment. The Docker ID will now be recorded correctly. PR#3172
Feature: Add NewRelic::Helper.version_satisfied?
The agent has a new helper method to simplify version comparison.
NewRelic::Helper.version_satisfied?accepts three arguments: a left-side version number, the comparison operator as a string, and a right-side version number. Our thanks go to @kekke-n for this contribution. PR#3182Feature: Add code.stacktrace attribute on datastore spans when duration exceeds configured threshold
The agent will now add the
code.stacktraceattribute to datastore spans when the duration exceeds the configured threshold. The threshold is configured using thetransaction_tracer.stack_trace_thresholdconfiguration option. PR#3220Feature: Consolidate "Unknown" constant values
All references to the various capitalization styles for "Unknown" have been consolidated into two constants:
NewRelic::UNKNOWNandNewRelic::UNKNOWN_LOWER. Thank you, @tsubasa1122, for your contribution! PR#3185Bugfix: Fix Brewfile source links
Previously, the multiverse README's links to the Brewfile were broken. Our thanks go to @emmanuel-ferdman for submitting a PR to fix them! PR#3191
Bugfix: Fix error when using HTTPX 1.5.0
The agent previously encountered an error when using the new HTTPX version 1.5.0. This was due to a change in the way HTTPX stores the response. The agent has been updated to handle this change correctly, and no longer encounters an error when using HTTPX 1.5.0. PR#3203
Bugfix: Bugfixes and improvements to debug level agent logs
Improves the information logged at the debug level by the agent when the agent reads in a configuration source. PR#3221
Bugfix: Fix risk of server-side forgery for Slack workflow script
Internally, we keep track of gems that are released using a GitHub actions workflow that posts updates on Slack. [@odaysec] identified a way we could reduce the risk of server-side forgery for this workflow. Thank you! PR#3184
Bugfix: Replace JSON.load calls with JSON.parse
Generally, JSON.parse is seen as safer than JSON.load. Thank you, @odaysec, for bringing this to our attention! PR#3183 PR#3230