---
title: Ruby agent other settings
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration-other-settings
---

Configure miscellaneous Ruby agent settings including transaction events, audit log, autostart behavior, cloud integration, instrumentation controls, security agent, serverless mode, Sidekiq, and utilization detection.

## Transaction Events [#transaction-events]

**transaction_events.enabled**

| TypeBoolean                                          |
| ---------------------------------------------------- |
| Defaulttrue                                          |
| Environ variableNEW_RELIC_TRANSACTION_EVENTS_ENABLED |

If `true`, enables transaction event sampling.

**transaction_events.max_samples_stored**

| TypeInteger                                                     |
| --------------------------------------------------------------- |
| Default1200                                                     |
| Environ variableNEW_RELIC_TRANSACTION_EVENTS_MAX_SAMPLES_STORED |

Defines the maximum number of transaction events reported from a single harvest.

## Audit Log [#audit-log]

**audit_log.enabled**

| TypeBoolean                                 |
| ------------------------------------------- |
| Defaultfalse                                |
| Environ variableNEW_RELIC_AUDIT_LOG_ENABLED |

If `true`, enables an audit log which logs communications with the New Relic [collector](https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector).

**audit_log.endpoints**

| TypeArray                                     |
| --------------------------------------------- |
| Default\[".\*"]                               |
| Environ variableNEW_RELIC_AUDIT_LOG_ENDPOINTS |

List of allowed endpoints to include in the audit log.

**audit_log.path**

| TypeString                               |
| ---------------------------------------- |
| Defaultlog/newrelic_audit.log            |
| Environ variableNEW_RELIC_AUDIT_LOG_PATH |

Specifies a path to the audit log file (including the filename).

## Autostart [#autostart]

**autostart.denylisted_constants**

| TypeString                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Default"Rails::Command::ConsoleCommand,Rails::Command::CredentialsCommand,Rails::Command::Db::System::ChangeCommand,Rails::Command::DbConsoleCommand,Rails::Command::DestroyCommand,Rails::Command::DevCommand,Rails::Command::EncryptedCommand,Rails::Command::GenerateCommand,Rails::Command::InitializersCommand,Rails::Command::NotesCommand,Rails::Command::RoutesCommand,Rails::Command::RunnerCommand,Rails::Command::SecretsCommand,Rails::Command::TestCommand,Rails::Console,Rails::DBConsole" |
| Environ variableNEW_RELIC_AUTOSTART_DENYLISTED_CONSTANTS                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

Specify a list of constants that should prevent the agent from starting automatically. Separate individual constants with a comma `,`. For example, `"Rails::Console,UninstrumentedBackgroundJob"`.

**autostart.denylisted_executables**

| TypeString                                                 |
| ---------------------------------------------------------- |
| Default"irb,rspec"                                         |
| Environ variableNEW_RELIC_AUTOSTART_DENYLISTED_EXECUTABLES |

Defines a comma-delimited list of executables that the agent should not instrument. For example, `"rake,my_ruby_script.rb"`.

**autostart.denylisted_rake_tasks**

| TypeString                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Default"about,assets:clean,assets:clobber,assets:environment,assets:precompile,assets:precompile:all,db:create,db:drop,db:fixtures:load,db:migrate,db:migrate:status,db:rollback,db:schema:cache:clear,db:schema:cache:dump,db:schema:dump,db:schema:load,db:seed,db:setup,db:structure:dump,db:version,doc:app,log:clear,middleware,notes,notes:custom,rails:template,rails:update,routes,secret,spec,spec:features,spec:requests,spec:controllers,spec:helpers,spec:models,spec:views,spec:routing,spec:rcov,stats,test,test:all,test:all:db,test:recent,test:single,test:uncommitted,time:zones:all,tmp:clear,tmp:create,webpacker:compile" |
| Environ variableNEW_RELIC_AUTOSTART_DENYLISTED_RAKE_TASKS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

Defines a comma-delimited list of Rake tasks that the agent should not instrument. For example, `"assets:precompile,db:migrate"`.

## Cloud [#cloud]

**cloud.aws.account_id**

| TypeString                                     |
| ---------------------------------------------- |
| Defaultnil                                     |
| Environ variableNEW_RELIC_CLOUD_AWS_ACCOUNT_ID |

The AWS account ID associated with this application.

## Code Level Metrics [#code-level-metrics]

**code_level_metrics.enabled**

| TypeBoolean                                          |
| ---------------------------------------------------- |
| Defaulttrue                                          |
| Environ variableNEW_RELIC_CODE_LEVEL_METRICS_ENABLED |

If `true`, the agent will report source code level metrics for traced methods.
See: <https://docs.newrelic.com/docs/apm/agents/ruby-agent/features/ruby-codestream-integration/>

## Custom Attributes [#custom-attributes]

**custom_attributes.enabled**

| TypeBoolean                                         |
| --------------------------------------------------- |
| Defaulttrue                                         |
| Environ variableNEW_RELIC_CUSTOM_ATTRIBUTES_ENABLED |

If `false`, custom attributes will not be sent on events.

## Custom Events [#custom-events]

**custom_insights_events.enabled**

| TypeBoolean                                              |
| -------------------------------------------------------- |
| Defaulttrue                                              |
| Environ variableNEW_RELIC_CUSTOM_INSIGHTS_EVENTS_ENABLED |

