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.
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
- Open the EUM application in which you are interested.
- From the left navigation bar, select Configuration.
- Scroll down to the Advanced panel and expand it.
- Expand Advanced Instrumentation of your HTML Pages if it is closed.
Enable Automatic Injection
- 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.
This is not necessary for manual or assisted injection.
You can use the node property
<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
<head> tag unless your use case necessitates otherwise.
Configure Automatic Injection
After you have enabled automatic injection:
- 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.
- 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.
- Click < Add to move the business transaction to the list on the left.
- 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.
- 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
- Expand Only enable Automatic Injection for certain Pages if it is closed.
- Click the plus icon to create a match rule or an exclude rule. The create screen appears.
- 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.
- Click Save.
- 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.