PDFs


This page applies to an earlier version of the AppDynamics App IQ Platform.
See the latest version of the documentation.


On this page:

Related pages:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
53 rates

Automatic injection uses AppDynamics server-side agents to automatically add the adrum header and footer to each of your web pages.

Automatic injection is available only for server-side applications built on Jasper-supported JSP (Java) , ASP.NET or ASPX (.NET) frameworks. Also the server-side agent needs to be version 3.7 or better, as the process changed significantly between 3.6 and 3.7.  Best practice is to use the latest version of the server-side agent compatible with your Controller.

(info) To use automatic injection, your Browser RUM app must be created using the same application name as your server-side application.

Access the Automatic Injection Configuration Panel

  1. Open the EUM application in which you are interested.
  2. From the left navigation bar, select Configuration.
  3. Click the Web Javascript Instrumentation tab.
  4. Scroll down to the Advanced panel and expand it.
  5. Expand Advanced Instrumentation of your HTML Pages if it is closed.
  6. Click the Automatic JavaScript Injection tab.

Enable Automatic Injection

  1. In the Automatic JavaScript Injection tab, check or clear Enable Automatic Injection of JavaScript.
  2. If you enabled automatic injection click OK to confirm your action.

Set Attribute to Enable Automatic Injection for .NET

To perform automatic injection for .NET, the AppDynamics app agent detects the <head> element in the aspx page. This should be part of either the master page or the aspx page.

The <head> element must have the 'runat="server"' attribute set for automatic injection to work.

<head runat="server">

(info) This is not necessary for manual or assisted injection.

Inject the JavaScript Agent Before the Closing <head> Tag for .NET

You can use the node property eum-header-beforeendofheadtag to automatically inject the JavaScript Agent before the closing <head> tag for .NET applications. Follow the instructions in Add a Registered Node Property to add the node property eum-header-beforeendofheadtag and set it to true.

Inserting the JavaScript Agent right before the closing <head> tag will result in losing the timing details for the HTML elements loaded before the JavaScript Agent. Thus, we highly recommend manually injecting or using automation to inject the JavaScript Agent right after the opening <head> tag unless your use case necessitates otherwise.

Configure Automatic Injection

After you have enabled automatic injection:

  • You must specify the server-side business transactions for which automatic JavaScript injection is enabled.
  • You can limit which pages to inject by creating custom match and exclude rules for automatic injection. If you do not configure these rules, by default AppDynamics injects all pages visited by the enabled business transactions.

Use these rules to fine-tune which business transactions to include or exclude from injection based on match criteria. For example, you can exclude all business transactions that have a certain string in their URLs  or set a certain cookie. The configurations for include rules and exclude rules are similar. It depends on your situation whether it is more convenient to restrict transactions based on inclusion or exclusion.

Specify Business Transactions for Automatic Injection

You must select at least one business transaction for automatic injection.

  1. From the list on the right, select one or more business transactions.  Not all your business transactions may appear here - the list includes only those transactions that AppDynamics can parse for automatic injection, those based on Jasper-compiled JSPs or .Net ASP or ASPX pages.
  2. Click < Add to move the business transaction to the list on the left.
  3. Repeat until all the transactions you wish to enable are on the left and those you do not wish to enable are on the right.
  4. Click Save.

Create Match Rules for Automatic Injection

You may not wish to instrument every page in your application.  For example, if your application has a very large number of pages, you might want to instrument only the key ones for your business, to avoid hitting licensing limits. Or when you are in the set up and test phase, you might only want to instrument a few pages to keep your initial sample manageable. 

Use match rules to include or exclude certain pages

  1. Expand Only enable Automatic Injection for certain Pages if it is closed.
     
  2.  Click the plus icon to create a match rule or an exclude rule. The create screen appears.
     
  3. Select one or more criteria to match.  If you select multiple criteria, all must match for the rule to come into effect. Use the gear icon to set a NOT condition.
     See Using Regular Expressions for general information about match rules.
  4.  Click Save.
  5. Click Save in the outer configuration screen.

You can later edit or remove a match rule by selecting it in the list and clicking the edit or delete icon.

The Apache Agent and Automatic Injection

If you are using the  Apache Agent in your installation, automatic injection is not supported, even if you are using a supported framework.