• /
  • EnglishEspañolFrançais日本語한국어Português
  • 로그인지금 시작하기

How to debug the New Relic Browser Agent

Problem

You need to debug an issue with the New Relic Browser Agent and want to to better understand live agent behaviors and data collection.

Solution

If your application is instrumented with and you want to inspect agent activity, follow these steps:

Enable debug logging

To get more insight into the agent's activity, enable debug logging.

The browser agent emits warning codes using console.debug, and this setting will capture those logs to your New Relic browser application, helping you track agent activity and problems.

Inspect agent logs

To inspect locally, open your browser's developer console and look for debug messages prefixed with New Relic Warning:. These messages indicate agent issues, tied to known warning codes.

To inspect agent logs across all instances of your web application, check your logs on one.newrelic.com.

These logs can help you identify known issues with the browser agent and its configuration within your pages.

Monitor network requests

Use the Network tab in your browser's developer tools to monitor requests sent by the agent. Look for calls to domains like bam.nr-data.net or js-agent.newrelic.com.

If you see failed requests or errors, check for network issues, ad blockers, or CSP rules that might be interfering with agent communication.

Expected endpoints under js-agent.newrelic.com:

  • PageView: /
  • AjaxRequest, BrowserInteraction, PageViewTiming: /events
  • PageAction, BrowserPerformance, UserAction, Custom Events: /ins
  • Log: /browser/logs
  • JavaScriptError, Ajax Timeslice Metrics: /jserrors/
  • SessionReplay, SessionTrace: browser/blobs

Use inspection events for troubleshooting

The agent emits inspection events that can be captured for deeper troubleshooting. To listen for these events, you can add a listener in your console:

document.addEventListener('newrelic', function(e) {
console.log('NR Inspection Event:', e.detail);
});

This will log inspection events emitted by the agent, providing details about feature status, errors, lifecycles, harvesting and configuration.

Note: Inspection events are available in agent versions 1.285.0 and higher. Inspection events are emitted immediately upon creation in the agent, any events emitted by the agent before the above event listener is created on the end-user machine will be missed.

If you need further assistance with debugging or interpreting inspection events, or debugging problems with your web application and New Relic, visit support.newrelic.com for help.

Copyright © 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.