Automatic injection uses AppDynamics server-side agents to automatically add the adrum header and footer to each of your instrumented web pages.
Automatic injection is available only for applications built on a Jasper-supported JSP (Java) or ASP.NET or ASPX (.NET) framework.
Access the Automatic Injection Configuration Panel
- In the left navigation menu, click Configure -> Instrumentation.
- Click the End User Experience tab.
- Scroll down to the Advanced panel and expand it if it is closed.
- 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 assisted or manual injection types.
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.
To Specify Business Transactions for Automatic Injection
You must select at least one business transaction for automatic injection.
- From the list on the right, select business transaction. 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.
To 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 Match Rule Conditions for general information about match rules.
c. 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.