Java agent configuration: Config file

The New Relic Java agent reads its configuration from the newrelic.yml file. By default the agent looks for this file in the directory that contains newrelic.jar. You can override the config file's location by setting the newrelic.config.file system property to a fully qualified file name.

Configuration file structure

The newrelic.yml file is split into stanzas corresponding to different environments:

  • Test
  • Development
  • Staging
  • Production (default)

New Relic applies settings in the common stanza to each of these environments. You can select other environments as the default by setting the newrelic.environment system property to the environment name.

A newrelic.yml template is available.

If you edit newrelic.yml, be careful to conform to the YAML format. Use a YAML validator to ensure the syntax is accurate before using the file with New Relic's Java agent, and follow these rules:

Java agent newrelic.yml Requirements
Format

YML files are case sensitive.

Indentations

All indentations must be in increments of two characters. Other indentations will result in an Unable to parse configuration file error upon agent startup.

  • Use the same level of indentation for data in the same stanza of the file.
  • Indent any sub-stanzas by an additional two spaces.
Changes to file

You must restart your JVM host process for changes to take effect.

Exception: Property changes to log_level and audit_mode do not require a restart.

Configuration settings precedence

To override any setting in the config file, use a system property override. In certain environments, environment variables can also be used to override both the config file and the system properties. The environment variables primarily exist to support Heroku. When used, server-side configuration overrides all other configuration settings.

java-config-order.png
With the Java agent, server-side configuration overrides all other settings. Environment variables override Java system properties. Java properties override user configuration settings in your newrelic.yml file. User settings override the newrelic.yml default settings.

Configuring the Java extensions directory

The Java agent reads the configuration files on process startup. To identify the directory where the files are located, either create a new or specify an existing extensions directory:

Create an extensions directory

To create the extensions directory:

  1. Navigate to the directory where newrelic.jar and newrelic.yml are located. Create a directory named extensions.
  2. In newrelic.yml, check that the property extensions.dir is not set.
Specify an existing extensions directory

To use an existing Java extensions directory:

  1. In your newrelic.yml file, locate the common section.
  2. Use the property extensions.dir to specify the location of the file.

General configuration settings

Set these options in the common stanza. To override any of these options, use a newrelic.config prefixed system property.

license_key (REQUIRED)
Type String
Default (none)

This setting is required. You must specify the license key associated with your New Relic account. This key binds your agent's data to your account in the New Relic service.

app_name (HIGHLY RECOMMENDED)
Type String
Default (none)

Defines the application name used to report data to New Relic.

If enable_auto_app_naming is false, the agent reports all data to this application. Otherwise, the agent reports only background tasks (transactions for non-web applications) to this application.

To report data to more than one application, separate the application names with a semicolon. For example, to report data to My Application and My Application 2 use this:

app_name: My Application;My Application 2
agent_enabled
Type Boolean
Default true

Flag to enable the agent. Use this setting to force the agent to run or not run.

apdex_t
Deprecated
Type Float
Default 1.0

The apdex_t threshold in seconds for the application's Apdex score. For Java agent versions 1.2.008 or higher, the apdex_t value is set in the UI and the value in newrelic.yml is ignored. For more information, see Apdex.

appserver_port
Type Integer
Default (none)

Number to differentiate JVMs for the same app on the same machine. New Relic uses host/port for uniqueness, so you can distinguish the JVMs by putting a switch like this into the startup arguments for each JVM:

-Dnewrelic.config.appserver_port=8081

Once you have used appserver_port to name the JVMs and restart them, you should be able to see them individually in the dropdown and in the profiling interface.

This is only a change for New Relic; it doesn't actually affect the port on which the host communicates in any way.

audit_mode
Type Boolean
Default false

Enables plain text logging of all data sent to New Relic to the agent logfile. This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

ca_config_bundle
Type String
Default /path/to/ca/cert/bundle.pem

Specifies a path to a custom SSL certificate bundle.

enable_auto_app_naming
Type Boolean
Default false

Enables the reporting of data separately for each web app. Set to true to enable support for auto app naming. The name of each web app is detected automatically and the agent reports data separately for each one. This provides a finer-grained performance breakdown for web apps in New Relic.

See Automatic application naming.

enable_auto_transaction_naming
Type Boolean
Default true

Enables component-based transaction naming. Set to true to enable component-based transaction naming. Set to false to use the URI of a web request as the name of the transaction. For more information, see Naming web transactions.

