AppDynamics provides information points to specify code and business metrics. See Code Metrics and Business Metrics.
For PHP agents see Configure Information Points for PHP.
1. Select your application.
2. Click Analyze -> Information Points.
3. Click Add (the + symbol).
4. Enter a name for the information point.
5. Select the agent type.
6. Define the class and the method on which the information point is based.
7. (Optional) If the method is overloaded, check the Is this Method Overloaded option and add the parameters.
8. (Optional) Define match conditions. A match condition ensures that only those invocations that match the configured conditions for the Information Point will be captured. For example, the ACME Bank AccountManager.updateAccount(String customerType, Account newAccountData) method, you can capture only those requests that invoke the parameter "customerType" with value "platinum".
For example, the following configuration counts the number of calls to the method that deletes items from the cart: