Code profiling is currently supported only by the .NET Library 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.
The granularity used for collecting profiling information with the .NET Library is based on the profiling interval. The default interval is 50ms and is configurable in profiler settings. Traces with a duration shorter than the configured profiling interval may not be profiled. The profiling information collected includes the .NET class name and method name. Asynchronous operations that are not part of a request do not have profiling information captured.
Troubleshooting .NET code profiling
Code profiling is disabled by default. To enabled code profiling use the Profiling setting in the
Traces with a duration shorter than the configured profiling interval (the default is 50ms) might not have profiling information.
Overhead might be more noticeable in systems with a high number of threads. To reduce overhead, increase the code profiling interval so that the library takes snapshots less frequently.
"UNKNOWN" accounts for occasions where the library failed to obtain snapshots for the given interval. Various conditions can result in missing snapshots (for example, high CPU load).
"UNMANAGED CODE" indicates that when the library attempted to take a snapshot, the code being executed was unmanaged code and the stack trace was not able to be taken.
"SNAPSHOT NOT TAKEN" indicates that the library attempted to take the snapshot but the thread was not in a state where the stack trace could be taken.
If the profiling information is missing or not expected and you’d like to provide our customer support with diagnostic logging, enable verbose logging for code profiling by adding the following to the library configuration.
<add key="LogLevel.Instrumentation.ProfilerService" value="Debug" />