Updated on 2022-04-28 GMT+08:00

Method Tracing

Method tracing is used to dynamically trace a method of a class. When the method of this class is called, APM collects the call data of the method based on configured method tracing rules using probes, and displays the call data on the Call Chain page. Method tracing is used to help application developers locate method-level performance problems online.

APM traces the APIs of most third-party open-source components, but does not trace specific methods in your applications. To monitor important methods in applications or methods of some third-party open-source components that are not supported by APM, you need to customize method tracing. After the configuration is complete, you can view the call data of the method on the Call Chain page.

  1. Log in to the APM console.
  2. In the navigation pane, choose Tracing > Method Tracing.
  3. Customize a method tracing rule and start method tracing.

    On the Method Tracing page, click Add Method Tracing Rule, set parameters, and click OK.

    • If Method Parameter is not set, all information about the methods using the same name is collected by default.
    • If Value is not set, the values of methods are not filtered during collection.
    • If Collect Method Stack Info is enabled, the call stack information about methods is collected.
    • If Collect All Matched Call Info is enabled, all tracing method information is collected. If this function is disabled, tracing method information is collected based on the sampling ratio set during Collection Configuration.

  4. Preliminarily locate service performance problems based on the displayed call duration and status.
  5. Click View Call Relationship in the Operation column to view the method-level call relationships.