You can correlate page and Ajax requests with business transactions. The correlation is made between instances of page/Ajax requests (browser snapshots) and instances of business transactions (transaction snapshots). 

How Browser Application Network Requests Are Correlated

When an end user requests a page from your browser app:

  1. The App Agent:
    • Sends HTTP headers identifying the business transaction and the HTML with the injected JavaScript Agent to the end user's browser.
    • Aggregates backend metrics and sends them along with the business transaction identifiers to the Controller. This serves as the content for the transaction snapshot.
  2. The JavaScript Agent sends browser metrics and the business transaction identifiers (from the HTTP header) to the EUM Server. This serves as the content for the browser snapshot.
  3. The Controller fetches the metrics and business transaction identifiers from the EUM Server. These business transaction identifiers are then used to correlate the browser snapshot with the transaction snapshots.

View Business Transactions Correlated with Browser Applications

There are several ways to navigate from a browser snapshot to its correlated business transaction. The following steps show you one possible way.

  1. From the Browser App Dashboard, click Browser Snapshots.
  2. Click Filters and check the Server Snapshot Exists checkbox.
  3. You should now only see browser snapshots that have transaction snapshots:
    Browser Snapshots
  4. Double-click one of the browser snapshots to open the Browser Snapshot Details dialog containing a transaction snapshot.
    Browser Snapshot Details
  5. You can then click links in the transaction snapshot or transaction snapshot itself to view corresponding pages in APM.

Get Complete Timing Data for Correlated Business Transactions

This functionality is currently not supported for .NET Core.

To get the full real execution time for correlated business transactions, your injection method may need to write the JS_FOOTER variable to your page. Manual injection gives the server-side agent the ability to write data only to the header of the page as it is being constructed by your web application.

It is possible that complete business-transaction timing information is not available at the moment that the header data is written. Using the footer allows the server-side agent to write timing data at the footer of the page, by which time a fuller picture of business transaction timing may be available.

You can write the JS_FOOTER data variable into the footer of a web page using the following techniques:

  • If you use automatic injection for the injecting into the head element, you automatically get an injection into the footer as well.
  • If you use manual injection for the head element, for applications built on Java platforms you can use assisted injection to inject into the footer. Or for applications built on Java servlet or ASP.NET platforms, you can use assisted injection using attribute injection.

If you cannot add the JS_FOOTER variable to your page, the timing shown for correlated business transactions may be the average response time for that transaction rather than the real execution time for that specific page.

Avoid Tagging Cookies with the HttpOnly Flag

Servers set the HttpOnly flag on cookies to prevent their contents from being accessed by JavaScript. This is often done for session cookies to hide the session identifier as a security measure. The JavaScript Agent, however, needs to be able to read special cookies set by the AppDynamics server-side agent (all prefixed with ADRUM) to collect correlation information. If HttpOnly is set on these cookies, no server-side correlation information can be transmitted. Thus, make sure that your server does not set the HttpOnly flag on any cookies prefixed with ADRUM.

If you want to securely transmit cookies, use HTTPS. The app agent sets the secure flag if the originating base page is loaded over HTTPS. 

These can be turned off, but that would prevent correlation from working for base pages unless the customer changes the page source code to use footer injection.