
At the end of a transaction, it assembles the highest priority segments to report in a transaction trace.įor long-running PHP processes with hundreds of thousands or millions of function calls, setting this to a value greater than 1 prevents the PHP agent from exhausting system memory when recording segments. The default value for this configuration is 0, indicating that the PHP agent shall capture all segments during a web transaction. Each segment represents a method or a function call in a transaction trace. The PHP agent reports transaction traces and distributed traces as a collection of segments. Once that maximum is reached sampling will occur. Specifies the maximum number of segments the PHP agent shall record for web transactions. This is available for agent version 9.2.0.247 or higher. To connect to a daemon that is running on a different host (helpful for container environments), set this value to host:port, where host denotes either a host name or an IP, and port denotes a valid port number. To use an abstract socket, use the value (available for agent version 5.2.0.141 or higher).

To use a standard TCP port, specify a number in the range 1 to 65534. This is the default on non-Linux systems. To use a specified file as a UNIX domain socket (UDS), provide an absolute path name as a string. Sets the socket endpoint for agent to daemon communications. If both values are set, takes precedence. You can use either to specify the location of the New Relic PHP daemon. In a browser, review the output of a page containing the script:įrom v9.2.0.247, the PHP agent supports a new setting, ,which serves as an alias to. ini files.įrom the command line, review the output of php -i. This is usually the default if you have installed or compiled PHP yourself with no special options. Exactly which file you need to edit depends on how your particular version (or versions) of PHP were configured. In some cases, you may be instructed to add configuration options to your php.ini file. By default it will attempt to create a configuration file named newrelic.ini. Configuration file variablesĭuring installation, the newrelic-install script provides information about the configuration files it created or a list of files you need to edit. Server-side configuration is not applicable. Per-directory settings override the php.ini file settings.

With New Relic's PHP agent, API settings override per-directory configuration settings. The only values you can change in the UI for apps using the PHP agent are the app's alias and its Apdex-T value. Here is a simple illustration of the order of precedence that the PHP agent follows for configuration. Otherwise, they may not take effect immediately. Always restart your web server after changing INI settings.
