Our includes strict security measures to provide a robust, standalone product with browser monitoring features. Before you install the browser agent, make sure your system meets these requirements.
Basic requirements
To report data to New Relic, your application must meet two basic requirements:
- The traffic to the application must be from clients able to load and execute browser JavaScript code.
- Clients accessing the application must be able to send data to New Relic through HTTP requests. HTTPS is required for the more advanced browser monitoring features.
중요
Browsers that subscribe to a disconnect list or that use content filtering extensions such as AdBlock may not be able to report data to New Relic. For example, if you are using the Enhanced Tracking Prevention disconnect list for Mozilla Firefox 69.0 or higher, you will need to change the default configuration.
Most typical browser applications meet these requirements, but some browser applications in restricted environments may have difficulty reporting data to New Relic. For example:
- Hybrid mobile applications
- Applications installed on unusual hardware, such as point-of-sale terminals or consumer appliances
For more information, review the instrumentation for browser monitoring documentation, then verify end-user network access.
Supported browsers
The browser agent officially supports the following browser versions:
- Chrome (previous 10 versions)
- Safari (previous 10 versions)
- Firefox (previous 10 versions)
- Edge (previous 10 versions)
Instrumentation and specific features may be compatible with other browsers or versions.
Exceptions | Comments |
---|---|
Paint timings | The
|
AJAX | AJAX timing features are not available with:
|
|
|
Session traces | Session traces are reported only from browsers that support the Resource Timing Specification. |
SHA-256 | New Relic can only monitor browsers that are compatible with SHA-256. |
중요
When you use browser monitoring with cookies, New Relic's cookies are a third-party cookie on your site, and may not store or work on certain web browsers used by your visitors. See the applicable browser's websites for details about their compatibility with third-party cookies.
APM agents
One way to deploy browser monitoring for an app is using one of our APM agents.
If you're deploying browser for an app already being monitored by APM, make sure your APM agent version supports browser monitoring:
- Go: Version 2.5.0 or higher
- Java: Version 3.4.0 or higher
- .NET: Version 2.20.25.0 or higher
- Node.js: Version 1.4.0 or higher
- PHP: Version 4.4.5.35 or higher
- Python: Version 2.10.1.9 or higher
- Ruby: Version 3.7.0.177 or higher
Supported frameworks and libraries
The browser agent collects data on sites that use many popular frontend frameworks and libraries. The browser agent monitors low-level JavaScript objects and methods, which may be wrapped or modified by other libraries and frameworks. As a result, the level of detail collected may vary from one framework to the next, and conflicts may occur with any library that modifies native JavaScript mechanics.
Compatibility exceptions | Comments |
---|---|
Zone.js | If you're using AngularJS and you want to use our SPA monitoring features, note that Zone.js versions 0.6.18 to 0.6.24 are not compatible with browser. In all cases, the browser agent must be loaded before Zone.js to avoid errors. |
Cypress.io | Browser is unable to properly instrument the
This will only affect customers running tests with the browser agent present in their code. Production applications should not be affected. |
html2pdf.js | This library is not compatible with our Pro+SPA agent due to the way this library wraps promises. If you're using this library, we recommend selecting the Pro agent type. |
MooTools | The browser agent is not compatible with MooTools versions older than |
Single page app (SPA) monitoring
To use the features related to single page app (SPA) monitoring, your app must meet these requirements.
SPA: Browser agent version
SPA monitoring requires an SPA-specific version of the browser snippet, available for browser agent version 885 or higher. This version of the agent is enabled by default.
SPA: Browser types
SPA monitoring requires the addEventListener
browser API and the Navigation Timing API. Both APIs are available in all modern browsers, including Google Chrome, Mozilla Firefox, Apple Safari, and Microsoft Internet Explorer (IE) versions 9 or higher.
SPA: Framework requirements
Because SPA instrumentation works by wrapping low-level browser APIs, it is framework-agnostic. SPA instrumentation is compatible with most SPA frameworks, such as Angular, Backbone, Ember, and React. It can also instrument requests made using JSONP.
Below are known compatibility issues:
- If your application uses AngularJS and you want to use browser's SPA monitoring capabilities, Zone.js versions 0.6.18-0.6.24 are not compatible with the SPA agent.
- The html2pdf.js library is not compatible with the SPA agent.
- Angular versions 12 through 14 contains a limitation around the size of individual script elements contained within the index HTML source. See this troubleshooting page for more information.
- Next.JS has a known incompatibility since version 13.3.2-canary.2 where using the app router can result in links on the page not working. See this troubleshooting page for more information.
SPA: Security for hash fragments
We collect and save hash fragments from route change URLs. If you use hashes to pass private or sensitive data, that data may be visible to your New Relic account users. Follow browser's guidelines for security with data collection and reporting.
Content Security Policy (CSP) considerations
In order to obtain accurate browser performance metrics, our browser monitoring requires the use of a small, inline JavaScript snippet. New Relic carefully reviews the inline JavaScript to prevent Cross-Site Scripting (XSS) and other potential vulnerabilities.
Content Security Policy Level 2 adds restrictions to the types of JavaScript allowed, such as inline scripts. It also limits which domains can load scripts during page load.
중요
If your website does not allow any third-party hosted JavaScript to run, you must request a CSP exception via your organization’s standard procedures in order to install the browser monitoring agent.
When requesting a CSP exception, follow your organization's standard procedures to contact your web or security team. The CSP exceptions for your use case depend on the browser agent version you're currently running. We always recommend updating to the latest version of the browser agent.
You can add all of these exceptions to the fallback default-src
directive (instead of script-src
and connect-src
). The browser agent requires the following CSP exceptions:
CSP exception | Comments |
---|---|
| Add to the |
| Add to the |
| The agent attempts to send payloads to subdomains of
|
nonce
support
Starting with browser agent 1.247.0, the agent will respect a nonce
attribute attached to the inline script when loading additional code chunks. If your site or infrastructure is capable of injecting a nonce
attribute on the inline browser agent script, you will only need to request a CSP exception for connect-src
.
중요
Our integrated nonce
support doesn't apply to the usage of the browser agent npm package. With the npm package, the agent becomes a part of your site or app code. Any additional chunks loaded will be done so through your app code and you have complete control over when and if a nonce
attribute is used.
Some APM agents capable of injecting the browser agent also support adding a nonce
attribute to the injected script.
APM agent | Minimum version | Support note |
---|---|---|
Go | Supports injecting the JavaScript snippet via the | |
Java | Supports adding | |
.NET | Supports adding | |
Node.js | Supports adding | |
Ruby | Supports adding |
Proxy support
중요
This feature is currently available for those using the copy/paste or npm browser installation methods. There are currently no UI or NerdGraph configuration options available. We're continuing to work on improving access to these and other configuration options.
Starting with browser agent 1.240.0, the agent can be configured to proxy network requests through another domain and path combination that you control. Depending on your proxy configuration and CSP settings, you may not need to request exceptions for adding New Relic domains to script-src
and connect-src
. Check out our proxy docs for more information including a guide on configuring the agent.
Sub-Resource Integrity (SRI)
The browser agent utilizes code splitting to make the inline snippet of code as small as possible. The additional code necessary for the agent to function is loaded at runtime from our content delivery network (CDN). As an added layer of security, beginning with browser agent 1.247.0, the agent snippet contains hashes of all additional code chunks that could be loaded during runtime. These hashes are used by the browser to verify the code loaded from the CDN hasn't been unintentionally modified, either on the CDN or while in transit via a man-in-the-middle attack.
중요
SRI hashes don't apply to usage of the browser agent npm package. With the npm package, the agent becomes a part of your site or app code making our generated hashes invalid.
For more information on how SRI security works, see this MDN article.