Documentation forAppOptics

Code profiling (legacy agent)

The following content pertains to code profiling for the legacy AppOptics PHP Agent.

AppOptics agents are no long receiving updates. The new SolarWinds Observability libraries can send APM data in AppOptics and are regularly updated with new features and improvements. If you are still relying on the AppOptics agents and your components are supported by the new libraries, consider transitioning to the SolarWinds Observability libraries for your APM needs. For more information about the benefits of migrating to the SolarWinds Observability libraries. Alternatively, you can use SolarWinds Observability as your primary APM solution.

If you have already transitioned to the new SolarWinds Observability PHP Library, see the SolarWinds PHP Library documentation for code profiling information.

SolarWinds Observability libraries are not compatible with AppOptics agents. Do not use a mix of SolarWinds Observability libraries and AppOptics agents to instrument applications that are part of a distributed trace.

Code profiling provides extra insight into code level execution time that is otherwise not captured by auto-instrumentation. See Code Profiling for general information.

AppOptics PHP agent version 3.4.0 or later is required for code profiling.

What profiling information is collected by the PHP agent?

  • Profiling is now available for both, auto-started and custom SDK-started traces.
  • PHP class name, method/function name, file name and line number are collected when available. Note that calls into native PHP code will not have file name and line number.

Why don't all traces have profiling information?

  • Profiler is disabled by default, please refer to enabling code profiling.
  • Traces with duration shorter than the configured profiling interval (default is 20ms) might not have profiling information.
  • The agent has experimental support for multi-threaded PHP, profiling up to 10 concurrent threads. For example if PHP is running under Apache MPM worker with more than 10 request workers, only traces from 10 of the workers will have profiling information.

What is the "Unknown" path shown in the profiles?

  • "Unknown" accounts for occasions where the agent failed to obtain snapshots on the given interval. This can happen with a long running request where the maximum number of 3000 snapshots is reached and the agent stops collecting more.