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
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_TRANSACTION_EVENTS_ENABLED |
If true, enables transaction event sampling.
| Type | Integer |
|---|---|
| Default | 1200 |
| Environ variable | NEW_RELIC_TRANSACTION_EVENTS_MAX_SAMPLES_STORED |
Defines the maximum number of transaction events reported from a single harvest.
Audit Log
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_AUDIT_LOG_ENABLED |
If true, enables an audit log which logs communications with the New Relic collector.
| Type | Array |
|---|---|
| Default | [".*"] |
| Environ variable | NEW_RELIC_AUDIT_LOG_ENDPOINTS |
List of allowed endpoints to include in the audit log.
| Type | String |
|---|---|
| Default | log/newrelic_audit.log |
| Environ variable | NEW_RELIC_AUDIT_LOG_PATH |
Specifies a path to the audit log file (including the filename).
Autostart
| Type | String |
|---|---|
| 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 variable | NEW_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".
| Type | String |
|---|---|
| Default | "irb,rspec" |
| Environ variable | NEW_RELIC_AUTOSTART_DENYLISTED_EXECUTABLES |
Defines a comma-delimited list of executables that the agent should not instrument. For example, "rake,my_ruby_script.rb".
| Type | String |
|---|---|
| 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 variable | NEW_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
| Type | String |
|---|---|
| Default | nil |
| Environ variable | NEW_RELIC_CLOUD_AWS_ACCOUNT_ID |
The AWS account ID associated with this application.
Code Level Metrics
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_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
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_CUSTOM_ATTRIBUTES_ENABLED |
If false, custom attributes will not be sent on events.
Custom Events
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_CUSTOM_INSIGHTS_EVENTS_ENABLED |
If true, the agent captures custom events.
| Type | Integer |
|---|---|
| Default | 3000 |
| Environ variable | NEW_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, set to max value 100000. This ensures the agent captures the maximum amount of LLM events.
Datastore Tracer
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_DATASTORE_TRACER_DATABASE_NAME_REPORTING_ENABLED |
If false, the agent will not add database_name parameter to transaction or slow SQL traces.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_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
Use these settings to toggle instrumentation types during agent startup.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTION_CABLE_INSTRUMENTATION |
If true, disables Action Cable instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTION_CONTROLLER |
If true, disables Action Controller instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTION_MAILBOX |
If true, disables Action Mailbox instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTION_MAILER |
If true, disables Action Mailer instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTIVEJOB |
If true, disables Active Job instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTIVE_STORAGE |
If true, disables Active Storage instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTIVE_SUPPORT |
If true, disables Active Support instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTIVE_RECORD_INSTRUMENTATION |
If true, disables Active Record instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_ACTIVE_RECORD_NOTIFICATIONS |
If true, disables instrumentation for Active Record 4+.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_CPU_SAMPLER |
If true, the agent won't sample the CPU usage of the host process.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_DELAYED_JOB_SAMPLER |
If true, the agent won't measure the depth of Delayed Job queues.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_GC_PROFILER |
If true, disables the use of GC::Profiler to measure time spent in garbage collection.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_MEMORY_SAMPLER |
If true, the agent won't sample the memory usage of the host process.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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).
Important
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.| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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).
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_SEQUEL_INSTRUMENTATION |
If true, disables Sequel instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_SIDEKIQ |
If true, disables Sidekiq instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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 and error collection.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_SINATRA_AUTO_MIDDLEWARE |
If true, disables agent middleware for Sinatra. This middleware is responsible for advanced feature support such as distributed tracing, page load timing, and error collection.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_VIEW_INSTRUMENTATION |
If true, disables view instrumentation.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_DISABLE_VM_SAMPLER |
If true, the agent won't sample performance measurements from the Ruby VM.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_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
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_ELASTICSEARCH_CAPTURE_CLUSTER_NAME |
If true, the agent captures the Elasticsearch cluster name in transaction traces.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_ELASTICSEARCH_CAPTURE_QUERIES |
If true, the agent captures Elasticsearch queries in transaction traces.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_ELASTICSEARCH_OBFUSCATE_QUERIES |
If true, the agent obfuscates Elasticsearch queries in transaction traces.
Heroku
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_HEROKU_USE_DYNO_NAMES |
If true, the agent uses Heroku dyno names as the hostname.
| Type | Array |
|---|---|
| Default | ["scheduler", "run"] |
| Environ variable | NEW_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
| Type | Array |
|---|---|
| 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 variable | NEW_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 and messages names.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_ASYNC_HTTP |
Controls auto-instrumentation of Async::HTTP at start up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_BUNNY |
Controls auto-instrumentation of bunny at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_SEMANTIC_LOGGER |
Controls auto-instrumentation of the semantic_logger library at start-up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_PARALLEL |
Controls auto-instrumentation of the parallel library at start-up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | "auto" |
| Environ variable | NEW_RELIC_INSTRUMENTATION_RUBY_KAFKA |
Controls auto-instrumentation of the ruby-kafka library at start-up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_OPENSEARCH |
Controls auto-instrumentation of the opensearch-ruby library at start-up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | "auto" |
| Environ variable | NEW_RELIC_INSTRUMENTATION_RDKAFKA |
Controls auto-instrumentation of the rdkafka library at start-up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | "auto" |
| Environ variable | NEW_RELIC_INSTRUMENTATION_AWS_SQS |
Controls auto-instrumentation of the aws-sdk-sqs library at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_DYNAMODB |
Controls auto-instrumentation of the aws-sdk-dynamodb library at start-up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_FIBER |
Controls auto-instrumentation of the Fiber class at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_CONCURRENT_RUBY |
Controls auto-instrumentation of the concurrent-ruby library at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_CURB |
Controls auto-instrumentation of Curb at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_DELAYED_JOB |
Controls auto-instrumentation of Delayed Job at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_ELASTICSEARCH |
Controls auto-instrumentation of the elasticsearch library at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_ETHON |
Controls auto-instrumentation of ethon at start up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | enabled |
| Environ variable | NEW_RELIC_INSTRUMENTATION_EXCON |
Controls auto-instrumentation of Excon at start-up. May be one of: enabled, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_GRAPE |
Controls auto-instrumentation of Grape at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_GRPC_CLIENT |
Controls auto-instrumentation of gRPC clients at start-up. May be one of: auto, prepend, chain, disabled.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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..
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_GRPC_SERVER |
Controls auto-instrumentation of gRPC servers at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_HTTPCLIENT |
Controls auto-instrumentation of HTTPClient at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_HTTPRB |
Controls auto-instrumentation of http.rb gem at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_HTTPX |
Controls auto-instrumentation of httpx at start up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_LOGGER |
Controls auto-instrumentation of Ruby standard library Logger at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_LOGGING |
Controls auto-instrumentation of the logging library at start-up. May be one of auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_LOGSTASHER |
Controls auto-instrumentation of the LogStasher library at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | enabled |
| Environ variable | NEW_RELIC_INSTRUMENTATION_RAILS_EVENT_LOGGER |
Controls instrumentation of Rails.event as structured logs. May be one of: enabled, disabled.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_MEMCACHE |
Controls auto-instrumentation of dalli gem for Memcache at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_MEMCACHED |
Controls auto-instrumentation of memcached gem for Memcache at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_MEMCACHE_CLIENT |
Controls auto-instrumentation of memcache-client gem for Memcache at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | enabled |
| Environ variable | NEW_RELIC_INSTRUMENTATION_MONGO |
Controls auto-instrumentation of Mongo at start-up. May be one of: enabled, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_NET_HTTP |
Controls auto-instrumentation of Net::HTTP at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_PUMA_RACK_URLMAP |
Controls auto-instrumentation of Puma::Rack::URLMap at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_RACK_URLMAP |
Controls auto-instrumentation of Rack::URLMap at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_RAKE |
Controls auto-instrumentation of rake at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_REDIS |
Controls auto-instrumentation of Redis at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_RESQUE |
Controls auto-instrumentation of resque at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_RODA |
Controls auto-instrumentation of Roda at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_SINATRA |
Controls auto-instrumentation of Sinatra at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | "enabled" |
| Environ variable | NEW_RELIC_INSTRUMENTATION_STRIPE |
Controls auto-instrumentation of Stripe at startup. May be one of: enabled, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_VIEW_COMPONENT |
Controls auto-instrumentation of ViewComponent at startup. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_TILT |
Controls auto-instrumentation of the Tilt template rendering library at start-up. May be one of: auto, prepend, chain, disabled.
| Type | String |
|---|---|
| Default | auto |
| Environ variable | NEW_RELIC_INSTRUMENTATION_TYPHOEUS |
Controls auto-instrumentation of Typhoeus at start-up. May be one of: auto, prepend, chain, disabled.
Message Tracer
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_MESSAGE_TRACER_SEGMENT_PARAMETERS_ENABLED |
If true, the agent will collect metadata about messages and attach them as segment parameters.
Mongo
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_MONGO_CAPTURE_QUERIES |
If true, the agent captures Mongo queries in transaction traces.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_MONGO_OBFUSCATE_QUERIES |
If true, the agent obfuscates Mongo queries in transaction traces.
Opensearch
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_OPENSEARCH_CAPTURE_QUERIES |
If true, the agent captures OpenSearch queries in transaction traces.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_OPENSEARCH_OBFUSCATE_QUERIES |
If true, the agent obfuscates OpenSearch queries in transaction traces.
OpenTelemetry
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | "" |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | elasticsearch-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::Instrumentation,OpenTelemetry::Instrumentation::HttpClient::Instrumentation,OpenTelemetry::Instrumentation::HTTPX::Instrumentation,OpenTelemetry::Instrumentation::Logger::Instrumentation,OpenTelemetry::Instrumentation::Mongo::Instrumentation,OpenTelemetry::Instrumentation::Net::HTTP::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 variable | NEW_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
| Type | String |
|---|---|
| Default | (Dynamic) |
| Environ variable | NEW_RELIC_PROCESS_HOST_DISPLAY_NAME |
Specify a custom hostname for display in the New Relic UI.
Profiling
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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.
| Type | Integer |
|---|---|
| Default | 0 |
| Environ variable | NEW_RELIC_PROFILING_DELAY |
The delay, in milliseconds, before continuous profiling starts after being enabled. Defaults to 0, meaning profiling starts immediately.
| Type | Integer |
|---|---|
| Default | 0 |
| Environ variable | NEW_RELIC_PROFILING_DURATION |
The duration, in milliseconds, that continuous profiling runs before automatically stopping. Defaults to 0, meaning profiling runs indefinitely until explicitly stopped.
| Type | String |
|---|---|
| Default | "cpu" |
| Environ variable | NEW_RELIC_PROFILING_INCLUDE |
The stackprof sampling mode to use for continuous profiling: cpu or object.
| Type | Float |
|---|---|
| Default | 0.01 |
| Environ variable | NEW_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.
| Type | Integer |
|---|---|
| Default | 10000 |
| Environ variable | NEW_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
| Type | Integer |
|---|---|
| Default | 60 |
| Environ variable | NEW_RELIC_PUMA_SAMPLE_RATE |
Number of seconds between samples of Puma server statistics taken in the Puma master process.
Rake
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | Integer |
|---|---|
| Default | 10 |
| Environ variable | NEW_RELIC_RAKE_CONNECT_TIMEOUT |
Defines the number of seconds to wait for a connection to complete before running a Rake task.
Rules
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
Security
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_AGENT_ENABLED |
If true, the security agent is loaded (a Ruby 'require' is performed).
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_ENABLED |
If true, the security agent is started (the agent runs in its event loop).
| Type | String |
|---|---|
| Default | "IAST" |
| Environ variable | NEW_RELIC_SECURITY_MODE |
Defines the mode for the security agent to operate in. Currently only IAST is supported.
| Type | String |
|---|---|
| Default | "wss://csec.nr-data.net" |
| Environ variable | NEW_RELIC_SECURITY_VALIDATOR_SERVICE_URL |
Defines the endpoint URL for posting security-related data.
| Type | Integer |
|---|---|
| Default | nil |
| Environ variable | NEW_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.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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"]
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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)
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_SQL_INJECTION |
If true, disables SQL injection detection in IAST scans.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_NOSQL_INJECTION |
If true, disables NoSQL injection detection in IAST scans.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_LDAP_INJECTION |
If true, disables LDAP injection detection in IAST scans.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_JAVASCRIPT_INJECTION |
If true, disables JavaScript injection detection in IAST scans.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_COMMAND_INJECTION |
If true, disables system command injection detection in IAST scans.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_XPATH_INJECTION |
If true, disables XPath injection detection in IAST scans.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_SSRF |
If true, disables Server-Side Request Forgery (SSRF) detection in IAST scans.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_RXSS |
If true, disables Reflected Cross-Site Scripting (RXSS) detection in IAST scans.
| Type | Integer |
|---|---|
| Default | 0 |
| Environ variable | NEW_RELIC_SECURITY_SCAN_SCHEDULE_DELAY |
Specifies the delay time (in minutes) before the IAST scan begins after the application starts.
| Type | Integer |
|---|---|
| Default | 0 |
| Environ variable | NEW_RELIC_SECURITY_SCAN_SCHEDULE_DURATION |
Specifies the duration (in minutes) for which the IAST scan is performed.
| Type | String |
|---|---|
| Default | "" |
| Environ variable | NEW_RELIC_SECURITY_SCAN_SCHEDULE_SCHEDULE |
Specifies a cron expression that sets when the IAST scan should run.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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.
| Type | Integer |
|---|---|
| Default | 3600 |
| Environ variable | NEW_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).
| Type | Integer |
|---|---|
| Default | 0 |
| Environ variable | NEW_RELIC_SECURITY_SCAN_CONTROLLERS_SCAN_INSTANCE_COUNT |
The number of application instances for a specific entity to perform IAST analysis on.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_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.
| Type | String |
|---|---|
| Default | nil |
| Environ variable | NEW_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
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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 offering.
Sidekiq
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_STRIP_EXCEPTION_MESSAGES_ENABLED |
If true, the agent strips messages from all exceptions except those in the allowed classes list. Enabled automatically in high security mode.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_RELIC_STRIP_EXCEPTION_MESSAGES_ALLOWED_CLASSES |
Specify a list of exceptions you do not want the agent to strip when strip_exception_messages is true. Separate exceptions with a comma. For example, "ImportantException,PreserveMessageException".
Stripe
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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.
| Type | Array |
|---|---|
| Default | [] |
| Environ variable | NEW_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
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_RELIC_THREAD_PROFILER_ENABLED |
If true, enables use of the thread profiler.
Utilization
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_UTILIZATION_DETECT_AWS |
If true, the agent automatically detects that it is running in an AWS environment.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_UTILIZATION_DETECT_AZURE |
If true, the agent automatically detects that it is running in an Azure environment.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_UTILIZATION_DETECT_DOCKER |
If true, the agent automatically detects that it is running in Docker.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_UTILIZATION_DETECT_GCP |
If true, the agent automatically detects that it is running in a Google Cloud Platform environment.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_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).
| Type | Boolean |
|---|---|
| Default | false |
| Environ variable | NEW_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.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_UTILIZATION_DETECT_KUBERNETES |
If true, the agent automatically detects that it is running in Kubernetes.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_UTILIZATION_DETECT_PCF |
If true, the agent automatically detects that it is running in a Pivotal Cloud Foundry environment.
| Type | Boolean |
|---|---|
| Default | true |
| Environ variable | NEW_RELIC_UTILIZATION_DETECT_IN_PARALLEL |
If true, the agent will perform environment detection in parallel to speed up agent startup time.