Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Why aren't AJAX requests getting reported in the EUM application?

If you do not see AJAX requests being reported, below are a few things you should check:

 
1. The AJAX page name limit is getting hit.
Each EUM application can register up to 500 AJAX page names by default. If the AJAX requests are overflowing, this will limit all of the new AJAX requests that are not already registered with a page and they will get dropped on the EUM side.
 
This can be seen in the eum-processor.log if the logging is set to DEBUG in EUM/eum-procesor/bin/logback.xml.
 
2. The max AJAX limit is getting hit.
By default, the JavaScript Agent limits the AJAX requests sent for base or virtual pages to 50. Although base or virtual pages normally do not send large amounts of AJAX requests, in some cases, a page may send redundant AJAX requests, especially those containing error reports.
 
For example, a series of redundant AJAX requests containing a dead loop of errors and exceptions with no new information could overload the EUM Server. To prevent an overload of AJAX requests, you can configure the JavaScript Agent to limit the number of AJAX requests sent for the base and virtual pages.
 
The code example below limits the number of AJAX request per base or virtual page to 7.
 
<head>
   <script type='text/javascript' charset='UTF-8'>
      window["adrum-start-time"] = new Date().getTime();
      window['adrum-config'] = {
         xhr: {
            maxPerPageView: 7
         }
      };
      ...  
   </script>
   <script src='//cdn.appdynamics.com/adrum/adrum-latest.js' type='text/javascript' charset='UTF-8'/>
   ...
</head>
 
3. The page is navigating to another page before the Adrum beacon is posted.
There can be situations when the base page or user triggered an AJAX call but, before the beacon reports it back to the EUM collector, the page redirects or the user navigates to another page and the last beacon gets aborted.
 
Little can be done since the browser will abort any pending requests in such cases, but you can turn off the buffer. By default, the beacon buffers 20 requests before going out or 5 seconds (whichever occurs first).
     
(function(config) {    
    config.channel = {        
        bufferMode: false    
    }    
    return config;
})(window[‘adrum-config’] || (window[‘adrum-config’] = {}));
 
4.  The AJAX causes a redirect to another page.
Similar to case 3, if the AJAX causes a redirect to another page, the beacon for the AJAX will not be prepared and it will be aborted.
 
5. The Async request is done through the FETCH API
The Fetch API provides an interface for fetching resources (including across the network). It will seem familiar to anyone who has used XMLHttpRequest, but the new API provides a more powerful and flexible feature set.
 
This is currently not supported by the AppDynamic JavaScript Agent and is still a work in progress. 
Version history
Revision #:
7 of 7
Last update:
‎07-27-2018 05:38 PM
Updated by:
 
Labels (1)
0 Kudos