If `true`, the agent captures [custom events](https://docs.newrelic.com/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-apm-agents).

**custom_insights_events.max_samples_stored**

| TypeInteger                                                         |
| ------------------------------------------------------------------- |
| Default3000                                                         |
| Environ variableNEW_RELIC_CUSTOM_INSIGHTS_EVENTS_MAX_SAMPLES_STORED |

Specify a maximum number of custom events to buffer in memory at a time. When configuring the agent for [AI monitoring](https://docs.newrelic.com/docs/ai-monitoring/intro-to-ai-monitoring), set to max value `100000`. This ensures the agent captures the maximum amount of LLM events.

## Datastore Tracer [#datastore-tracer]

**datastore_tracer.database_name_reporting.enabled**

| TypeBoolean                                                                |
| -------------------------------------------------------------------------- |
| Defaulttrue                                                                |
| Environ variableNEW_RELIC_DATASTORE_TRACER_DATABASE_NAME_REPORTING_ENABLED |

If `false`, the agent will not add `database_name` parameter to transaction or slow SQL traces.

**datastore_tracer.instance_reporting.enabled**

| TypeBoolean                                                           |
| --------------------------------------------------------------------- |
| Defaulttrue                                                           |
| Environ variableNEW_RELIC_DATASTORE_TRACER_INSTANCE_REPORTING_ENABLED |

If `false`, the agent will not report datastore instance metrics, nor add `host` or `port_path_or_id` parameters to transaction or slow SQL traces.

## Disabling [#disabling]

Use these settings to toggle instrumentation types during agent startup.

**disable_action_cable_instrumentation**

| TypeBoolean                                                    |
| -------------------------------------------------------------- |
| Defaultfalse                                                   |
| Environ variableNEW_RELIC_DISABLE_ACTION_CABLE_INSTRUMENTATION |

If `true`, disables Action Cable instrumentation.

**disable_action_controller**

| TypeBoolean                                         |
| --------------------------------------------------- |
| Defaultfalse                                        |
| Environ variableNEW_RELIC_DISABLE_ACTION_CONTROLLER |

If `true`, disables Action Controller instrumentation.

**disable_action_mailbox**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaultfalse                                     |
| Environ variableNEW_RELIC_DISABLE_ACTION_MAILBOX |

If `true`, disables Action Mailbox instrumentation.

**disable_action_mailer**

| TypeBoolean                                     |
| ----------------------------------------------- |
| Defaultfalse                                    |
| Environ variableNEW_RELIC_DISABLE_ACTION_MAILER |

If `true`, disables Action Mailer instrumentation.

**disable_activejob**

| TypeBoolean                                 |
| ------------------------------------------- |
| Defaultfalse                                |
| Environ variableNEW_RELIC_DISABLE_ACTIVEJOB |

If `true`, disables Active Job instrumentation.

**disable_active_job_step_names**

| TypeBoolean                                             |
| ------------------------------------------------------- |
| Defaultfalse                                            |
| Environ variableNEW_RELIC_DISABLE_ACTIVE_JOB_STEP_NAMES |

If `true`, step names from Rails Active Job Continuations will not be included in metric names. This reduces metric cardinality but also reduces visibility into individual step performance. Only set this to `true` if you are experiencing metric cardinality issues due to jobs with many steps or dynamically-named steps.

**disable_active_storage**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaultfalse                                     |
| Environ variableNEW_RELIC_DISABLE_ACTIVE_STORAGE |

If `true`, disables Active Storage instrumentation.

**disable_active_support**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaultfalse                                     |
| Environ variableNEW_RELIC_DISABLE_ACTIVE_SUPPORT |

If `true`, disables Active Support instrumentation.

**disable_active_record_instrumentation**

| TypeBoolean                                                     |
| --------------------------------------------------------------- |
| Defaultfalse                                                    |
| Environ variableNEW_RELIC_DISABLE_ACTIVE_RECORD_INSTRUMENTATION |

If `true`, disables Active Record instrumentation.

**disable_active_record_notifications**

| TypeBoolean                                                   |
| ------------------------------------------------------------- |
| Defaultfalse                                                  |
| Environ variableNEW_RELIC_DISABLE_ACTIVE_RECORD_NOTIFICATIONS |

If `true`, disables instrumentation for Active Record 4+.

**disable_cpu_sampler**

| TypeBoolean                                   |
| --------------------------------------------- |
| Defaultfalse                                  |
| Environ variableNEW_RELIC_DISABLE_CPU_SAMPLER |

If `true`, the agent won't sample the CPU usage of the host process.

**disable_delayed_job_sampler**

| TypeBoolean                                           |
| ----------------------------------------------------- |
| Defaultfalse                                          |
| Environ variableNEW_RELIC_DISABLE_DELAYED_JOB_SAMPLER |

If `true`, the agent won't measure the depth of Delayed Job queues.

**disable_gc_profiler**

| TypeBoolean                                   |
| --------------------------------------------- |
| Defaultfalse                                  |
| Environ variableNEW_RELIC_DISABLE_GC_PROFILER |

If `true`, disables the use of `GC::Profiler` to measure time spent in garbage collection.

**disable_memory_sampler**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaultfalse                                     |
| Environ variableNEW_RELIC_DISABLE_MEMORY_SAMPLER |

If `true`, the agent won't sample the memory usage of the host process.

**disable_middleware_instrumentation**

| TypeBoolean                                                  |
| ------------------------------------------------------------ |
| Defaultfalse                                                 |
| Environ variableNEW_RELIC_DISABLE_MIDDLEWARE_INSTRUMENTATION |

If `true`, the agent won't wrap third-party middlewares in instrumentation (regardless of whether they are installed via `Rack::Builder` or Rails).
When middleware instrumentation is disabled, if an application is using middleware that could alter the response code, the HTTP status code reported on the transaction may not reflect the altered value.

**disable_samplers**

| TypeBoolean                                |
| ------------------------------------------ |
| Defaultfalse                               |
| Environ variableNEW_RELIC_DISABLE_SAMPLERS |

If `true`, disables the collection of sampler metrics. Sampler metrics are metrics that are not event-based (such as CPU time or memory usage).

**disable_sequel_instrumentation**

| TypeBoolean                                              |
| -------------------------------------------------------- |
| Defaultfalse                                             |
| Environ variableNEW_RELIC_DISABLE_SEQUEL_INSTRUMENTATION |

If `true`, disables [Sequel instrumentation](https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/sequel-instrumentation).

**disable_sidekiq**

| TypeBoolean                               |
| ----------------------------------------- |
| Defaultfalse                              |
| Environ variableNEW_RELIC_DISABLE_SIDEKIQ |

If `true`, disables [Sidekiq instrumentation](https://docs.newrelic.com/docs/agents/ruby-agent/background-jobs/sidekiq-instrumentation).

**disable_roda_auto_middleware**

| TypeBoolean                                            |
| ------------------------------------------------------ |
| Defaultfalse                                           |
| Environ variableNEW_RELIC_DISABLE_RODA_AUTO_MIDDLEWARE |

If `true`, disables agent middleware for Roda. This middleware is responsible for advanced feature support such as [page load timing](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/new-relic-browser) and [error collection](https://docs.newrelic.com/docs/apm/applications-menu/events/view-apm-error-analytics).

**disable_sinatra_auto_middleware**

| TypeBoolean                                               |
| --------------------------------------------------------- |
| Defaultfalse                                              |
| Environ variableNEW_RELIC_DISABLE_SINATRA_AUTO_MIDDLEWARE |

If `true`, disables agent middleware for Sinatra. This middleware is responsible for advanced feature support such as [distributed tracing](https://docs.newrelic.com/docs/apm/distributed-tracing/getting-started/introduction-distributed-tracing), [page load timing](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/new-relic-browser), and [error collection](https://docs.newrelic.com/docs/apm/applications-menu/events/view-apm-error-analytics).

**disable_view_instrumentation**

| TypeBoolean                                            |
| ------------------------------------------------------ |
| Defaultfalse                                           |
| Environ variableNEW_RELIC_DISABLE_VIEW_INSTRUMENTATION |

If `true`, disables view instrumentation.

**disable_vm_sampler**

| TypeBoolean                                  |
| -------------------------------------------- |
| Defaultfalse                                 |
| Environ variableNEW_RELIC_DISABLE_VM_SAMPLER |

If `true`, the agent won't [sample performance measurements from the Ruby VM](https://docs.newrelic.com/docs/agents/ruby-agent/features/ruby-vm-measurements).

**disable_puma_instrumentation**

| TypeBoolean                                            |
| ------------------------------------------------------ |
| Defaulttrue                                            |
| Environ variableNEW_RELIC_DISABLE_PUMA_INSTRUMENTATION |

If `true`, disables the Puma server-statistics instrumentation that samples `Ruby/Puma/*` metrics from the Puma master process. This instrumentation is disabled by default. When enabled, the agent starts a reporting thread in the Puma master process to deliver these metrics.

## Elasticsearch [#elasticsearch]

**elasticsearch.capture_cluster_name**

| TypeBoolean                                                  |
| ------------------------------------------------------------ |
| Defaulttrue                                                  |
| Environ variableNEW_RELIC_ELASTICSEARCH_CAPTURE_CLUSTER_NAME |

If `true`, the agent captures the Elasticsearch cluster name in transaction traces.

**elasticsearch.capture_queries**

| TypeBoolean                                             |
| ------------------------------------------------------- |
| Defaulttrue                                             |
| Environ variableNEW_RELIC_ELASTICSEARCH_CAPTURE_QUERIES |

If `true`, the agent captures Elasticsearch queries in transaction traces.

**elasticsearch.obfuscate_queries**

| TypeBoolean                                               |
| --------------------------------------------------------- |
| Defaulttrue                                               |
| Environ variableNEW_RELIC_ELASTICSEARCH_OBFUSCATE_QUERIES |

If `true`, the agent obfuscates Elasticsearch queries in transaction traces.

## Heroku [#heroku]

**heroku.use_dyno_names**

| TypeBoolean                                     |
| ----------------------------------------------- |
| Defaulttrue                                     |
| Environ variableNEW_RELIC_HEROKU_USE_DYNO_NAMES |

If `true`, the agent uses Heroku dyno names as the hostname.

**heroku.dyno_name_prefixes_to_shorten**

| TypeArray                                                      |
| -------------------------------------------------------------- |
| Default\["scheduler", "run"]                                   |
| Environ variableNEW_RELIC_HEROKU_DYNO_NAME_PREFIXES_TO_SHORTEN |

Ordinarily the agent reports dyno names with a trailing dot and process ID (for example, `worker.3`). You can remove this trailing data by specifying the prefixes you want to report without trailing data (for example, `worker`).

## Instrumentation [#instrumentation]

**instrumentation.active_support_notifications.active_support_events**

| TypeArray                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Default\["cache_fetch_hit.active_support", "cache_generate.active_support", "cache_read.active_support", "cache_write.active_support", "cache_delete.active_support", "cache_exist?.active_support", "cache_read_multi.active_support", "cache_write_multi.active_support", "cache_delete_multi.active_support", "cache_delete_matched.active_support", "cache_cleanup.active_support", "cache_increment.active_support", "cache_decrement.active_support", "cache_prune.active_support", "message_serializer_fallback.active_support"] |
| Environ variableNEW_RELIC_INSTRUMENTATION_ACTIVE_SUPPORT_NOTIFICATIONS_ACTIVE_SUPPORT_EVENTS                                                                                                                                                                                                                                                                                                                                                                                                                                            |

An allowlist of ActiveSupport notification event names (mostly caching events and message-serializer events) that the agent subscribes to. Any event name not included here is ignored. Provide complete event names only, such as `cache_fetch_hit.active_support`. Do not provide asterisks or regex patterns, and do not escape any characters with backslashes.

For the complete list of possible event names, see the Rails documentation's list of [caching names](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#active-support-caching) and [messages names](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#active-support-messages).

**instrumentation.active_support_broadcast_logger**

| TypeString                                                                |
| ------------------------------------------------------------------------- |
| Defaultauto                                                               |
| Environ variableNEW_RELIC_INSTRUMENTATION_ACTIVE_SUPPORT_BROADCAST_LOGGER |

Controls auto-instrumentation of `ActiveSupport::BroadcastLogger` at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`. Used in Rails versions >= 7.1.

**instrumentation.active_support_logger**

| TypeString                                                      |
| --------------------------------------------------------------- |
| Defaultauto                                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_ACTIVE_SUPPORT_LOGGER |

Controls auto-instrumentation of `ActiveSupport::Logger` at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`. Used in Rails versions below 7.1.

**instrumentation.async_http**

| TypeString                                           |
| ---------------------------------------------------- |
| Defaultauto                                          |
| Environ variableNEW_RELIC_INSTRUMENTATION_ASYNC_HTTP |

Controls auto-instrumentation of Async::HTTP at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.bunny**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultauto                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_BUNNY |

Controls auto-instrumentation of bunny at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.semantic_logger**

| TypeString                                                |
| --------------------------------------------------------- |
| Defaultauto                                               |
| Environ variableNEW_RELIC_INSTRUMENTATION_SEMANTIC_LOGGER |

Controls auto-instrumentation of the semantic_logger library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.parallel**

| TypeString                                         |
| -------------------------------------------------- |
| Defaultauto                                        |
| Environ variableNEW_RELIC_INSTRUMENTATION_PARALLEL |

Controls auto-instrumentation of the parallel library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.aws_sdk_firehose**

| TypeString                                                 |
| ---------------------------------------------------------- |
| Defaultauto                                                |
| Environ variableNEW_RELIC_INSTRUMENTATION_AWS_SDK_FIREHOSE |

Controls auto-instrumentation of the aws-sdk-firehose library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.aws_sdk_lambda**

| TypeString                                               |
| -------------------------------------------------------- |
| Defaultauto                                              |
| Environ variableNEW_RELIC_INSTRUMENTATION_AWS_SDK_LAMBDA |

Controls auto-instrumentation of the aws_sdk_lambda library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.aws_sdk_kinesis**

| TypeString                                                |
| --------------------------------------------------------- |
| Defaultauto                                               |
| Environ variableNEW_RELIC_INSTRUMENTATION_AWS_SDK_KINESIS |

Controls auto-instrumentation of the aws-sdk-kinesis library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.ruby_kafka**

| TypeString                                           |
| ---------------------------------------------------- |
| Default"auto"                                        |
| Environ variableNEW_RELIC_INSTRUMENTATION_RUBY_KAFKA |

Controls auto-instrumentation of the ruby-kafka library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.opensearch**

| TypeString                                           |
| ---------------------------------------------------- |
| Defaultauto                                          |
| Environ variableNEW_RELIC_INSTRUMENTATION_OPENSEARCH |

Controls auto-instrumentation of the opensearch-ruby library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.rdkafka**

| TypeString                                        |
| ------------------------------------------------- |
| Default"auto"                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_RDKAFKA |

Controls auto-instrumentation of the rdkafka library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.aws_sqs**

| TypeString                                        |
| ------------------------------------------------- |
| Default"auto"                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_AWS_SQS |

Controls auto-instrumentation of the aws-sdk-sqs library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.dynamodb**

| TypeString                                         |
| -------------------------------------------------- |
| Defaultauto                                        |
| Environ variableNEW_RELIC_INSTRUMENTATION_DYNAMODB |

Controls auto-instrumentation of the aws-sdk-dynamodb library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.fiber**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultauto                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_FIBER |

Controls auto-instrumentation of the Fiber class at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.concurrent_ruby**

| TypeString                                                |
| --------------------------------------------------------- |
| Defaultauto                                               |
| Environ variableNEW_RELIC_INSTRUMENTATION_CONCURRENT_RUBY |

Controls auto-instrumentation of the concurrent-ruby library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.curb**

| TypeString                                     |
| ---------------------------------------------- |
| Defaultauto                                    |
| Environ variableNEW_RELIC_INSTRUMENTATION_CURB |

Controls auto-instrumentation of Curb at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.delayed_job**

| TypeString                                            |
| ----------------------------------------------------- |
| Defaultauto                                           |
| Environ variableNEW_RELIC_INSTRUMENTATION_DELAYED_JOB |

Controls auto-instrumentation of Delayed Job at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.elasticsearch**

| TypeString                                              |
| ------------------------------------------------------- |
| Defaultauto                                             |
| Environ variableNEW_RELIC_INSTRUMENTATION_ELASTICSEARCH |

Controls auto-instrumentation of the elasticsearch library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.ethon**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultauto                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_ETHON |

Controls auto-instrumentation of ethon at start up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.excon**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultenabled                                  |
| Environ variableNEW_RELIC_INSTRUMENTATION_EXCON |

Controls auto-instrumentation of Excon at start-up. May be one of: `enabled`, `disabled`.

**instrumentation.grape**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultauto                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_GRAPE |

Controls auto-instrumentation of Grape at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.grpc_client**

| TypeString                                            |
| ----------------------------------------------------- |
| Defaultauto                                           |
| Environ variableNEW_RELIC_INSTRUMENTATION_GRPC_CLIENT |

Controls auto-instrumentation of gRPC clients at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.grpc.host_denylist**

| TypeArray                                                    |
| ------------------------------------------------------------ |
| Default\[]                                                   |
| Environ variableNEW_RELIC_INSTRUMENTATION_GRPC_HOST_DENYLIST |

A comma-separated list of regular expression patterns matching gRPC hostnames whose traffic New Relic should ignore. New Relic's gRPC client instrumentation skips tracing calls made to a host matching any of these patterns, and its gRPC server instrumentation skips tracing requests received by a server running on a matching host. For example, `"private.com$,exception.*" Empty by default, meaning no traffic is ignored.`.

**instrumentation.grpc_server**

| TypeString                                            |
| ----------------------------------------------------- |
| Defaultauto                                           |
| Environ variableNEW_RELIC_INSTRUMENTATION_GRPC_SERVER |

Controls auto-instrumentation of gRPC servers at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.httpclient**

| TypeString                                           |
| ---------------------------------------------------- |
| Defaultauto                                          |
| Environ variableNEW_RELIC_INSTRUMENTATION_HTTPCLIENT |

Controls auto-instrumentation of HTTPClient at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.httprb**

| TypeString                                       |
| ------------------------------------------------ |
| Defaultauto                                      |
| Environ variableNEW_RELIC_INSTRUMENTATION_HTTPRB |

Controls auto-instrumentation of http.rb gem at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.httpx**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultauto                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_HTTPX |

Controls auto-instrumentation of httpx at start up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.logger**

| TypeString                                       |
| ------------------------------------------------ |
| Defaultauto                                      |
| Environ variableNEW_RELIC_INSTRUMENTATION_LOGGER |

Controls auto-instrumentation of Ruby standard library Logger at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.logging**

| TypeString                                        |
| ------------------------------------------------- |
| Defaultauto                                       |
| Environ variableNEW_RELIC_INSTRUMENTATION_LOGGING |

Controls auto-instrumentation of the logging library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.logstasher**

| TypeString                                           |
| ---------------------------------------------------- |
| Defaultauto                                          |
| Environ variableNEW_RELIC_INSTRUMENTATION_LOGSTASHER |

Controls auto-instrumentation of the LogStasher library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.rails_event_logger**

| TypeString                                                   |
| ------------------------------------------------------------ |
| Defaultenabled                                               |
| Environ variableNEW_RELIC_INSTRUMENTATION_RAILS_EVENT_LOGGER |

Controls instrumentation of Rails.event as structured logs. May be one of: `enabled`, `disabled`.

**instrumentation.rails_event_logger.event_names**

| TypeArray                                                                |
| ------------------------------------------------------------------------ |
| Default\[]                                                               |
| Environ variableNEW_RELIC_INSTRUMENTATION_RAILS_EVENT_LOGGER_EVENT_NAMES |

An array of `Rails.event` names to capture as structured log events. For example: [user.signup, payment.processed, order.created]. Leave empty to capture all `Rails.event` notifications. Events are logged with level `UNKNOWN` (ensuring they're never filtered) unless overridden via a `:level` key in the event payload.

**instrumentation.memcache**

| TypeString                                         |
| -------------------------------------------------- |
| Defaultauto                                        |
| Environ variableNEW_RELIC_INSTRUMENTATION_MEMCACHE |

Controls auto-instrumentation of dalli gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.memcached**

| TypeString                                          |
| --------------------------------------------------- |
| Defaultauto                                         |
| Environ variableNEW_RELIC_INSTRUMENTATION_MEMCACHED |

Controls auto-instrumentation of memcached gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.memcache_client**

| TypeString                                                |
| --------------------------------------------------------- |
| Defaultauto                                               |
| Environ variableNEW_RELIC_INSTRUMENTATION_MEMCACHE_CLIENT |

Controls auto-instrumentation of memcache-client gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.mongo**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultenabled                                  |
| Environ variableNEW_RELIC_INSTRUMENTATION_MONGO |

Controls auto-instrumentation of Mongo at start-up. May be one of: `enabled`, `disabled`.

**instrumentation.net_http**

| TypeString                                         |
| -------------------------------------------------- |
| Defaultauto                                        |
| Environ variableNEW_RELIC_INSTRUMENTATION_NET_HTTP |

Controls auto-instrumentation of `Net::HTTP` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.ruby_openai**

| TypeString                                            |
| ----------------------------------------------------- |
| Defaultauto                                           |
| Environ variableNEW_RELIC_INSTRUMENTATION_RUBY_OPENAI |

Controls auto-instrumentation of the ruby-openai gem at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`. Defaults to `disabled` in high security mode.

**instrumentation.puma_rack**

| TypeString                                          |
| --------------------------------------------------- |
| Defaultauto                                         |
| Environ variableNEW_RELIC_INSTRUMENTATION_PUMA_RACK |

Controls auto-instrumentation of `Puma::Rack`. When enabled, the agent hooks into the `to_app` method in `Puma::Rack::Builder` to find gems to instrument during application startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.puma_rack_urlmap**

| TypeString                                                 |
| ---------------------------------------------------------- |
| Defaultauto                                                |
| Environ variableNEW_RELIC_INSTRUMENTATION_PUMA_RACK_URLMAP |

Controls auto-instrumentation of `Puma::Rack::URLMap` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.rack**

| TypeString                                     |
| ---------------------------------------------- |
| Defaultauto                                    |
| Environ variableNEW_RELIC_INSTRUMENTATION_RACK |

Controls auto-instrumentation of Rack. When enabled, the agent hooks into the `to_app` method in `Rack::Builder` to find gems to instrument during application startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.rack_urlmap**

| TypeString                                            |
| ----------------------------------------------------- |
| Defaultauto                                           |
| Environ variableNEW_RELIC_INSTRUMENTATION_RACK_URLMAP |

Controls auto-instrumentation of `Rack::URLMap` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.rake**

| TypeString                                     |
| ---------------------------------------------- |
| Defaultauto                                    |
| Environ variableNEW_RELIC_INSTRUMENTATION_RAKE |

Controls auto-instrumentation of rake at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.redis**

| TypeString                                      |
| ----------------------------------------------- |
| Defaultauto                                     |
| Environ variableNEW_RELIC_INSTRUMENTATION_REDIS |

Controls auto-instrumentation of Redis at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.resque**

| TypeString                                       |
| ------------------------------------------------ |
| Defaultauto                                      |
| Environ variableNEW_RELIC_INSTRUMENTATION_RESQUE |

Controls auto-instrumentation of resque at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.roda**

| TypeString                                     |
| ---------------------------------------------- |
| Defaultauto                                    |
| Environ variableNEW_RELIC_INSTRUMENTATION_RODA |

Controls auto-instrumentation of Roda at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.sinatra**

| TypeString                                        |
| ------------------------------------------------- |
| Defaultauto                                       |
| Environ variableNEW_RELIC_INSTRUMENTATION_SINATRA |

Controls auto-instrumentation of Sinatra at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.stripe**

| TypeString                                       |
| ------------------------------------------------ |
| Default"enabled"                                 |
| Environ variableNEW_RELIC_INSTRUMENTATION_STRIPE |

Controls auto-instrumentation of Stripe at startup. May be one of: `enabled`, `disabled`.

**instrumentation.view_component**

| TypeString                                               |
| -------------------------------------------------------- |
| Defaultauto                                              |
| Environ variableNEW_RELIC_INSTRUMENTATION_VIEW_COMPONENT |

Controls auto-instrumentation of ViewComponent at startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.thread**

| TypeString                                       |
| ------------------------------------------------ |
| Defaultauto                                      |
| Environ variableNEW_RELIC_INSTRUMENTATION_THREAD |

Controls auto-instrumentation of the Thread class at start-up to allow the agent to correctly nest spans inside of an asynchronous transaction. This does not enable the agent to automatically trace all threads created (see `instrumentation.thread.tracing`). May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.thread.tracing**

| TypeBoolean                                              |
| -------------------------------------------------------- |
| Defaulttrue                                              |
| Environ variableNEW_RELIC_INSTRUMENTATION_THREAD_TRACING |

Controls auto-instrumentation of the Thread class at start-up to automatically add tracing to all Threads created in the application.

**instrumentation.tilt**

| TypeString                                     |
| ---------------------------------------------- |
| Defaultauto                                    |
| Environ variableNEW_RELIC_INSTRUMENTATION_TILT |

Controls auto-instrumentation of the Tilt template rendering library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

**instrumentation.typhoeus**

| TypeString                                         |
| -------------------------------------------------- |
| Defaultauto                                        |
| Environ variableNEW_RELIC_INSTRUMENTATION_TYPHOEUS |

Controls auto-instrumentation of Typhoeus at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.

## Message Tracer [#message-tracer]

**message_tracer.segment_parameters.enabled**

| TypeBoolean                                                         |
| ------------------------------------------------------------------- |
| Defaulttrue                                                         |
| Environ variableNEW_RELIC_MESSAGE_TRACER_SEGMENT_PARAMETERS_ENABLED |

If `true`, the agent will collect metadata about messages and attach them as segment parameters.

## Mongo [#mongo]

**mongo.capture_queries**

| TypeBoolean                                     |
| ----------------------------------------------- |
| Defaulttrue                                     |
| Environ variableNEW_RELIC_MONGO_CAPTURE_QUERIES |

If `true`, the agent captures Mongo queries in transaction traces.

**mongo.obfuscate_queries**

| TypeBoolean                                       |
| ------------------------------------------------- |
| Defaulttrue                                       |
| Environ variableNEW_RELIC_MONGO_OBFUSCATE_QUERIES |

If `true`, the agent obfuscates Mongo queries in transaction traces.

## Opensearch [#opensearch]

**opensearch.capture_queries**

| TypeBoolean                                          |
| ---------------------------------------------------- |
| Defaulttrue                                          |
| Environ variableNEW_RELIC_OPENSEARCH_CAPTURE_QUERIES |

If `true`, the agent captures OpenSearch queries in transaction traces.

**opensearch.obfuscate_queries**

| TypeBoolean                                            |
| ------------------------------------------------------ |
| Defaulttrue                                            |
| Environ variableNEW_RELIC_OPENSEARCH_OBFUSCATE_QUERIES |

If `true`, the agent obfuscates OpenSearch queries in transaction traces.

## OpenTelemetry [#opentelemetry]

**opentelemetry.enabled**

| TypeBoolean                                     |
| ----------------------------------------------- |
| Defaultfalse                                    |
| Environ variableNEW_RELIC_OPENTELEMETRY_ENABLED |

A global configuration option for disabling all OpenTelemetry signals sent through New Relic. If `false`, no OpenTelemetry signals will be sent to New Relic. If `true`, the signal-specific enabled config option (e.g. opentelemetry.traces.enabled) determines whether telemetry of that signal type will be reported to New Relic.

**opentelemetry.traces.enabled**

| TypeBoolean                                            |
| ------------------------------------------------------ |
| Defaulttrue                                            |
| Environ variableNEW_RELIC_OPENTELEMETRY_TRACES_ENABLED |

Enables the creation of Transaction Trace segments and timeslice metrics from OpenTelemetry Spans. This will help drive New Relic UI experience for OpenTelemetry spans.

**opentelemetry.traces.include**

| TypeString                                             |
| ------------------------------------------------------ |
| Default""                                              |
| Environ variableNEW_RELIC_OPENTELEMETRY_TRACES_INCLUDE |

A comma-delimited list of OpenTelemetry Tracers, represented as a string (e.g. "AppTracer1,OpenTelemetry::Instrumentation::Bunny::Instrumentation"), that **will** have their traces sent to New Relic.

**opentelemetry.traces.exclude**

| TypeString                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Defaultelasticsearch-api,dalli,OpenTelemetry::Instrumentation::ActionMailer::Instrumentation,OpenTelemetry::Instrumentation::ActionPack::Instrumentation,OpenTelemetry::Instrumentation::ActionView::Instrumentation,OpenTelemetry::Instrumentation::ActiveJob::Instrumentation,OpenTelemetry::Instrumentation::ActiveRecord::Instrumentation,OpenTelemetry::Instrumentation::ActiveStorage::Instrumentation,OpenTelemetry::Instrumentation::ActiveSupport::Instrumentation,OpenTelemetry::Instrumentation::AwsLambda::Instrumentation,OpenTelemetry::Instrumentation::AwsSdk::Instrumentation,OpenTelemetry::Instrumentation::Bunny::Instrumentation,OpenTelemetry::Instrumentation::ConcurrentRuby::Instrumentation,OpenTelemetry::Instrumentation::Dalli::Instrumentation,OpenTelemetry::Instrumentation::Ethon::Instrumentation,OpenTelemetry::Instrumentation::Excon::Instrumentation,OpenTelemetry::Instrumentation::Grape::Instrumentation,OpenTelemetry::Instrumentation::GraphQL::Instrumentation,OpenTelemetry::Instrumentation::Grpc::Instrumentation,OpenTelemetry::Instrumentation::HTTP&#x3A;:Instrumentation,OpenTelemetry::Instrumentation::HttpClient::Instrumentation,OpenTelemetry::Instrumentation::HTTPX::Instrumentation,OpenTelemetry::Instrumentation::Logger::Instrumentation,OpenTelemetry::Instrumentation::Mongo::Instrumentation,OpenTelemetry::Instrumentation::Net::HTTP&#x3A;:Instrumentation,OpenTelemetry::Instrumentation::Rack::Instrumentation,OpenTelemetry::Instrumentation::Rails::Instrumentation,OpenTelemetry::Instrumentation::Rake::Instrumentation,OpenTelemetry::Instrumentation::Rdkafka::Instrumentation,OpenTelemetry::Instrumentation::Redis::Instrumentation,OpenTelemetry::Instrumentation::Resque::Instrumentation,OpenTelemetry::Instrumentation::RubyKafka::Instrumentation,OpenTelemetry::Instrumentation::Sidekiq::Instrumentation,OpenTelemetry::Instrumentation::Sinatra::Instrumentation |
| Environ variableNEW_RELIC_OPENTELEMETRY_TRACES_EXCLUDE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

A comma-delimited list of OpenTelemetry Tracers, represented as a string (e.g. "AppTracer1,OpenTelemetry::Instrumentation::Bunny::Instrumentation"), that will **not** have their traces sent to New Relic.

## Process Host [#process-host]

**process_host.display_name**

| TypeString                                          |
| --------------------------------------------------- |
| Default(Dynamic)                                    |
| Environ variableNEW_RELIC_PROCESS_HOST_DISPLAY_NAME |

Specify a custom hostname for [display in the New Relic UI](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/add-rename-remove-hosts#display_name).

## Profiling [#profiling]

**profiling.enabled**

| TypeBoolean                                 |
| ------------------------------------------- |
| Defaultfalse                                |
| Environ variableNEW_RELIC_PROFILING_ENABLED |

If `true`, enables continuous profiling. Requires the `stackprof` and `google-protobuf` gems to be present in the application. Not supported on JRuby. Automatically disabled when high security mode is enabled.

**profiling.delay**

| TypeInteger                               |
| ----------------------------------------- |
| Default0                                  |
| Environ variableNEW_RELIC_PROFILING_DELAY |

The delay, in milliseconds, before continuous profiling starts after being enabled. Defaults to `0`, meaning profiling starts immediately.

**profiling.duration**

| TypeInteger                                  |
| -------------------------------------------- |
| Default0                                     |
| Environ variableNEW_RELIC_PROFILING_DURATION |

The duration, in milliseconds, that continuous profiling runs before automatically stopping. Defaults to `0`, meaning profiling runs indefinitely until explicitly stopped.

**profiling.include**

| TypeString                                  |
| ------------------------------------------- |
| Default"cpu"                                |
| Environ variableNEW_RELIC_PROFILING_INCLUDE |

The `stackprof` sampling mode to use for continuous profiling: `cpu` or `object`.

**profiling.sample_period**

| TypeFloat                                         |
| ------------------------------------------------- |
| Default0.01                                       |
| Environ variableNEW_RELIC_PROFILING_SAMPLE_PERIOD |

The interval, in seconds, between stack samples taken by the continuous profiler. Only used when `profiling.include` is `cpu`. Must be between 0.000001 and 0.999999.

**profiling.object_allocation_interval**

| TypeInteger                                                    |
| -------------------------------------------------------------- |
| Default10000                                                   |
| Environ variableNEW_RELIC_PROFILING_OBJECT_ALLOCATION_INTERVAL |

The number of object allocations between stack samples taken by the continuous profiler. Only used when `profiling.include` is `object`. Must be between 1000 and 999999.

## Puma [#puma]

**puma.sample_rate**

| TypeInteger                                |
| ------------------------------------------ |
| Default60                                  |
| Environ variableNEW_RELIC_PUMA_SAMPLE_RATE |

Number of seconds between samples of Puma server statistics taken in the Puma master process.

## Rake [#rake]

**rake.tasks**

| TypeArray                            |
| ------------------------------------ |
| Default\[]                           |
| Environ variableNEW_RELIC_RAKE_TASKS |

Specify an Array of Rake tasks to automatically instrument. This configuration option converts the Array to a RegEx list. No rake tasks will be instrumented unless they're added to this list. If you'd like to allow all tasks by default, use `rake.tasks: [.+]`. For more information, visit the [New Relic Rake Instrumentation docs](https://docs.newrelic.com/docs/apm/agents/ruby-agent/background-jobs/rake-instrumentation).

**rake.connect_timeout**

| TypeInteger                                    |
| ---------------------------------------------- |
| Default10                                      |
| Environ variableNEW_RELIC_RAKE_CONNECT_TIMEOUT |

Defines the number of seconds to wait for a connection to complete before running a Rake task.

## Rules [#rules]

**rules.ignore_url_regexes**

| TypeArray                                          |
| -------------------------------------------------- |
| Default\[]                                         |
| Environ variableNEW_RELIC_RULES_IGNORE_URL_REGEXES |

Define transactions you want the agent to ignore by specifying a list of patterns matching the URIs to exclude. For more detail, see [the docs on ignoring specific transactions](https://docs.newrelic.com/docs/agents/ruby-agent/api-guides/ignoring-specific-transactions/#config-ignoring).

## Security [#security]

**security.agent.enabled**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaultfalse                                     |
| Environ variableNEW_RELIC_SECURITY_AGENT_ENABLED |

If `true`, the security agent is loaded (a Ruby 'require' is performed).

**security.enabled**

| TypeBoolean                                |
| ------------------------------------------ |
| Defaultfalse                               |
| Environ variableNEW_RELIC_SECURITY_ENABLED |

If `true`, the security agent is started (the agent runs in its event loop).

**security.mode**

| TypeString                              |
| --------------------------------------- |
| Default"IAST"                           |
| Environ variableNEW_RELIC_SECURITY_MODE |

Defines the mode for the security agent to operate in. Currently only `IAST` is supported.

**security.validator_service_url**

| TypeString                                               |
| -------------------------------------------------------- |
| Default"wss://csec.nr-data.net"                          |
| Environ variableNEW_RELIC_SECURITY_VALIDATOR_SERVICE_URL |

Defines the endpoint URL for posting security-related data.

**security.application_info.port**

| TypeInteger                                              |
| -------------------------------------------------------- |
| Defaultnil                                               |
| Environ variableNEW_RELIC_SECURITY_APPLICATION_INFO_PORT |

The port the application is listening on. This setting is mandatory for Passenger servers. The agent detects other servers by default.

**security.exclude_from_iast_scan.api**

| TypeArray                                                     |
| ------------------------------------------------------------- |
| Default\[]                                                    |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_API |

Defines API paths the security agent should ignore in IAST scans. Accepts an array of regex patterns matching the URI to ignore. The regex pattern should find a complete match for the URL without the endpoint. For example, `[".*account.*"], [".*/\api\/v1\/.*?\/login"]`

**security.exclude_from_iast_scan.http_request_parameters.header**

| TypeArray                                                                                |
| ---------------------------------------------------------------------------------------- |
| Default\[]                                                                               |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_HTTP_REQUEST_PARAMETERS_HEADER |

An array of HTTP request headers the security agent should ignore in IAST scans. The array should specify a list of patterns matching the headers to ignore.

**security.exclude_from_iast_scan.http_request_parameters.query**

| TypeArray                                                                               |
| --------------------------------------------------------------------------------------- |
| Default\[]                                                                              |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_HTTP_REQUEST_PARAMETERS_QUERY |

An array of HTTP request query parameters the security agent should ignore in IAST scans. The array should specify a list of patterns matching the HTTP request query parameters to ignore.

**security.exclude_from_iast_scan.http_request_parameters.body**

| TypeArray                                                                              |
| -------------------------------------------------------------------------------------- |
| Default\[]                                                                             |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_HTTP_REQUEST_PARAMETERS_BODY |

An array of HTTP request body keys the security agent should ignore in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.insecure_settings**

| TypeBoolean                                                                                         |
| --------------------------------------------------------------------------------------------------- |
| Defaultfalse                                                                                        |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_INSECURE_SETTINGS |

If `true`, disables the detection of low-severity insecure settings. For example, hash, crypto, cookie, random generators, and trust boundary.

**security.exclude_from_iast_scan.iast_detection_category.invalid_file_access**

| TypeBoolean                                                                                           |
| ----------------------------------------------------------------------------------------------------- |
| Defaultfalse                                                                                          |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_INVALID_FILE_ACCESS |

If `true`, disables file operation-related IAST detections (File Access & Application integrity violation)

**security.exclude_from_iast_scan.iast_detection_category.sql_injection**

| TypeBoolean                                                                                     |
| ----------------------------------------------------------------------------------------------- |
| Defaultfalse                                                                                    |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_SQL_INJECTION |

If `true`, disables SQL injection detection in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.nosql_injection**

| TypeBoolean                                                                                       |
| ------------------------------------------------------------------------------------------------- |
| Defaultfalse                                                                                      |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_NOSQL_INJECTION |

If `true`, disables NoSQL injection detection in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.ldap_injection**

| TypeBoolean                                                                                      |
| ------------------------------------------------------------------------------------------------ |
| Defaultfalse                                                                                     |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_LDAP_INJECTION |

If `true`, disables LDAP injection detection in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.javascript_injection**

| TypeBoolean                                                                                            |
| ------------------------------------------------------------------------------------------------------ |
| Defaultfalse                                                                                           |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_JAVASCRIPT_INJECTION |

If `true`, disables JavaScript injection detection in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.command_injection**

| TypeBoolean                                                                                         |
| --------------------------------------------------------------------------------------------------- |
| Defaultfalse                                                                                        |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_COMMAND_INJECTION |

If `true`, disables system command injection detection in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.xpath_injection**

| TypeBoolean                                                                                       |
| ------------------------------------------------------------------------------------------------- |
| Defaultfalse                                                                                      |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_XPATH_INJECTION |

If `true`, disables XPath injection detection in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.ssrf**

| TypeBoolean                                                                            |
| -------------------------------------------------------------------------------------- |
| Defaultfalse                                                                           |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_SSRF |

If `true`, disables Server-Side Request Forgery (SSRF) detection in IAST scans.

**security.exclude_from_iast_scan.iast_detection_category.rxss**

| TypeBoolean                                                                            |
| -------------------------------------------------------------------------------------- |
| Defaultfalse                                                                           |
| Environ variableNEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_RXSS |

If `true`, disables Reflected Cross-Site Scripting (RXSS) detection in IAST scans.

**security.scan_schedule.delay**

| TypeInteger                                            |
| ------------------------------------------------------ |
| Default0                                               |
| Environ variableNEW_RELIC_SECURITY_SCAN_SCHEDULE_DELAY |

Specifies the delay time (in minutes) before the IAST scan begins after the application starts.

**security.scan_schedule.duration**

| TypeInteger                                               |
| --------------------------------------------------------- |
| Default0                                                  |
| Environ variableNEW_RELIC_SECURITY_SCAN_SCHEDULE_DURATION |

Specifies the duration (in minutes) for which the IAST scan is performed.

**security.scan_schedule.schedule**

| TypeString                                                |
| --------------------------------------------------------- |
| Default""                                                 |
| Environ variableNEW_RELIC_SECURITY_SCAN_SCHEDULE_SCHEDULE |

Specifies a cron expression that sets when the IAST scan should run.

**security.scan_schedule.always_sample_traces**

| TypeBoolean                                                           |
| --------------------------------------------------------------------- |
| Defaultfalse                                                          |
| Environ variableNEW_RELIC_SECURITY_SCAN_SCHEDULE_ALWAYS_SAMPLE_TRACES |

If `true`, allows IAST to continuously gather trace data in the background. The security agent uses collected data to perform an IAST scan at the scheduled time.

**security.scan_controllers.iast_scan_request_rate_limit**

| TypeInteger                                                                      |
| -------------------------------------------------------------------------------- |
| Default3600                                                                      |
| Environ variableNEW_RELIC_SECURITY_SCAN_CONTROLLERS_IAST_SCAN_REQUEST_RATE_LIMIT |

Sets the maximum number of HTTP requests allowed per minute for the IAST scan. Must be an integer between 12 and 3600 (default).

**security.scan_controllers.scan_instance_count**

| TypeInteger                                                             |
| ----------------------------------------------------------------------- |
| Default0                                                                |
| Environ variableNEW_RELIC_SECURITY_SCAN_CONTROLLERS_SCAN_INSTANCE_COUNT |

The number of application instances for a specific entity to perform IAST analysis on.

**security.scan_controllers.report_http_response_body**

| TypeBoolean                                                                   |
| ----------------------------------------------------------------------------- |
| Defaulttrue                                                                   |
| Environ variableNEW_RELIC_SECURITY_SCAN_CONTROLLERS_REPORT_HTTP_RESPONSE_BODY |

If `true`, enables the sending of HTTP responses bodies. Disabling this also disables Reflected Cross-Site Scripting (RXSS) vulnerability detection.

**security.iast_test_identifier**

| TypeString                                              |
| ------------------------------------------------------- |
| Defaultnil                                              |
| Environ variableNEW_RELIC_SECURITY_IAST_TEST_IDENTIFIER |

A unique test identifier when running IAST in a CI/CD environment to differentiate between different test runs. For example, a build number.

## Serverless Mode [#serverless-mode]

**serverless_mode.enabled**

| TypeBoolean                                       |
| ------------------------------------------------- |
| Defaultfalse                                      |
| Environ variableNEW_RELIC_SERVERLESS_MODE_ENABLED |

If `true`, the agent will operate in a streamlined mode suitable for use with short-lived serverless functions. NOTE: Only AWS Lambda functions are supported currently and this option isn't intended for use without [New Relic's Ruby Lambda layer](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/get-started/monitoring-aws-lambda-serverless-monitoring/) offering.

## Sidekiq [#sidekiq]

**sidekiq.args.include**

| TypeArray                                      |
| ---------------------------------------------- |
| Default\[]                                     |
| Environ variableNEW_RELIC_SIDEKIQ_ARGS_INCLUDE |

An array of strings that will collectively serve as an allowlist for filtering which Sidekiq job arguments get reported to New Relic. To capture any Sidekiq arguments, `job.sidekiq.args.*` must also be added to the separate `attributes.include` configuration option. Each string in this array will be turned into a regular expression via `Regexp.new` to permit advanced matching. For job argument hashes, if either a key or value matches, the pair will be included. All matching job argument array elements and job argument scalars will be included.

**sidekiq.args.exclude**

| TypeArray                                      |
| ---------------------------------------------- |
| Default\[]                                     |
| Environ variableNEW_RELIC_SIDEKIQ_ARGS_EXCLUDE |

An array of strings that will collectively serve as a denylist for filtering which Sidekiq job arguments get reported to New Relic. To capture any Sidekiq arguments, `job.sidekiq.args.*` must also be added to the separate `attributes.include` configuration option. Each string in this array will be turned into a regular expression via `Regexp.new` to permit advanced matching. For job argument hashes, if either a key or value matches, the pair will be excluded. All matching job argument array elements and job argument scalars will be excluded.

**sidekiq.ignore_retry_errors**

| TypeBoolean                                           |
| ----------------------------------------------------- |
| Defaultfalse                                          |
| Environ variableNEW_RELIC_SIDEKIQ_IGNORE_RETRY_ERRORS |

If `true`, the agent will ignore exceptions raised during Sidekiq's retry attempts and will only report the error if the job permanently fails.

**sidekiq.separate_transactions**

| TypeBoolean                                             |
| ------------------------------------------------------- |
| Defaultfalse                                            |
| Environ variableNEW_RELIC_SIDEKIQ_SEPARATE_TRANSACTIONS |

If `true`, the agent starts a new transaction when a Sidekiq job is executed during a web transaction. This prevents Sidekiq job execution time from being included in web transaction metrics.

## Strip Exception Messages [#strip-exception-messages]

**strip_exception_messages.enabled**

| TypeBoolean                                                |
| ---------------------------------------------------------- |
| Defaultfalse                                               |
| Environ variableNEW_RELIC_STRIP_EXCEPTION_MESSAGES_ENABLED |

If `true`, the agent strips messages from all exceptions except those in the [allowed classes list](#strip_exception_messages-allowed_classes). Enabled automatically in [high security mode](https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security).

**strip_exception_messages.allowed_classes**

| TypeArray                                                          |
| ------------------------------------------------------------------ |
| Default\[]                                                         |
| Environ variableNEW_RELIC_STRIP_EXCEPTION_MESSAGES_ALLOWED_CLASSES |

Specify a list of exceptions you do not want the agent to strip when [strip_exception_messages](#strip_exception_messages-enabled) is `true`. Separate exceptions with a comma. For example, `"ImportantException,PreserveMessageException"`.

## Stripe [#stripe]

**stripe.user_data.include**

| TypeArray                                          |
| -------------------------------------------------- |
| Default\[]                                         |
| Environ variableNEW_RELIC_STRIPE_USER_DATA_INCLUDE |

An array of strings to specify which keys inside a Stripe event's `user_data` hash should be reported to New Relic. Each string in this array will be turned into a regular expression via `Regexp.new` to enable advanced matching. Setting the value to `["."]` will report all `user_data`.

**stripe.user_data.exclude**

| TypeArray                                          |
| -------------------------------------------------- |
| Default\[]                                         |
| Environ variableNEW_RELIC_STRIPE_USER_DATA_EXCLUDE |

An array of strings to specify which keys and/or values inside a Stripe event's `user_data` hash should not be reported to New Relic. Each string in this array will be turned into a regular expression via `Regexp.new` to permit advanced matching. For each hash pair, if either the key or value is matched the pair isn't reported. By default, no `user_data` is reported. Use this option only if the `stripe.user_data.include` option is also used.

## Thread Profiler [#thread-profiler]

**thread_profiler.enabled**

| TypeBoolean                                       |
| ------------------------------------------------- |
| Defaultfalse                                      |
| Environ variableNEW_RELIC_THREAD_PROFILER_ENABLED |

If `true`, enables use of the [thread profiler](https://docs.newrelic.com/docs/apm/applications-menu/events/thread-profiler-tool).

## Utilization [#utilization]

**utilization.detect_aws**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaulttrue                                      |
| Environ variableNEW_RELIC_UTILIZATION_DETECT_AWS |

If `true`, the agent automatically detects that it is running in an AWS environment.

**utilization.detect_azure**

| TypeBoolean                                        |
| -------------------------------------------------- |
| Defaulttrue                                        |
| Environ variableNEW_RELIC_UTILIZATION_DETECT_AZURE |

If `true`, the agent automatically detects that it is running in an Azure environment.

**utilization.detect_docker**

| TypeBoolean                                         |
| --------------------------------------------------- |
| Defaulttrue                                         |
| Environ variableNEW_RELIC_UTILIZATION_DETECT_DOCKER |

If `true`, the agent automatically detects that it is running in Docker.

**utilization.detect_gcp**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaulttrue                                      |
| Environ variableNEW_RELIC_UTILIZATION_DETECT_GCP |

If `true`, the agent automatically detects that it is running in a Google Cloud Platform environment.

**utilization.gcp_cloud_run.use_instance_as_host**

| TypeBoolean                                                              |
| ------------------------------------------------------------------------ |
| Defaulttrue                                                              |
| Environ variableNEW_RELIC_UTILIZATION_GCP_CLOUD_RUN_USE_INSTANCE_AS_HOST |

If `true`, the agent reports the GCP instance id as the hostname when running on Google Cloud Run (Services, Worker Pools, and Jobs).

**utilization.gcp_cloud_run.include_revision_in_host**

| TypeBoolean                                                                  |
| ---------------------------------------------------------------------------- |
| Defaultfalse                                                                 |
| Environ variableNEW_RELIC_UTILIZATION_GCP_CLOUD_RUN_INCLUDE_REVISION_IN_HOST |

If `true`, the agent prepends the Cloud Run revision name to the GCP instance id to form the hostname (`{revision}-{instance id}`) on Google Cloud Run. The revision name comes from `K_REVISION` on a Cloud Run Service, `CLOUD_RUN_REVISION` on a Cloud Run Worker Pool, and `CLOUD_RUN_EXECUTION` on a Cloud Run Job. Has no effect unless `utilization.gcp_cloud_run.use_instance_as_host` is also `true`.

**utilization.detect_kubernetes**

| TypeBoolean                                             |
| ------------------------------------------------------- |
| Defaulttrue                                             |
| Environ variableNEW_RELIC_UTILIZATION_DETECT_KUBERNETES |

If `true`, the agent automatically detects that it is running in Kubernetes.

**utilization.detect_pcf**

| TypeBoolean                                      |
| ------------------------------------------------ |
| Defaulttrue                                      |
| Environ variableNEW_RELIC_UTILIZATION_DETECT_PCF |

If `true`, the agent automatically detects that it is running in a Pivotal Cloud Foundry environment.

**utilization.detect_in_parallel**

| TypeBoolean                                              |
| -------------------------------------------------------- |
| Defaulttrue                                              |
| Environ variableNEW_RELIC_UTILIZATION_DETECT_IN_PARALLEL |

If `true`, the agent will perform environment detection in parallel to speed up agent startup time.
