Code-level metrics allow developers using the New Relic CodeStream extension to see APM data displayed contextually in their IDE, alongside individual methods in the code. This allows developers to be more proactive about addressing performance issues as they write and review code.
Getting started
First, install the New Relic CodeStream extension into your supported IDE of choice and log in.
Important
Code-level metrics are available in the PHP agent version 10.4.0 or higher, and enabled by default for versions 10.6.0 and higher. To change this configuration, check out our documentation.
Agent attributes
The PHP agent reports and attaches the following attributes to spans produced by your application:
Name | Description | Example |
---|---|---|
| The name of the instrumented function | createProduct |
| The absolute path to the source code file in which | /symfony/symfony_app/src/Controller/ProductController.php |
| The line number where | 16 |
| The namespace (class/ module name) in which | App\Controller\ProductController |
Important
Code-level metrics are only supported for PHP version 7.0 or higher.