Documentation forAppOptics

Code profiling (legacy agent)

The following content pertains to code profiling for the legacy AppOptics NET 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 NET Library, see the SolarWinds NET 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 is currently only supported by the .NET agent for Windows.

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 .NET agent version 3.7.0 or later is required for code profiling.

What profiling information is collected by the .NET agent?

  • Profiling information has granularity base on profiling interval (default is 50ms), and is configurable in profiler settings.
  • .NET class name and method name will be collected.
  • Asynchronous operations that are part of a request will not have profiling information captured.

Why don't all traces have profiling information?

  • Code profiling is disabled by default, please refer to enabling code profiling.
  • Traces with duration shorter than the configured profiling interval (default is 50ms) might not have profiling information.

What are the overhead concerns?

  • Overhead might be more noticeable in systems with high number of threads. To reduce overhead, increase code profiling interval such that the agent would take snapshots less frequently.

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

  • "UNKNOWN" accounts for occasions where the agent failed to obtain snapshots on the given interval. Various conditions can trigger missing snapshots, for example high CPU load.

What is the "UNMANAGED CODE" path shown in the profiles?

  • "UNMANAGED CODE" indicates that when the snapshot was attempted the code being executed was unmanaged code and the stack trace was not able to be taken.

What is the "SNAPSHOT NOT TAKEN" path shown in the profiles?

  • SNAPSHOT NOT TAKEN indicates that the snapshot was attempted but the thread was not in a state where the stack trace could be taken.

How to increase the agent log level for profiling?

If the profiling information is missing or not expected and you’d like to provide our customer support with diagnostic logging, please ensure you are running agent version 4.1.1 or above and enable verbose logging for code profiling by adding the following to the agent configuration.

<add key="LogLevel.AppOptics.Instrumentation.ProfilerService" value="Debug" />