Troubleshoot AJAX data collection

Problem

You are not seeing AJAX data for your New Relic Browser application.

Solution

If your application is instrumented with New Relic Browser and is correctly collecting other Browser Pro data, follow these steps:

1. Verify you use XMLHttpRequest.

Check whether your application uses the XMLHttpRequest object to make AJAX calls.

  • Browser monitoring: Other methods (including the newer Fetch API) currently are not supported when using New Relic's Browser Pro agent.
  • Single-page app monitoring: Fetch is supported for AJAX requests within a BrowserInteraction when using New Relic's SPA monitoring.

If you are making requests through JSONP, these requests will not appear as AJAX. However, you can view them as assets within New Relic Browser's session traces.

2. Verify the object is instrumented.

If you are using XMLHttpRequest, use your browser's dev console to verify that the object has been instrumented by New Relic. Enter the object name at your console.

If instrumentation has succeeded, the console should return something like:

function (t){var e=new p(t);try{u.emit("new-xhr"...

If instrumentation failed, you will see something like:

function XMLHttpRequest() { [native_code] }

If you see this type of failure response, see Troubleshooting Browser monitoring installation. If you see a different response, you may be using another script or library that is conflicting with New Relic instrumentation. Contact support at support.newrelic.com.

3. Verify network access.

If the object is properly instrumented, try triggering an AJAX call in your application while monitoring network traffic in the browser's developer tools. Wait up to one minute, and look for a call to bam.nr-data.net/jserrors with an xhr parameter. If the call fails, check for network issues.

If you don't see this call, if it fails with an error not related to network access, or if it succeeds but you still aren't seeing data, get support at support.newrelic.com.

For more help

Additional documentation resources include:

Discuss Browser monitoring in the New Relic Online Technical Community! Troubleshoot and ask questions, or discuss JavaScript error reporting or AJAX timing in detail.

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