Unless you implement API calls to name your transactions, disabling auto-transaction naming is very likely to cause Metric grouping issues.

enable_custom_tracing
Type Boolean
Default true

Enables all instrumentation using an @Trace annotation. Disabling this causes @Trace annotations to be ignored.

extensions.dir
Type String
Default (none)

Defines the location of the optional extensions directory. If this property is not set, the agent will look for a subdirectory named extensions in the same directory as newrelic.jar and newrelic.yml.

high_security
Type Boolean
Default false

In order for high security to be enabled, this property must be set to true and the high security property in the New Relic user interface must be enabled. Enabling high security means SSL is turned on, request and message queue parameters are not collected, and queries cannot be sent to New Relic in their raw form.

labels
Type String
Default ""

A dictionary of label names and values that will be applied to the data sent from this agent. May also be expressed as a semi-colon delimited string of colon-separated pairs (for example, Server:One;Data Center:Primary).

max_stack_trace_lines
Type Integer
Default 30

Limits the number of lines the agent collects from each stack trace. Increasing this value may impact performance, because it increases the amount of memory the agent uses and the amount of data sent to New Relic.

proxy_host
Type String
Default (none)

The proxy host through which to connect to the New Relic collector. If a proxy is used, the host setting is required. Other proxy settings are optional.

proxy_password
Type String
Default (none)

The password for proxy authentication. If a proxy is used, the host setting is required. Other proxy settings are optional. The username and password settings will be used to authenticate to Basic Auth challenges from a proxy server.

The Java agent supports Basic (clear text) authentication.

proxy_port
Type String
Default 8080

The proxy host port number. If a proxy is used, the host setting is required. Other proxy settings are optional.

proxy_user
Type String
Default (none)

The username for proxy authentication, such as Basic (clear text) authentication. If a proxy is used, the host setting is required. Other proxy settings are optional. The username and password settings will be used to authenticate to Basic Auth challenges from a proxy server.

send_data_on_exit
Type Boolean
Default false

Enable delayed JVM shutdown to give the agent a chance to send latest metric data to New Relic before JVM shutdown.

send_data_on_exit_threshold
Type Integer
Default 60

The number of seconds after which the agent will use the send_data_on_exit setting.

send_environment_info
Type Boolean
Default true

Enable reporting of JVM settings to New Relic.

send_jvm_props
Type Boolean
Default true

When set to true, JVM properties will be sent to New Relic.

ssl
Type Boolean
Default true

Requires connections to the New Relic collector to go over SSL.

The agent communicates with New Relic via HTTPS by default, and New Relic requires HTTPS for all traffic to New Relic APM and the New Relic REST API.

This work is done asynchronously to the threads that process your application code, so response times will not be directly affected by this change.

sync_startup
Type Boolean
Default false

Enable the agent to connect the New Relic collector immediately upon app startup.

Logging configuration

These are part of the general configuration variables. They are broken out here because they are frequently tweaked for debugging.

Some of the logging configuration variables are dynamic and do not need a host restart for them to take effect. For instance, if log files are growing too quickly, log_level can be set to a less verbose setting to reduce the reporting rate.

Here is the order of precedence for configuration variables affecting log rotation.

  • If log_daily is true, other log rotation settings are ignored.
  • If log_file_count is 1 or 0, the size limit is ignored.
  • Finally, the agent applies log_limit_in_kbytes.

Depending on the growth rate, it is possible for the log file size to exceed the configured value by a small amount.

log_daily
Type Boolean
Default false

Set to true to roll the logs daily. Overrides the other configuration variables that affect log rotation.

log_file_count
Type Integer
Default 1

The maximum number of log files to keep when using log rotation.

log_file_name
Type String
Default newrelic_agent.log

The unqualified log file name or the string STDOUT which will log to standard out.

log_file_path
Type String
Default (same directory as newrelic.jar)

The log file path.

log_level
Type String
Default info

The log verbosity level.

The agent uses its own log file to keep its logging separate from that of your application. Valid options, in order of verboseness, are:

  • off
  • severe
  • warning
  • info
  • fine
  • finer
  • finest

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

log_limit_in_kbytes
Type Integer
Default 0

The log file size in kilobytes at which log files are rotated. Set to 0 for no limit.

Attributes

To set these options, use the attributes stanza. To override them, use a newrelic.config.attributes prefixed system property.

