Configuration Reference
This page lists every setting in the agent's configuration schema (lib/config/schemas/), grouped by block, with its type, default, and environment variable. It is generated from the schema of version 14.13.0, so names and defaults match the code exactly. For how files and environment variables are found, merged, and converted, read Configuration first.
Conventions used below:
- Setting is the dotted path. In a file,
transaction_tracer.top_nis writtentransaction_tracer: { top_n: 20 }. - Env var is the exact environment variable. Values are converted from strings by type (see How values are converted).
- Internal settings exist in the schema but are not meant to be changed.
Blocks
- Top-level settings
agent_controlai_monitoringapiapollo_serverapplication_loggingattributesaudit_logbrowser_monitoringcloudcode_level_metricscustom_insights_eventsdatastore_tracerdistributed_tracingerror_collectorgrpcherokuinfinite_tracinginstrumentationkafkaloggingmessage_traceropentelemetrypluginsprocess_hostprofilingrulessecurityserverless_modeslow_sqlspan_eventsstrip_exception_messagestransaction_eventstransaction_segmentstransaction_tracerurl_obfuscationutilizationvirtual_machineworker_threads
Top-level settings
Top-level scalar settings: identity, connection, proxy, and a few global switches.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
account_id |
string or number or null | null |
NEW_RELIC_ACCOUNT_ID |
The New Relic account ID to attribute serverless trace data to. Only used in serverless_mode; required for distributed tracing to be enabled there. Locally configured values are ignored outside serverless_mode. |
agent_enabled |
boolean | true |
NEW_RELIC_ENABLED |
Whether the module is enabled. |
allow_all_headers |
boolean | false |
NEW_RELIC_ALLOW_ALL_HEADERS |
When true, all request headers except for those listed in attributes.exclude will be captured for all traces, unless otherwise specified in a destination's attributes include/exclude lists. |
apdex_t |
number | 0.1 |
NEW_RELIC_APDEX_T |
The default Apdex tolerating / threshold value for applications, in seconds. The default for Node is apdexT to 100 milliseconds, which is lower than New Relic standard, but Node.js applications tend to be more latency-sensitive than most. NOTE: This setting can not be modified locally. |
apm_lambda_mode |
boolean | false |
NEW_RELIC_APM_LAMBDA_MODE |
When true, the AWS Lambda instrumentation will add the necessary data to support the new (as of 2025) unified APM UI. |
app_name |
array or string | [] |
NEW_RELIC_APP_NAME |
Array of application names. |
certificates |
array | [] |
NEW_RELIC_CERTIFICATES |
Custom SSL certificates If your proxy uses a custom SSL certificate, you can add the CA text to this array, one entry per certificate. The easiest way to do this is with fs.readFileSync e.g. certificates: [ require('fs').readFileSync('custom.crt', 'utf8') // don't forget the utf8 ] |
compressed_content_encoding |
string | "gzip" |
NEW_RELIC_COMPRESSED_CONTENT_ENCODING |
If the data compression threshold is reached in the payload, the agent compresses data, using gzip compression by default. The config option compressed_content_encoding can be set to 'deflate' to use deflate compression. |
enforce_backstop |
boolean | true |
NEW_RELIC_ENFORCE_BACKSTOP |
By default, any transactions that are not affected by other bits of naming logic (the API, rules, or metric normalization rules) will have their names set to 'NormalizedUri/*'. Setting this value to false will set them instead to Uri/path/to/resource. |
high_security |
boolean | false |
NEW_RELIC_HIGH_SECURITY |
High Security High security mode (v2) is a setting which prevents any sensitive data from being sent to New Relic. The local setting must match the server setting. If there is a mismatch the agent will log a message and act as if it is disabled. |
host |
string | "" |
NEW_RELIC_HOST |
Hostname for the New Relic collector proxy. You shouldn't need to change this. |
ignore_server_configuration |
boolean | false |
NEW_RELIC_IGNORE_SERVER_SIDE_CONFIG |
You may want more control over how your agent is configured and want to disallow the use of New Relic's server-side configuration for agents. To do so, set this to true. |
labels |
object or string | {} |
NEW_RELIC_LABELS |
Label names and values applied to the data sent from this agent, as an object or a ;-delimited key:value string. Label names and values are truncated to 255 characters and the set is capped at 64. |
license_key |
string | '' |
NEW_RELIC_LICENSE_KEY |
The user's license key. Must be set by per-app configuration file. |
newrelic_home |
string or null | null |
NEW_RELIC_HOME |
Directory searched first for the configuration file. Read from the environment before the file is located, so setting it inside the file has no effect on discovery. |
port |
integer | 443 |
NEW_RELIC_PORT |
The port on which the collector proxy will be listening. You shouldn't need to change this. |
primary_application_id |
string or number or null | null |
NEW_RELIC_PRIMARY_APPLICATION_ID |
The APM application ID to attribute serverless trace data to. Only used in serverless_mode; defaults to 'Unknown' when account_id is set. Locally configured values are ignored outside serverless_mode. |
proxy |
string | "" |
NEW_RELIC_PROXY_URL |
Proxy url A proxy url can be used in place of setting proxy_host, proxy_port, proxy_user, and proxy_pass. e.g. http://user:pass@host:port/ Setting proxy will override other proxy settings. |
proxy_host |
string | "" |
NEW_RELIC_PROXY_HOST |
Proxy host to use to connect to the internet. |
proxy_pass |
string | "" |
NEW_RELIC_PROXY_PASS |
Proxy password when required. |
proxy_port |
string | "" |
NEW_RELIC_PROXY_PORT |
Proxy port to use to connect to the internet. |
proxy_user |
string | "" |
NEW_RELIC_PROXY_USER |
Proxy user name when required. |
ssl |
boolean | true |
NEW_RELIC_USE_SSL |
Whether or not to use SSL to connect to New Relic servers. This can no longer be disabled; the only permitted value is true. Internal. |
trusted_account_key |
string or number or null | null |
NEW_RELIC_TRUSTED_ACCOUNT_KEY |
The trusted account key used to validate incoming distributed trace headers. Only used in serverless_mode; defaults to account_id when account_id is set. Locally configured values are ignored outside serverless_mode. |
agent_control
Integration with New Relic Agent Control. When enabled, the agent periodically writes health status files (codes such as NR-APM-000 for healthy, NR-APM-002 for a missing license key) to the delivery location.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
agent_control.enabled |
boolean | false |
NEW_RELIC_AGENT_CONTROL_ENABLED |
Indicates that the agent is being managed by Agent Control. Must be set to true for health monitoring. |
agent_control.health.delivery_location |
string | "file:///newrelic/apm/health" |
NEW_RELIC_AGENT_CONTROL_HEALTH_DELIVERY_LOCATION |
A string file path to a directory that the agent is expected to write health status files to. Must be set for health monitoring to be enabled. |
agent_control.health.frequency |
integer | 5 |
NEW_RELIC_AGENT_CONTROL_HEALTH_FREQUENCY |
An integer representing how often the agent should write to the health status file(s), in seconds. |
ai_monitoring
AI monitoring of supported LLM SDKs. See AI Monitoring API for the decision order between these flags.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
ai_monitoring.basic_telemetry.enabled |
boolean | true |
NEW_RELIC_AI_MONITORING_BASIC_TELEMETRY_ENABLED |
Turns AI monitoring (Llm* events, spans, and metrics) on or off when the deprecated ai_monitoring.enabled is unset. |
ai_monitoring.enabled |
boolean or null | null |
NEW_RELIC_AI_MONITORING_ENABLED |
Deprecated in favor of ai_monitoring.basic_telemetry.enabled. Toggles the generation of AI monitoring events by the agent. Unset by default; when unset, ai_monitoring.basic_telemetry.enabled decides whether AI monitoring is active, and false always disables it. Deprecated (2026-11-09). |
ai_monitoring.record_content.enabled |
boolean or null | null |
NEW_RELIC_AI_MONITORING_RECORD_CONTENT_ENABLED |
Whether Llm* events include message content such as prompts and completions. When unset, content is recorded only if ai_monitoring.enabled was set to true locally and the server did not send ai_monitoring.enabled. |
ai_monitoring.streaming.enabled |
boolean | true |
NEW_RELIC_AI_MONITORING_STREAMING_ENABLED |
Whether streamed LLM responses are instrumented. |
api
Kill switches for individual API methods. When false, the corresponding newrelic.* call returns false and records nothing.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
api.custom_attributes_enabled |
boolean | true |
NEW_RELIC_API_CUSTOM_ATTRIBUTES |
Controls for the API.addCustomAttribute method. |
api.custom_events_enabled |
boolean | true |
NEW_RELIC_API_CUSTOM_EVENTS |
Controls for the API.recordCustomEvent method. |
api.notice_error_enabled |
boolean | true |
NEW_RELIC_API_NOTICE_ERROR |
Controls for the API.noticeError method. |
apollo_server
Options for the @apollo/server GraphQL instrumentation. See also the Apollo callbacks in Integrations and Lifecycle.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
apollo_server.scalars |
boolean | false |
NEW_RELIC_APOLLO_SERVER_SCALARS |
Enable capture of timing of fields resolved with the GraphQLScalarType return type. This may be desired when performing time intensive calculations to return a scalar value. This is not recommended for queries that return a large number of pre-calculated scalar fields. |
apollo_server.introspection_queries |
boolean | false |
NEW_RELIC_APOLLO_SERVER_INTROSPECTION_QUERIES |
Enable capture of timings for an IntrospectionQuery |
apollo_server.service_definition_queries |
boolean | false |
NEW_RELIC_APOLLO_SERVER_SERVICE_DEFINITION_QUERIES |
Enable capture of timings for a Service Definition query received from an Apollo Federated Gateway Server. |
apollo_server.health_check_queries |
boolean | false |
NEW_RELIC_APOLLO_SERVER_HEALTH_CHECK_QUERIES |
Enable capture of timings for a Health Check query received from an Apollo Federated Gateway Server. |
apollo_server.field_metrics |
boolean | false |
NEW_RELIC_APOLLO_SERVER_FIELD_METRICS |
Enable capture of metrics for every field and resolver argument seen for an Apollo query. This is intended to be used to check for any unused fields in your graphql schema. |
apollo_server.collapse_field_metrics |
boolean | false |
NEW_RELIC_APOLLO_SERVER_COLLAPSE_FIELD_METRICS |
When field_metrics is enabled, report list arguments under one metric name without item indexes (for example ids instead of ids.0, ids.1). Each list item still increments the call count of that metric. |
application_logging
Application log support for instrumented logging libraries (such as winston, pino, and bunyan) and newrelic.recordLogEvent(). application_logging.enabled is the master switch.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
application_logging.enabled |
boolean | true |
NEW_RELIC_APPLICATION_LOGGING_ENABLED |
Toggles the ability for all application logging features to be enabled. |
application_logging.forwarding.enabled |
boolean | true |
NEW_RELIC_APPLICATION_LOGGING_FORWARDING_ENABLED |
Toggles whether the agent gathers log records for sending to New Relic. |
application_logging.forwarding.max_samples_stored |
integer | 10000 |
NEW_RELIC_APPLICATION_LOGGING_FORWARDING_MAX_SAMPLES_STORED |
Number of log records to send per minute to New Relic. |
application_logging.forwarding.labels.enabled |
boolean | false |
NEW_RELIC_APPLICATION_LOGGING_FORWARDING_LABELS_ENABLED |
If true, the agent attaches labels to log records. |
application_logging.forwarding.labels.exclude |
array | [] |
NEW_RELIC_APPLICATION_LOGGING_FORWARDING_LABELS_EXCLUDE |
A case-insensitive array containing the labels to exclude from log records. |
application_logging.metrics.enabled |
boolean | true |
NEW_RELIC_APPLICATION_LOGGING_METRICS_ENABLED |
Toggles whether the agent gathers logging metrics. |
application_logging.local_decorating.enabled |
boolean | false |
NEW_RELIC_APPLICATION_LOGGING_LOCAL_DECORATING_ENABLED |
Toggles whether the agent performs log decoration on standard log output. |
attributes
Global attribute rules that apply to every destination. See Attributes, Privacy, and Security for how include and exclude rules interact.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
attributes.enabled |
boolean | true |
NEW_RELIC_ATTRIBUTES_ENABLED |
If true, enables capture of attributes for all destinations. If there are specific parameters you want ignored, use attributes.exclude. |
attributes.value_size_limit |
integer | 256 |
NEW_RELIC_ATTRIBUTES_VALUE_SIZE_LIMIT |
Defines the number of characters allowed for each individual attribute's value. The default is 256 characters, with a maximum of 4,096. Maximum 4096. |
attributes.exclude |
array | [] |
NEW_RELIC_ATTRIBUTES_EXCLUDE |
Prefix of attributes to exclude from all destinations. Allows * as wildcard at end. NOTE: If excluding headers, they must be in camelCase form to be filtered. |
attributes.include |
array | [] |
NEW_RELIC_ATTRIBUTES_INCLUDE |
Prefix of attributes to include in all destinations. Allows * as wildcard at end. NOTE: If including headers, they must be in camelCase form to be filtered. |
attributes.include_enabled |
boolean | true |
NEW_RELIC_ATTRIBUTES_INCLUDE_ENABLED |
If true, patterns may be added to the attributes.include list. |
attributes.filter_cache_limit |
integer | 1000 |
NEW_RELIC_ATTRIBUTES_FILTER_CACHE_LIMIT |
Controls how many attribute include/exclude rule results are cached by the filter. Increasing this limit will cause greater memory usage and is only necessary if you have an extremely high variety of attributes. |
audit_log
Logs the payloads sent to New Relic, for auditing. Ignored when logging.level is trace, which logs all traffic anyway.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
audit_log.enabled |
boolean | false |
NEW_RELIC_AUDIT_LOG_ENABLED |
Enables logging of out bound traffic from the Agent to the Collector. This field is ignored if trace level logging is enabled. With trace logging, all traffic is logged. |
audit_log.endpoints |
array | [] |
NEW_RELIC_AUDIT_LOG_ENDPOINTS |
Specify which methods are logged. Used in conjunction with the audit_log flag If audit_log is enabled and this property is empty, all methods will be logged Otherwise, if the audit log is enabled, only the methods specified in the filter will be logged Methods include: error_data, metric_data, and analytic_event_data |
browser_monitoring
Browser (RUM) script generation for newrelic.getBrowserTimingHeader(). The script content and keys come from the server.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
browser_monitoring.attributes.enabled |
boolean | false |
NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_ENABLED |
If true, the agent captures attributes from browser monitoring. |
browser_monitoring.attributes.exclude |
array | [] |
NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_EXCLUDE |
Prefix of attributes to exclude from browser monitoring. Allows * as wildcard at end. |
browser_monitoring.attributes.include |
array | [] |
NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_INCLUDE |
Prefix of attributes to include in browser monitoring. Allows * as wildcard at end. |
browser_monitoring.enable |
boolean | true |
NEW_RELIC_BROWSER_MONITOR_ENABLE |
Enable browser monitoring header generation. This does not auto-instrument, rather it enables the agent to generate headers. The newrelic module can generate the appropriate <script> header, but you must inject the header yourself, or use a module that does so. |
browser_monitoring.debug |
boolean | false |
NEW_RELIC_BROWSER_MONITOR_DEBUG |
Request un-minified sources from the server. |
browser_monitoring.version |
string | "" |
NEW_RELIC_BROWSER_MONITORING_VERSION |
The browser agent loader version to request, e.g. "1.317.0". See the browser agent EOL policy for which versions are currently available and supported. |
cloud
Cloud provider metadata.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
cloud.aws.account_id |
integer | null |
NEW_RELIC_CLOUD_AWS_ACCOUNT_ID |
The AWS account ID for the AWS account associated with this app. |
code_level_metrics
Code-level metrics attributes on spans.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
code_level_metrics.enabled |
boolean | true |
NEW_RELIC_CODE_LEVEL_METRICS_ENABLED |
Adds code-level metrics attributes (function name, file path, line) to spans. |
custom_insights_events
Custom events recorded with newrelic.recordCustomEvent().
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
custom_insights_events.enabled |
boolean | true |
NEW_RELIC_CUSTOM_INSIGHTS_EVENTS_ENABLED |
If this is disabled, the agent does not collect, nor try to send, custom event data. |
custom_insights_events.max_samples_stored |
integer | 3000 |
NEW_RELIC_CUSTOM_INSIGHTS_EVENTS_MAX_SAMPLES_STORED |
The agent will collect all events up to this number per minute. If there are more than that, a statistical sampling will be collected. Currently this uses a priority sampling algorithm. |
datastore_tracer
Datastore segment details.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
datastore_tracer.instance_reporting.enabled |
boolean | true |
NEW_RELIC_DATASTORE_INSTANCE_REPORTING_ENABLED |
When true (the default), reports the datastore host and port, path, or ID. When false, removes host and port_path_or_id from datastore segments and disables datastore instance metrics. Does not affect database name reporting. |
datastore_tracer.database_name_reporting.enabled |
boolean | true |
NEW_RELIC_DATASTORE_DATABASE_NAME_REPORTING_ENABLED |
When true (the default), reports the database or schema name. When false, removes database_name from datastore segments. Does not affect datastore instance reporting. |
distributed_tracing
Distributed tracing and sampling. String samplers accept always_on, always_off, or adaptive; object samplers are { trace_id_ratio_based: { ratio } } or { adaptive: { sampling_target } }. See Distributed Tracing.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
distributed_tracing.enabled |
boolean | true |
NEW_RELIC_DISTRIBUTED_TRACING_ENABLED |
Enables/disables distributed tracing. |
distributed_tracing.exclude_newrelic_header |
boolean | true |
NEW_RELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER |
Excludes New Relic format distributed tracing header (newrelic) on outbound requests when set to true. By default (when false) both W3C TraceContext (traceparent, tracecontext) and New Relic formats will be sent. |
distributed_tracing.sampler.root |
string or object | "adaptive" |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_ROOT |
Example setting root sampler via config to a string value - root: 'always_on' Example setting root sampler via config to trace id ratio based - root: { trace_id_ratio_based: { ratio: 0.5 } } |
distributed_tracing.sampler.remote_parent_sampled |
string or object | "adaptive" |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_REMOTE_PARENT_SAMPLED |
When set to always_on, the sampled flag in the traceparent header being set to "true" will result in the local transaction being sampled with a priority value of "2". When set to always_off, the local transaction will never be sampled. |
distributed_tracing.sampler.remote_parent_not_sampled |
string or object | "adaptive" |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_REMOTE_PARENT_NOT_SAMPLED |
When set to always_on, the local transaction will be sampled with a priority of "2". When set to always_off, the local transaction will never be sampled. At the default setting, the sampling decision will be determined according to the normal algorithm. |
distributed_tracing.sampler.adaptive_sampling_target |
integer | 10 |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_ADAPTIVE_SAMPLING_TARGET |
The sampling target for adaptive sampling is controlled via this attribute when configuring the default/adaptive sampler. The default sampling target is 10 transactions/min when it is not specified but MUST be within the range of [1, 120] (inclusive). Range 1–120. |
distributed_tracing.sampler.full_granularity.enabled |
boolean | true |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_FULL_GRANULARITY_ENABLED |
Core tracing flag. Always forced to true; user values are ignored. |
distributed_tracing.sampler.partial_granularity.enabled |
boolean | false |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_ENABLED |
Core tracing flag. Always forced to false; user values are ignored. |
distributed_tracing.sampler.partial_granularity.type |
string | "essential" |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_TYPE |
Partial granularity span reduction type. Accepted, but has no effect while core tracing is disabled. One of compact, essential, reduced. |
distributed_tracing.sampler.partial_granularity.root |
string or object | "adaptive" |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_ROOT |
Example setting root sampler via config to a string value - root: 'always_on' Example setting root sampler via config to trace id ratio based - root: { trace_id_ratio_based: { ratio: 0.5 } } |
distributed_tracing.sampler.partial_granularity.remote_parent_sampled |
string or object | "adaptive" |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_REMOTE_PARENT_SAMPLED |
When set to always_on, the sampled flag in the traceparent header being set to "true" will result in the local transaction being sampled with a priority value of "2". When set to always_off, the local transaction will never be sampled. |
distributed_tracing.sampler.partial_granularity.remote_parent_not_sampled |
string or object | "adaptive" |
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_REMOTE_PARENT_NOT_SAMPLED |
When set to always_on, the local transaction will be sampled with a priority of "2". When set to always_off, the local transaction will never be sampled. At the default setting, the sampling decision will be determined according to the normal algorithm. |
error_collector
Error collection rules. Errors reported with newrelic.noticeError() ignore the status code rules.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
error_collector.attributes.enabled |
boolean | true |
NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_ENABLED |
If true, the agent captures attributes from error collection. |
error_collector.attributes.exclude |
array | [] |
NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_EXCLUDE |
Prefix of attributes to exclude from error collection. Allows * as wildcard at end. |
error_collector.attributes.include |
array | [] |
NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_INCLUDE |
Prefix of attributes to include in error collection. Allows * as wildcard at end. |
error_collector.enabled |
boolean | true |
NEW_RELIC_ERROR_COLLECTOR_ENABLED |
Disabling the error tracer just means that errors aren't collected and sent to New Relic -- it DOES NOT remove any instrumentation. |
error_collector.ignore_status_codes |
array | [404] |
NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERROR_CODES |
List of HTTP error status codes the error tracer should disregard. Ignoring a status code means that the transaction is not renamed to match the code, and the request is not treated as an error by the error collector. NOTE: This configuration value has no effect on errors recorded using noticeError(). |
error_collector.capture_events |
boolean | true |
NEW_RELIC_ERROR_COLLECTOR_CAPTURE_EVENTS |
Whether error events are collected. |
error_collector.max_event_samples_stored |
integer | 100 |
NEW_RELIC_ERROR_COLLECTOR_MAX_EVENT_SAMPLES_STORED |
The agent will collect all error events up to this number per minute. If there are more than that, a statistical sampling will be collected. Currently this uses a priority sampling algorithm. |
error_collector.expected_classes |
array | [] |
NEW_RELIC_ERROR_COLLECTOR_EXPECTED_ERRORS |
Error class names treated as expected: still collected, but excluded from the error rate. |
error_collector.expected_messages |
object | {} |
NEW_RELIC_ERROR_COLLECTOR_EXPECTED_MESSAGES |
Object mapping an error class name to a list of messages treated as expected, e.g. { "Error": ["timeout"] }. |
error_collector.expected_status_codes |
array | [] |
NEW_RELIC_ERROR_COLLECTOR_EXPECTED_ERROR_CODES |
HTTP status codes whose errors are treated as expected. Accepts numbers and ranges as strings (e.g. "400-421"). |
error_collector.ignore_classes |
array | [] |
NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERRORS |
Error class names that are never collected. |
error_collector.ignore_messages |
object | {} |
NEW_RELIC_ERROR_COLLECTOR_IGNORE_MESSAGES |
Object mapping an error class name to a list of messages that are never collected. |
grpc
Options for the @grpc/grpc-js instrumentation.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
grpc.record_errors |
boolean | true |
NEW_RELIC_GRPC_RECORD_ERRORS |
Enables recording of non-zero gRPC status codes. Default is true. |
grpc.ignore_status_codes |
array | [] |
NEW_RELIC_GRPC_IGNORE_STATUS_CODES |
List of gRPC error status codes the error tracer should disregard. Ignoring a status code means that the transaction is not renamed to match the code, and the request is not treated as an error by the error collector. NOTE: This configuration value has no effect on errors recorded using noticeError(). |
heroku
Heroku-specific naming.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
heroku.use_dyno_names |
boolean | true |
NEW_RELIC_HEROKU_USE_DYNO_NAMES |
On Heroku (when the DYNO environment variable is set), use the dyno name as the host name. |
infinite_tracing
Infinite Tracing: streams spans to a trace observer over gRPC. Setting trace_observer.host enables it. It is disabled in serverless mode.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
infinite_tracing.trace_observer.host |
string | "" |
NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST |
The URI HOST of the observer. Setting this enables infinite tracing. |
infinite_tracing.trace_observer.port |
integer | 443 |
NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_PORT |
The URI PORT of the observer. |
infinite_tracing.trace_observer.insecure |
boolean | false |
NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_INSECURE |
Whether to connect to the trace observer without TLS. Internal use only. Internal. |
infinite_tracing.span_events.queue_size |
integer | 10000 |
NEW_RELIC_INFINITE_TRACING_SPAN_EVENTS_QUEUE_SIZE |
The amount of spans to hold onto before dropping them |
infinite_tracing.span_events.batch_size |
integer | 750 |
NEW_RELIC_INFINITE_TRACING_SPAN_EVENTS_BATCH_SIZE |
Size of batches to post to 8T server |
infinite_tracing.batching |
boolean | true |
NEW_RELIC_INFINITE_TRACING_BATCHING |
Send spans to the trace observer in batches. |
infinite_tracing.compression |
boolean | true |
NEW_RELIC_INFINITE_TRACING_COMPRESSION |
Compress span batches sent to the trace observer. |
instrumentation
One enabled toggle per instrumented package.
Every package below defaults to enabled: true. Set instrumentation: { <package>: { enabled: false } } to turn one off; the agent then records the supportability metric Nodejs/Instrumentation/<package>/disabled.
Note: The derived environment variable names contain characters such as
@,/,-, and.(for exampleNEW_RELIC_INSTRUMENTATION_@GRPC/GRPC-JS_ENABLED). Most shells cannotexportsuch names, although tools likeenvand container runtimes can set them. Packages with plain names work normally, e.g.NEW_RELIC_INSTRUMENTATION_MONGODB_ENABLED=false. When in doubt, use the configuration file.
| Package | Env var |
|---|---|
@anthropic-ai/sdk |
NEW_RELIC_INSTRUMENTATION_@ANTHROPIC-AI/SDK_ENABLED |
@apollo/server |
NEW_RELIC_INSTRUMENTATION_@APOLLO/SERVER_ENABLED |
@aws-sdk/smithy-client |
NEW_RELIC_INSTRUMENTATION_@AWS-SDK/SMITHY-CLIENT_ENABLED |
@azure/functions |
NEW_RELIC_INSTRUMENTATION_@AZURE/FUNCTIONS_ENABLED |
@elastic/elasticsearch |
NEW_RELIC_INSTRUMENTATION_@ELASTIC/ELASTICSEARCH_ENABLED |
@elastic/transport |
NEW_RELIC_INSTRUMENTATION_@ELASTIC/TRANSPORT_ENABLED |
@google/adk |
NEW_RELIC_INSTRUMENTATION_@GOOGLE/ADK_ENABLED |
@google/genai |
NEW_RELIC_INSTRUMENTATION_@GOOGLE/GENAI_ENABLED |
@grpc/grpc-js |
NEW_RELIC_INSTRUMENTATION_@GRPC/GRPC-JS_ENABLED |
@hapi/hapi |
NEW_RELIC_INSTRUMENTATION_@HAPI/HAPI_ENABLED |
@hapi/vision |
NEW_RELIC_INSTRUMENTATION_@HAPI/VISION_ENABLED |
@langchain/core |
NEW_RELIC_INSTRUMENTATION_@LANGCHAIN/CORE_ENABLED |
@langchain/langgraph |
NEW_RELIC_INSTRUMENTATION_@LANGCHAIN/LANGGRAPH_ENABLED |
@modelcontextprotocol/sdk |
NEW_RELIC_INSTRUMENTATION_@MODELCONTEXTPROTOCOL/SDK_ENABLED |
@modelcontextprotocol/sdk/client/index.js |
NEW_RELIC_INSTRUMENTATION_@MODELCONTEXTPROTOCOL/SDK/CLIENT/INDEX.JS_ENABLED |
@nestjs/core |
NEW_RELIC_INSTRUMENTATION_@NESTJS/CORE_ENABLED |
@node-redis/client |
NEW_RELIC_INSTRUMENTATION_@NODE-REDIS/CLIENT_ENABLED |
@opensearch-project/opensearch |
NEW_RELIC_INSTRUMENTATION_@OPENSEARCH-PROJECT/OPENSEARCH_ENABLED |
@prisma/client |
NEW_RELIC_INSTRUMENTATION_@PRISMA/CLIENT_ENABLED |
@redis/client |
NEW_RELIC_INSTRUMENTATION_@REDIS/CLIENT_ENABLED |
@smithy/core |
NEW_RELIC_INSTRUMENTATION_@SMITHY/CORE_ENABLED |
@smithy/smithy-client |
NEW_RELIC_INSTRUMENTATION_@SMITHY/SMITHY-CLIENT_ENABLED |
amqplib |
NEW_RELIC_INSTRUMENTATION_AMQPLIB_ENABLED |
amqplib/callback_api |
NEW_RELIC_INSTRUMENTATION_AMQPLIB/CALLBACK_API_ENABLED |
aws-sdk |
NEW_RELIC_INSTRUMENTATION_AWS-SDK_ENABLED |
bluebird |
NEW_RELIC_INSTRUMENTATION_BLUEBIRD_ENABLED |
bunyan |
NEW_RELIC_INSTRUMENTATION_BUNYAN_ENABLED |
cassandra-driver |
NEW_RELIC_INSTRUMENTATION_CASSANDRA-DRIVER_ENABLED |
child_process |
NEW_RELIC_INSTRUMENTATION_CHILD_PROCESS_ENABLED |
connect |
NEW_RELIC_INSTRUMENTATION_CONNECT_ENABLED |
crypto |
NEW_RELIC_INSTRUMENTATION_CRYPTO_ENABLED |
dns |
NEW_RELIC_INSTRUMENTATION_DNS_ENABLED |
express |
NEW_RELIC_INSTRUMENTATION_EXPRESS_ENABLED |
fastify |
NEW_RELIC_INSTRUMENTATION_FASTIFY_ENABLED |
fs |
NEW_RELIC_INSTRUMENTATION_FS_ENABLED |
http |
NEW_RELIC_INSTRUMENTATION_HTTP_ENABLED |
http2 |
NEW_RELIC_INSTRUMENTATION_HTTP2_ENABLED |
https |
NEW_RELIC_INSTRUMENTATION_HTTPS_ENABLED |
ioredis |
NEW_RELIC_INSTRUMENTATION_IOREDIS_ENABLED |
iovalkey |
NEW_RELIC_INSTRUMENTATION_IOVALKEY_ENABLED |
kafkajs |
NEW_RELIC_INSTRUMENTATION_KAFKAJS_ENABLED |
koa |
NEW_RELIC_INSTRUMENTATION_KOA_ENABLED |
memcached |
NEW_RELIC_INSTRUMENTATION_MEMCACHED_ENABLED |
mongodb |
NEW_RELIC_INSTRUMENTATION_MONGODB_ENABLED |
mysql |
NEW_RELIC_INSTRUMENTATION_MYSQL_ENABLED |
mysql2 |
NEW_RELIC_INSTRUMENTATION_MYSQL2_ENABLED |
net |
NEW_RELIC_INSTRUMENTATION_NET_ENABLED |
next |
NEW_RELIC_INSTRUMENTATION_NEXT_ENABLED |
openai |
NEW_RELIC_INSTRUMENTATION_OPENAI_ENABLED |
pg |
NEW_RELIC_INSTRUMENTATION_PG_ENABLED |
pino |
NEW_RELIC_INSTRUMENTATION_PINO_ENABLED |
q |
NEW_RELIC_INSTRUMENTATION_Q_ENABLED |
redis |
NEW_RELIC_INSTRUMENTATION_REDIS_ENABLED |
restify |
NEW_RELIC_INSTRUMENTATION_RESTIFY_ENABLED |
router |
NEW_RELIC_INSTRUMENTATION_ROUTER_ENABLED |
undici |
NEW_RELIC_INSTRUMENTATION_UNDICI_ENABLED |
when |
NEW_RELIC_INSTRUMENTATION_WHEN_ENABLED |
winston |
NEW_RELIC_INSTRUMENTATION_WINSTON_ENABLED |
zlib |
NEW_RELIC_INSTRUMENTATION_ZLIB_ENABLED |
kafka
Options for Kafka instrumentation.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
kafka.metrics.cluster.metrics.enabled |
boolean | false |
NEW_RELIC_KAFKA_METRICS_CLUSTER_METRICS_ENABLED |
Enables capture of the MessageBroker/Kafka/Cluster/{cluster_id}/{Produce|Consume}/{topic_name} metrics. Disabled by default. |
logging
The agent's own log file (not your application's logs).
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
logging.level |
string | "info" |
NEW_RELIC_LOG_LEVEL |
Verbosity of the module's logging. This module uses bunyan (https://github.com/trentm/node-bunyan) for its logging, and as such the valid logging levels are 'fatal', 'error', 'warn', 'info', 'debug' and 'trace'. Logging at levels 'info' and higher is very terse. |
logging.filepath |
string | <cwd>/newrelic_agent.log |
NEW_RELIC_LOG |
Where to put the log file -- by default just uses process.cwd + 'newrelic_agent.log'. A special case is a filepath of 'stdout', in which case all logging will go to stdout, or 'stderr', in which case all logging will go to stderr. |
logging.enabled |
boolean | true |
NEW_RELIC_LOG_ENABLED |
Whether to write to a log file at all |
logging.diagnostics |
boolean | false |
NEW_RELIC_LOGGING_DIAGNOSTICS |
Whether to enable internal agent diagnostics logging. Internal. |
message_tracer
Message broker segments.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
message_tracer.segment_parameters.enabled |
boolean | true |
NEW_RELIC_MESSAGE_TRACER_SEGMENT_PARAMETERS_ENABLED |
Adds message parameters (such as routing keys and queue names) as attributes on message broker segments. |
opentelemetry
The OpenTelemetry bridge. See OpenTelemetry Bridge.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
opentelemetry.enabled |
boolean | false |
NEW_RELIC_OPENTELEMETRY_ENABLED |
Global switch for the whole OpenTelemetry feature. If it is set to false, any other sub-feature, e.g. traces, will not be enabled regardless of that specific sub-feature setting. |
opentelemetry.traces.enabled |
boolean | true |
NEW_RELIC_OPENTELEMETRY_TRACES_ENABLED |
Bridge OpenTelemetry tracing API calls into agent spans (when opentelemetry.enabled is true). |
opentelemetry.logs.enabled |
boolean | true |
NEW_RELIC_OPENTELEMETRY_LOGS_ENABLED |
Bridge OpenTelemetry logs API calls (when opentelemetry.enabled is true). |
opentelemetry.metrics.enabled |
boolean | true |
NEW_RELIC_OPENTELEMETRY_METRICS_ENABLED |
Export OpenTelemetry metrics API data to New Relic (when opentelemetry.enabled is true). |
opentelemetry.metrics.export_interval |
integer | 60000 |
NEW_RELIC_OPENTELEMETRY_METRICS_EXPORT_INTERVAL |
export_interval defines the number of milliseconds between each attempt to ship metrics to New Relic. This value must be equal to or greater than the value of export_timeout. |
opentelemetry.metrics.export_timeout |
integer | 10000 |
NEW_RELIC_OPENTELEMETRY_METRICS_EXPORT_TIMEOUT |
export_timeout defines the number of milliseconds an export operation is allowed in order to successfully complete. If the timeout is exceeded, it will be reported via the OpenTelemetry diagnostics API. |
plugins
Deprecated plugin settings.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
plugins.native_metrics.enabled |
boolean | true |
NEW_RELIC_NATIVE_METRICS_ENABLED |
Deprecated in favor of virtual_machine.collect_metrics.enabled; still honored and logs a deprecation warning when set. Deprecated (2026-11-12). |
process_host
How the host is named and displayed.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
process_host.display_name |
string | "" |
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME |
Configurable display name for hosts |
process_host.ipv_preference |
string | "4" |
NEW_RELIC_IPV_PREFERENCE |
ip address preference when creating hostnames One of 4, 6. |
profiling
Continuous profiling.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
profiling.enabled |
boolean | false |
NEW_RELIC_PROFILING_ENABLED |
Enables continuous CPU and heap profiling (requires the optional @datadog/pprof dependency). Forced to false by high security mode. |
profiling.include |
array | ["cpu", "heap"] |
NEW_RELIC_PROFILING_INCLUDE |
List of profile type names to enable. Only cpu and heap profiles are currently supported |
profiling.delay |
integer | 0 |
NEW_RELIC_PROFILING_DELAY |
Delay in milliseconds before starting profiler. |
profiling.duration |
integer | 0 |
NEW_RELIC_PROFILING_DURATION |
If >0, stop profiler after this many milliseconds of operation. |
profiling.source_mapping.enabled |
boolean | false |
NEW_RELIC_PROFILING_SOURCE_MAPPING_ENABLED |
When set to true, resolves profiler frames to their original source files/lines using source maps, instead of the compiled output. |
profiling.sample_interval |
integer | 100 |
NEW_RELIC_PROFILING_SAMPLE_INTERVAL |
The interval in milliseconds at which to harvest and ingest profile data. |
rules
Transaction naming and ignoring rules applied to request URLs. See Transaction Naming.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
rules.name |
array | [] |
NEW_RELIC_NAMING_RULES |
A list of rules of the format {pattern: 'pattern', name: 'name'} for matching incoming request URLs and naming the associated New Relic transactions. Both pattern and name are required. Additional attributes are ignored. |
rules.ignore |
array | ["^/socket.io/.*/xhr-polling/"] |
NEW_RELIC_IGNORING_RULES |
A list of patterns for matching incoming request URLs to be ignored by the agent. Patterns may be strings or regular expressions. By default, socket.io long-polling is ignored. |
security
Settings consumed by the New Relic security agent (IAST/RASP). security.agent.enabled loads the agent; security.enabled toggles event generation.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
security.enabled |
boolean | false |
NEW_RELIC_SECURITY_ENABLED |
Toggles the generation of security events by the security agent. |
security.agent.enabled |
boolean | false |
NEW_RELIC_SECURITY_AGENT_ENABLED |
Loads and starts the @newrelic/security-agent package at startup. |
security.mode |
string | "IAST" |
NEW_RELIC_SECURITY_MODE |
Security agent provides two modes: IAST and RASP. Default is IAST. One of IAST, RASP. |
security.validator_service_url |
string | "wss://csec.nr-data.net" |
NEW_RELIC_SECURITY_VALIDATOR_SERVICE_URL |
Security agent validator URL. Must be prefixed with wss://. |
security.detection.rci.enabled |
boolean | true |
NEW_RELIC_SECURITY_DETECTION_RCI_ENABLED |
Security agent: detect remote code injection. |
security.detection.rxss.enabled |
boolean | true |
NEW_RELIC_SECURITY_DETECTION_RXSS_ENABLED |
Security agent: detect reflected cross-site scripting. |
security.detection.deserialization.enabled |
boolean | true |
NEW_RELIC_SECURITY_DETECTION_DESERIALIZATION_ENABLED |
Security agent: detect unsafe deserialization. |
security.iast_test_identifier |
string | "" |
NEW_RELIC_SECURITY_IAST_TEST_IDENTIFIER |
Unique test identifier when running IAST with CI/CD |
security.scan_controllers.iast_scan_request_rate_limit |
integer | 3600 |
NEW_RELIC_SECURITY_SCAN_CONTROLLERS_IAST_SCAN_REQUEST_RATE_LIMIT |
The maximum number of analysis probes or requests that can be sent to the application in one minute. |
security.scan_controllers.scan_instance_count |
integer | 0 |
NEW_RELIC_SECURITY_SCAN_CONTROLLERS_SCAN_INSTANCE_COUNT |
The number of application instances for a specific entity where IAST analysis is performed. Values are 0 or 1, 0 signifies run on all application instances |
security.scan_schedule.delay |
integer | 0 |
NEW_RELIC_SECURITY_SCAN_SCHEDULE_DELAY |
The delay field specifies the time in minutes before an IAST scan begins after the application starts |
security.scan_schedule.duration |
integer | 0 |
NEW_RELIC_SECURITY_SCAN_SCHEDULE_DURATION |
The duration field specifies the amount of time in minutes that the IAST scan will run |
security.scan_schedule.schedule |
string | "" |
NEW_RELIC_SECURITY_SCAN_SCHEDULE_SCHEDULE |
The schedule field specifies a unix cron expression that defines when the IAST scan should run. By default, schedule is disabled |
security.scan_schedule.always_sample_traces |
boolean | false |
NEW_RELIC_SECURITY_SCAN_SCHEDULE_ALWAYS_SAMPLE_TRACES |
Allows IAST to actively collect trace data in the background and the security agent will use this collected data to perform an IAST scan at the scheduled time |
security.exclude_from_iast_scan.api |
array | [] |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_API |
Ignore specific APIs from IAST analysis. The regex pattern should provide a full match for the URL without the endpoint. |
security.exclude_from_iast_scan.http_request_parameters.header |
array | [] |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_HTTP_REQUEST_PARAMETERS_HEADER |
— |
security.exclude_from_iast_scan.http_request_parameters.query |
array | [] |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_HTTP_REQUEST_PARAMETERS_QUERY |
— |
security.exclude_from_iast_scan.http_request_parameters.body |
array | [] |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_HTTP_REQUEST_PARAMETERS_BODY |
— |
security.exclude_from_iast_scan.iast_detection_category.insecure_settings |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_INSECURE_SETTINGS |
— |
security.exclude_from_iast_scan.iast_detection_category.invalid_file_access |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_INVALID_FILE_ACCESS |
— |
security.exclude_from_iast_scan.iast_detection_category.sql_injection |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_SQL_INJECTION |
— |
security.exclude_from_iast_scan.iast_detection_category.nosql_injection |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_NOSQL_INJECTION |
— |
security.exclude_from_iast_scan.iast_detection_category.ldap_injection |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_LDAP_INJECTION |
— |
security.exclude_from_iast_scan.iast_detection_category.javascript_injection |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_JAVASCRIPT_INJECTION |
— |
security.exclude_from_iast_scan.iast_detection_category.command_injection |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_COMMAND_INJECTION |
— |
security.exclude_from_iast_scan.iast_detection_category.xpath_injection |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_XPATH_INJECTION |
— |
security.exclude_from_iast_scan.iast_detection_category.ssrf |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_SSRF |
— |
security.exclude_from_iast_scan.iast_detection_category.rxss |
boolean | false |
NEW_RELIC_SECURITY_EXCLUDE_FROM_IAST_SCAN_IAST_DETECTION_CATEGORY_RXSS |
— |
serverless_mode
Serverless (AWS Lambda) mode. See Serverless and Cloud.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
serverless_mode.enabled |
boolean | true if AWS_LAMBDA_FUNCTION_NAME is set, else false |
NEW_RELIC_SERVERLESS_MODE_ENABLED |
Specifies whether the agent will be used to monitor serverless functions (e.g. AWS Lambda). Defaults to true when the AWS_LAMBDA_FUNCTION_NAME environment variable is present, false otherwise. |
slow_sql
Slow query samples. Queries must exceed transaction_tracer.explain_threshold and transaction_tracer.record_sql must not be off.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
slow_sql.enabled |
boolean | false |
NEW_RELIC_SLOW_SQL_ENABLED |
Enables and disables slow_sql recording. |
slow_sql.max_samples |
integer | 10 |
NEW_RELIC_MAX_SQL_SAMPLES |
Sets the maximum number of slow query samples that will be collected in a single harvest cycle. |
span_events
Span events used by distributed tracing.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
span_events.enabled |
boolean | true |
NEW_RELIC_SPAN_EVENTS_ENABLED |
Enables/disables span event generation |
span_events.attributes.enabled |
boolean | true |
NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_ENABLED |
If true, the agent captures attributes from span events. |
span_events.attributes.exclude |
array | [] |
NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_EXCLUDE |
Prefix of attributes to exclude in span events. Allows * as wildcard at end. |
span_events.attributes.include |
array | [] |
NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_INCLUDE |
Prefix of attributes to include in span events. Allows * as wildcard at end. |
span_events.max_samples_stored |
integer | 2000 |
NEW_RELIC_SPAN_EVENTS_MAX_SAMPLES_STORED |
The agent will collect all events up to this number per minute. If there are more than that, a statistical sampling will be collected. |
strip_exception_messages
Error message redaction.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
strip_exception_messages.enabled |
boolean | false |
NEW_RELIC_STRIP_EXCEPTION_MESSAGES_ENABLED |
When true, the agent will redact the messages of captured errors. |
transaction_events
Transaction events (one per transaction).
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
transaction_events.attributes.enabled |
boolean | true |
NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_ENABLED |
If true, the agent captures attributes from transaction events. |
transaction_events.attributes.exclude |
array | [] |
NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_EXCLUDE |
Prefix of attributes to exclude in transaction events. Allows * as wildcard at end. |
transaction_events.attributes.include |
array | [] |
NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_INCLUDE |
Prefix of attributes to include in transaction events. Allows * as wildcard at end. |
transaction_events.enabled |
boolean | true |
NEW_RELIC_TRANSACTION_EVENTS_ENABLED |
If this is disabled, the agent does not collect, nor try to send, analytic data. |
transaction_events.max_samples_stored |
integer | 10000 |
NEW_RELIC_TRANSACTION_EVENTS_MAX_SAMPLES_STORED |
The agent will collect all events up to this number per minute. If there are more than that, a statistical sampling will be collected. |
transaction_segments
Attribute rules for transaction trace segments.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
transaction_segments.attributes.enabled |
boolean | true |
NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_ENABLED |
If true, the agent captures attributes from transaction segments. |
transaction_segments.attributes.exclude |
array | [] |
NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_EXCLUDE |
Prefix of attributes to exclude in transaction segments. Allows * as wildcard at end. |
transaction_segments.attributes.include |
array | [] |
NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_INCLUDE |
Prefix of attributes to include in transaction segments. Allows * as wildcard at end. |
transaction_tracer
Slow transaction traces and SQL capture.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
transaction_tracer.attributes.enabled |
boolean | true |
NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_ENABLED |
If true, the agent captures attributes from transaction traces. |
transaction_tracer.attributes.exclude |
array | [] |
NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_EXCLUDE |
Prefix of attributes to exclude from transaction traces. Allows * as wildcard at end. |
transaction_tracer.attributes.include |
array | [] |
NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_INCLUDE |
Prefix of attributes to include in transaction traces. Allows * as wildcard at end. |
transaction_tracer.enabled |
boolean | true |
NEW_RELIC_TRACER_ENABLED |
Whether to collect & submit slow transaction traces to New Relic. The instrumentation is loaded regardless of this setting, as it's necessary to gather metrics. Disable the agent to prevent the instrumentation from loading. |
transaction_tracer.transaction_threshold |
number or string | "apdex_f" |
NEW_RELIC_TRACER_THRESHOLD |
Sets the time, in seconds, for a transaction to be considered slow. When a transaction exceeds this threshold, a transaction trace will be recorded. When set to 'apdex_f', the threshold will be set to 4 * apdex_t, which with a default apdex_t value of 500 milliseconds will be 2 seconds. |
transaction_tracer.top_n |
integer | 20 |
NEW_RELIC_TRACER_TOP_N |
Increase this parameter to increase the diversity of the slow transaction traces recorded by your application over time. Confused? Read on. |
transaction_tracer.record_sql |
string | "obfuscated" |
NEW_RELIC_RECORD_SQL |
This option affects both slow-queries and record_sql for transaction traces. It can have one of 3 values: 'off', 'obfuscated' or 'raw' When it is 'off' no slow queries will be captured, and backtraces and sql will not be included in transaction traces. One of off, obfuscated, raw. |
transaction_tracer.explain_threshold |
integer | 500 |
NEW_RELIC_EXPLAIN_THRESHOLD |
This option affects both slow-queries and record_sql for transaction traces. This is the minimum duration a query must take (in ms) for it to be considered for for slow query and inclusion in transaction traces. |
url_obfuscation
Rewrites URLs before they are recorded, using a regular expression replace.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
url_obfuscation.enabled |
boolean | false |
NEW_RELIC_URL_OBFUSCATION_ENABLED |
Toggles whether to obfuscate URL parameters |
url_obfuscation.regex.pattern |
string | null |
NEW_RELIC_URL_OBFUSCATION_REGEX_PATTERN |
Must be a valid regular expression. |
url_obfuscation.regex.flags |
string | "" |
NEW_RELIC_URL_OBFUSCATION_REGEX_FLAGS |
A string containing RegEx flags to use when matching URL parameters |
url_obfuscation.regex.replacement |
string | "" |
NEW_RELIC_URL_OBFUSCATION_REGEX_REPLACEMENT |
A string containing a replacement value for URL parameters can contain references to capture groups in the pattern |
utilization
Cloud and container detection, and overrides of reported host facts.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
utilization.detect_aws |
boolean | true |
NEW_RELIC_UTILIZATION_DETECT_AWS |
This flag dictates whether the agent attempts to reach out to AWS to get info about the vm the process is running on. |
utilization.detect_pcf |
boolean | true |
NEW_RELIC_UTILIZATION_DETECT_PCF |
This flag dictates whether the agent attempts to detect if the the process is running on Pivotal Cloud Foundry. |
utilization.detect_azure |
boolean | true |
NEW_RELIC_UTILIZATION_DETECT_AZURE |
This flag dictates whether the agent attempts to reach out to Azure to get info about the vm the process is running on. |
utilization.detect_azurefunction |
boolean | true |
NEW_RELIC_UTILIZATION_DETECT_AZUREFUNCTION |
This flag dictates whether the agent attempts to read environment variables and invocation context to get info about the Azure Function called. |
utilization.detect_docker |
boolean | true |
NEW_RELIC_UTILIZATION_DETECT_DOCKER |
This flag dictates whether the agent attempts to read files to get info about the container the process is running in. |
utilization.detect_gcp |
boolean | true |
NEW_RELIC_UTILIZATION_DETECT_GCP |
This flag dictates whether the agent attempts to reach out to GCP to get info about the vm the process is running on. |
utilization.detect_kubernetes |
boolean | true |
NEW_RELIC_UTILIZATION_DETECT_KUBERNETES |
This flag dictates whether the agent attempts to reach out to Kubernetes to get info about the container the process is running on. |
utilization.logical_processors |
number | null |
NEW_RELIC_UTILIZATION_LOGICAL_PROCESSORS |
Override the detected number of logical processors reported for billing/utilization. |
utilization.billing_hostname |
string or null | null |
NEW_RELIC_UTILIZATION_BILLING_HOSTNAME |
Override the host name reported for billing/utilization. |
utilization.total_ram_mib |
integer | null |
NEW_RELIC_UTILIZATION_TOTAL_RAM_MIB |
Override the detected total RAM (MiB) reported for billing/utilization. |
utilization.gcp_use_instance_as_host |
boolean | true |
NEW_RELIC_UTILIZATION_GCP_USE_INSTANCE_AS_HOST |
Deprecated and will be removed in v15 of the agent. Please use utilization.gcp_cloud_run.use_instance_as_host instead. When enabled, it will use the GCP metadata id to set the hostname of the running application (Services, Worker Pools, and Jobs). |
utilization.gcp_cloud_run.include_revision_in_host |
boolean | false |
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. |
utilization.gcp_cloud_run.use_instance_as_host |
boolean | true |
NEW_RELIC_UTILIZATION_GCP_CLOUD_RUN_USE_INSTANCE_AS_HOST |
When enabled, it will use the GCP metadata id to set the hostname of the running application (Services, Worker Pools, and Jobs). |
virtual_machine
V8 virtual machine metrics (garbage collection, memory, CPU).
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
virtual_machine.collect_metrics.enabled |
boolean | true |
NEW_RELIC_VIRTUAL_MACHINE_COLLECT_METRICS_ENABLED |
When enabled, metrics about the V8 virtual machine will be collected. Metrics include information pertaining to garbage collection, memory usage, and CPU usage. This will populate the "Node VMs" section of the monitored application's dashboard. |
worker_threads
Running inside worker threads.
| Setting | Type | Default | Env var | Description |
|---|---|---|---|---|
worker_threads.enabled |
boolean | false |
NEW_RELIC_WORKER_THREADS_ENABLED |
Allow the agent to start inside a worker thread (not officially supported). |