- the Java classes and methods that should be intercepted
- the Java writer object and method to use to add the agent to the response object
Assisted injection is available for Java frameworks only.
- 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.
2. Click the plus icon.
The Create Injection Rule screen is displayed.
4. In the Name field, enter a name for the rule and check Enable to enable it.
6. In the Class and Method to intercept section, define match conditions for the class and method that write to the output stream in your application. This is the class that AppDynamics intercepts for injection.
7. If the write method is overloaded
a. check the Is this Method Overloaded? check box.
b. click Add Parameter.
c. add the parameters that define the method.
8. In the Pointer to the writer section, select how to obtain a reference to the writer object from the selected method.
9. In the Injection options section, specify:
- the output stream write method AppDynamics should use to inject the agent
- when the injection should occur: when the method begins or when the method ends
- which part of the script should be injected - the header or the footer
- optional prefix to output before writing the header or footer, such as <DOCTYPE. . . >
Define Business Transactions to Instrument
Optionally you can limit the business transactions for which the rule is enabled. By default the rule is enabled for all business transactions. To enable it for specific business transactions only:
1. Click the Inject for these Business Transactions tab.
2. Select These Business Transactions.
3. Specify the business transactions for which the injection rule is enabled by moving them from the Other Business Transactions list to the Selected Business Transactions list.
4. Specify the business transactions for which the injection rule is disabled by moving them to (or leaving them in) the Other Business Transactions list.
Create the Rule
1.Click Create Injection rule.
2. Click Save