Attributes are key-value pairs that provide information for transaction traces, traced errors, browser monitoring, and transaction events. There is also an attribute stanza under each destination. For more information, see Java agent attributes, Enabling and disabling attributes and Attribute examples.

enabled
Type Boolean
Default true

This setting can be used to turn on or off all attributes.

include
Type List of Strings
Default (none)

If attributes are enabled, attribute keys found in this list will be sent to New Relic. Separate the keys in the list with a comma; for example:

 key1, key2, key3

Also refer to the agent attribute rules.

exclude
Type List of Strings
Default (none)

All attribute keys found in this list will not be sent to New Relic. Separate the keys in the list with a comma; for example:

 key1, key2, key3

Also refer to the agent attribute rules.

Transaction tracer

These options are set in the transaction_tracer stanza and can be overridden by using a newrelic.config.transaction_tracer prefixed system property.

Transaction tracing captures deep information about slow transactions and sends this to the New Relic service once a minute. The transaction includes the exact call sequence of the transactions, including any query statements issued.

Do not use brackets [suffix] at the end of your transaction name. New Relic automatically strips brackets from the name. Instead, use parentheses (suffix) or other symbols if needed.

enabled
Type Boolean
Default true

The transaction tracer is enabled by default. Set this to false to turn it off.

explain_enabled
Type Boolean
Default true

Determines whether the agent will capture the EXPLAIN plan for slow queries. Only supported for MySQL and PostgreSQL.

explain_threshold
Type Float
Default 0.5

Threshold in seconds for query execution time below which the slow query and the EXPLAIN plan (if supported) will not be captured. Relevant to slow queries only when record_sql is set to raw or obfuscated. Relevant to EXPLAIN plans only when explain_enabled is set to true.

log_sql
Type Boolean
Default false

Set to true to enable logging of queries to the agent log file instead of uploading to New Relic. Queries are logged using the record_sql mode.

record_sql
Type String
Default obfuscated

When the transaction tracer is on, query statements can optionally be recorded. The recorder has three modes:

  • off: Send no queries.
  • raw: Send the query statement in its original form (optionally obfuscate the fields listed in the obfuscate_sql_fields setting).
  • obfuscated: Strips out numeric and string literals.
stack_based_naming (Play 2.x+ only)
Type Boolean
Default

False

Defaulted to true until Java agent version 3.12.1, when it was changed to false.

This option is for Play 2.x+ only. Play/Scala instrumentation can use Thread.getStackTrace() to improve tracer naming, but at the cost of increased overhead.

stack_trace_threshold
Type Integer
Default 0.5

This is the threshold at which segments will be given a stack trace in the transaction trace.

top_n
Type Integer
Default 20

Use this setting to control the variety of your transaction traces. top_n is an integer that represents the number of unique, slow transactions that traces will be created for.

  • If you want transaction traces to more accurately reflect the actual slowest transactions in your app, make this value lower.
  • If you want to sample a more diverse array of transactions, make the value higher.

A value of 0 would mean that only the slowest transaction is always traced. This is considered not to be optimal, though, because you may have one or two transactions that are always the slowest, and repeatedly seeing those same transaction traces will probably not give you much value.

If the same transaction is often the slowest, the top_n setting allows the Java agent (over time) to sample the slowest n transactions. This gives you greater variety and more insight into your application.

transaction_threshold
Type String (float)
Default apdex_f

The time threshold used to determine when a transaction is eligible to be traced. When the transaction's response time exceeds this threshold, a transaction trace will be recorded and sent to New Relic.

The default is apdex_f (default), which sets the threshold to be the "Frustrated" Apdex level (four times the apdex_t value). You can also set a specific time threshold by entering a float value that represents a number of seconds.

slow_query_whitelist
Type String
Default (none)

By default, high security mode does not allow the agent to collect slow queries. Enable this option to collect Cassandra queries from the DataStax driver, even with high security enabled. If you don't use high security, the agent collects slow queries automatically.

For DataStax driver 2.1.2, add this whitelist rule:

  transaction_tracer:
      slow_query_whitelist: 
       'com.newrelic.instrumentation.cassandra-datastax-2.1.2'

For DataStax driver 3.0.0, add this whitelist rule:

  transaction_tracer:
      slow_query_whitelist: 
       'com.newrelic.instrumentation.cassandra-datastax-3.0.0'
