Problem
You are not seeing AJAX data for your browser app.
Solution
If your application is instrumented with browser monitoring and is correctly collecting data for other Pro features, follow these steps:
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 browser Pro.
Single-page app monitoring: Fetch is supported for AJAX requests within a browser interaction with SPA monitoring.
If you are making requests using JSONP, see JSONP requirements.
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.
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.
If your requests use JSONP, see requirements and notes on functionality below:
If your requests use JSONP, these requests will not appear on the AJAX UI page. However, you can view them as assets within session traces. If using SPA monitoring, you can view them on the Breakdown tab of the Page views page.
Requirements for JSONP to be recognized:
- Each JSONP request must use a unique callback function. Most popular libraries (like jQuery) generate a unique callback function dynamically for each request.
- The query string callback must be named
"callback"
or"cb"
in order to be recognized by New Relic. This is the default behavior in most popular libraries.