Code metrics capture how a method is performing. For example:
- How many times was the method executed?
- How long did it take to execute on average?
- How many concurrent users are using my application? (extrapolated by comparing information points on the login and logout methods)
AppDynamics gathers code metrics using information points. Information points instrument methods in your application code outside the context of a particular business transaction. Use them when you need to track data from the same method across multiple business transactions.
Accessing Code Metrics
To access the Information Points List, in the left navigation pane click Analyze -> Information Points.
The Information Point List summarizes metrics for all the information points in an application.
Code metrics appear in the Information Points tree of the Metric Browser and can be accessed from the AppDynamics REST API, just like any other metric. See To Copy the REST URL for a Metric.
From the Information Points List you can:
- filter the list
- select an information point
- view one of its metrics in the Metrics Browser
- view a graph all its metrics on a dashboard
Code Metrics in Call Graphs
You can configure snapshots to display information point invocations in call graphs by setting the enable-info-point-data-in-snapshots node property to true. By default the property is false. See App Agent Node Properties.
When the enable-info-point-data-in-snapshots node property is set, information point calls appear in the User Data section of the call graph.
Configuring Code Metrics Using Information Points
You define an information point based on the class and method signature of the method being monitored. See Configure Code Metric Information Points. For PHP agents see Configure Information Points for PHP.
Code Metrics and Health Rules
You can then create a custom health rule based on the performance of such a custom metric. See Health Rules.