attributes.enabled
Type Boolean
Default true

This setting can be used to turn on or off all attributes for transaction traces. If attributes.enabled at the root level is false, no attributes will be sent to transaction traces regardless on how this property (transaction_tracer.attributes.enabled) is set.

attributes.include
Type List of strings
Default (none)

If attributes are enabled for transaction traces, all attribute keys found in this list will be sent to New Relic in transaction traces. For more information, see the agent attribute rules.

attributes.exclude
Type List of Strings
Default (none)

All attribute keys found in this list will not be sent to New Relic in transaction traces. For more information, see the agent attribute rules.

token_limit
Type Integer
Default 3000

Limits the number of Tokens that can be created per Transaction. Increasing this value may impact performance, because it increases the amount of memory the agent uses and the amount of data sent to New Relic.

segment_limit
Type Integer
Default 3000

Limits the number of segments that can be created per transaction. Increasing this value may impact performance, because it increases the amount of memory the agent uses and the amount of data sent to New Relic.

Browser monitoring

These options are set in the browser_monitoring stanza and can be overridden by using a newrelic.config.browser_monitoring prefixed system property.

New Relic Browser gives you insight into the performance real users are experiencing with your website. This is accomplished by measuring the time it takes for your users' browsers to download and render your web pages by injecting a small amount of JavaScript code into the header and footer of each page.

auto_instrument
Type Boolean
Default true

By default the agent automatically inserts API calls in compiled JSPs to inject the monitoring JavaScript into web pages. Set this attribute to false to turn off this behavior.

disabled_auto_pages
Type Comma-separated list of strings
Default (none)

When auto_instrument is true, by default all pages are instrumented. List all pages that you want the auto instrumentation to skip here. You can still use manual instrumentation on these pages.

For example:

browser_monitoring:
  disabled_auto_pages: /WEB-INF/jsp/testpage_1.jsp, /WEB-INF/jsp/testpage_2.jsp
attributes.enabled
Type Boolean
Default false

This setting can be used to turn on or off all attributes for browser monitoring. This is the data which gets sent to page views in Insights. If attributes.enabled is false at the root level, no attributes will be sent up in browser monitoring regardless on how this property under browser_monitoring is set.

attributes.include
Type List of Strings
Default (none)

If attributes are enabled for browser_monitoring, all attribute keys found in this list will be sent to New Relic in page views. For more information, see the agent attribute rules.

attributes.exclude
Type List of Strings
Default (none)

All attribute keys found in this list will not be sent to New Relic in page views. For more information, see the agent attribute rules.

Cross application tracer

These options are set in the cross_application_tracer stanza and can be overridden by using a newrelic.config.cross_application_tracer prefixed system property.

Cross application tracing adds request and response headers to external calls using the Apache HttpClient libraries. This provides better performance data when calling applications monitored by other New Relic Agents.

enabled
Type Boolean
Default true

Cross application tracing is enabled by default. Set this to false to turn it off.

Error collector

These options are set in the error_collector stanza and unless noted otherwise can be overridden by using a newrelic.config.error_collector prefixed system property.

The error collector captures information about uncaught exceptions and sends them to New Relic for viewing.

For an overview of error configuration in New Relic APM, see Java agent error configuration and Manage errors in APM.

enabled
Type Boolean
Default true

Enable error collection.

ignore_classes
Type Stanza containing a fully qualified class_name and an optional message per error class
Default (none)

Specified exception class names will be ignored and will not affect error rate or Apdex score, or be reported to APM. Contains yaml pairs consisting of class_name and message, the latter of which is optional and cannot be provided without an associated error class name. Cannot be specified by system property.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  ignore_classes:
    -
      class_name: "com.example.MyException"
      message: "Some error message to ignore"
    -
      class_name: "com.example.DifferentException"
ignore_classes.class_name
Type String representing a fully qualified exception class name
Default (none)

Fully qualified exception class name that should not be reported to APM. Cannot be specified by system property.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  ignore_classes:
    -
      class_name: "com.example.MyException"
ignore_classes.message
Type String representing an optional error message
Default (none)

Matches optional error message for an error class that should not be reported to APM. If the exception class name matches an error but the message does not, then that error will not be ignored. Message strings use contains for matching. A message cannot be provided on its own and must always be paired with a fully qualified class name. Cannot be specified by system property.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  ignore_classes:
    -
      class_name: "com.example.MyException"
      message: "Some error message to ignore"
ignore_status_codes
Type Comma-separated list of strings and ranges
Default 404

A comma-separated list comprised of individual and dashed ranges of HTTP status codes that should not be treated as errors.

If this property is commented out in the newrelic.yml configuration file, then the 404 status code will automatically be ignored. When using server-side configuration, the status code 404 must be specified in order for it to be ignored.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  ignore_status_codes: 404,507-511
expected_classes
Type Stanza containing a fully qualified class_name and an optional message per error class
Default (none)

Prevents specified exception classes from affecting error rate or Apdex score while still reporting the errors to APM. Contains yaml pairs consisting of class_name and message, the latter of which is optional and cannot be provided without an associated error class name. Cannot be specified by system property.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  expected_classes:
    -
      class_name: "com.example.MyException"
      message: "Some expected error message"
    -
      class_name: "com.example.DifferentException"
expected_classes.class_name
Type String representing a fully qualified error class name
Default (none)

Fully qualified exception class name to be marked as expected and thus prevented from affecting error rate or Apdex score. Cannot be specified by system property.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  expected_classes:
    -
      class_name: "com.example.MyException"
expected_classes.message
Type String representing an optional error message
Default (none)

Matches optional error message for an error class that should be marked as expected and thus prevented from affecting error rate or Apdex score. If the exception class name matches an error but the message does not, then that error will not be marked as expected, and therefore will affect error rate and Apdex score.

Message strings use contains for matching. A message string cannot be provided on its own; it must always be paired with a fully qualified class name. Cannot be specified by system property.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  expected_classes:
    -
      class_name: "com.example.MyException"
      message: "Some expected error message"
expected_status_codes
Type Comma-separated list of strings and ranges
Default (none)

A comma-separated list comprised of individual and dashed ranges of HTTP status codes to be marked as expected and thus prevented from affecting error rate or Apdex score.

This setting is dynamic, so running agents will notice changes to newrelic.yml without a JVM restart.

For example:

error_collector:
  expected_status_codes: 415,500-506
attributes.enabled
Type Boolean
Default true

This setting can be used to turn on or off all attributes for traced errors. If attributes.enabled is false at the root level, then no attributes will be sent to traced errors regardless of how this property is set under error_collector.

attributes.include
Type List of strings
Default (none)

If attributes are enabled for traced errors, all attribute keys found in this list will be sent to New Relic in traced errors. For more information, see the agent attribute rules.

attributes.exclude
Type List of strings
Default (none)

Attribute keys found in this list will not be sent to New Relic in traced errors. For more information, see the agent attribute rules.

ignore_errors (DEPRECATED)
Type Comma-separated list of Strings
Default (none)

All specified exception class names specified will not be treated as errors. Deprecated as of Java agent 3.38.0 and replaced by ignore_classes.

For example:

error_collector:
  ignore_errors: some.other.MyException

Thread profiler

These options are set in the thread_profiler stanza and can be overridden by using a newrelic.config.thread_profiler prefixed system property.

Thread profiler measures wall clock time, CPU time, and method call counts in your application's threads as they run.

enabled
Type Boolean
Default true

Enable the thread profiler.

Transaction events

These options are set in the transaction_events stanza and can be overridden by using a newrelic.config.transaction_events prefixed system property.

Transaction events provide the data for displaying histograms and percentiles in the UI.

Previously this stanza was called analytic_events. If your configuration file still uses analytic_events, update your agent to use transaction_events.

enabled
Type Boolean
Default true

Enable the transactions events service.

max_samples_stored
Type Integer
Default 2000

The maximum number of data transaction samples stored in memory for the application.

attributes.enabled
Type Boolean
Default true

This setting can be used to turn on or off all attributes for transaction events. If attributes.enabled is false at the root level, then no attributes will be sent to transaction events regardless of how this property is set under transaction_events.

attributes.include
Type List of Strings
Default (none)

If attributes are enabled for transaction events, all attribute keys found in this list will be sent to New Relic in transaction events. For more information, see the agent attribute rules.

attributes.exclude
Type List of Strings
Default (none)

All attribute keys found in this list will not be sent to New Relic in transaction events. For more information, see the agent attribute rules.

Hostname configuration

These options are set in the process_host stanza and can be overridden by using a newrelic.config.process_host prefixed system property.

These properties are used for configuring the hostname displayed in the UI:

display_name
Type String
Default (none)

Set a display name to decorate the "host:port" label in the New Relic UI.

ipv_preference
Type String
Default 4

If the hostname cannot be determined, then the IP address of the host will be used. This property determines whether the IPv4 or IPv6 address should be used. The default is IPv4.

Custom instrumentation

These options set in the class_transformer stanza and can be overridden by using a newrelic.config.class_transformer prefixed system property.

trace_annotation_class_name
Type String
Default (none)

String containing the full class name of the annotation class the agent uses to determine which user-specified methods to instrument. For more information about custom annotations, see Java custom metric collection.

com.newrelic.instrumentation.servlet-user
Type Boolean
Default false

Enable this option to capture the userPrincipal name. This name is included as a transaction trace attribute, and can be queried in Insights.

System properties

You can override any setting in the newrelic.yml file by setting a system property. The system property corresponding to a given setting in the config file is setting name prefixed by newrelic.config. For example, the system property for the log_level setting is newrelic.config.log_level.

For settings nested in stanzas, prepend the stanza name to the setting name. For example, the system property for the enabled setting in the transaction_tracer stanza is newrelic.config.transaction_tracer.enabled.

In addition to overriding configuration settings, the following system properties are recognized by the agent:

newrelic.config.process_host.display_name
Type String
Default (none)

Set a display name to decorate the "host:port" label in the New Relic UI. Requires Java agent 3.17 or higher.

newrelic.config.file
Type String
Default (none)

String containing a fully qualified path to the newrelic configuration file. If empty, the agent assumes newrelic.yml is in the same directory as newrelic.jar.

newrelic.debug
Type Boolean
Default (none)

Enable debug logging.

newrelic.environment
Type String
Default (none)

String containing the environment configuration for the agent to use.

newrelic.home
Type String
Default (none)

String containing the home directory of agent. This defaults to the same directory as the agent jarfile.

newrelic.logfile
Type String
Default newrelic_agent.log

String containing the name of the agent log file.

Environment variables

Environment variables take the highest precedence and override the system properties and yml config settings.

  • To set environment variables, use the export VARNAME=value command.
  • To permanently set environment variables, add the export line to a file such as ~/.bashrc or ~/.bash_profile.
NEW_RELIC_APP_NAME
Type String
Default (none)

Contains the application name under which to report data to New Relic. Set the name of your application as you want it to appear in New Relic.

If enable_auto_app_naming is false, the agent reports all data to this application. Otherwise, the agent reports only background tasks (transactions for non-web applications) to this application.

To report data to more than one application, separate the application names with a semicolon ;. For example, to report data to My Application and My Application 2:

app_name: My Application;My Application 2
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME
Type String
Default (none)

Set a display name to decorate the "host:port" label in the New Relic UI.

NEW_RELIC_LICENSE_KEY (REQUIRED)
Type String
Default (none)

Contains your New Relic account license.

You must specify the license key associated with your New Relic account. This key binds your agent's data to your account in the New Relic service.

NEW_RELIC_LOG
Type String
Default newrelic_agent.log

The unqualified log file name or the string STDOUT which will log to standard out.

Cloud platform utilization

These options are set in the utilization stanza and can be overridden by using a newrelic.config.utilization prefixed system property.

The agent collects utilization information and sends it to the New Relic service to determine pricing. The agent can collect information from Amazon Web Services (AWS) EC2 instances and Docker containers.

detect_aws
Type Boolean
Default true

Determines whether the agent polls AWS metadata API.

detect_docker
Type Boolean
Default true

Determines whether the agent reads Docker information from the file system.

Async instrumentation

token_timeout
Type Integer
Default (seconds) 180

The number of seconds after which the agent will automatically expire an async token that has not been explicitly expired with token.expire(). For usage instructions, see Tokens: Connect async threads.

Increasing this value may impact performance, because it increases the amount of memory the agent uses and prevents transactions from being reported due to unexpired tokens.

segment_timeout
Type Integer
Default (seconds) 600

The number of seconds after which the agent will automatically end a segment that has not been explicitly ended with segment.end() or segment.ignore(). For usage instructions, see Segments: Time arbitrary async activity.

Increasing this value may impact performance, because it increases the amount of memory the agent uses and prevents transactions from being reported due to un-ended segments.

For more help

Additional documentation resources include:

Join the discussion about Java monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.