Settings for Call Graph Profiling

Learn about the available Java, .NET, and Node.js agent settings for Call Graph Profiling in Splunk APM.

The following settings control the Call Graph Profiling feature.

Java

Recommended settings to increase visibility

.NET
Environment variableDescriptionDefault value
SPLUNK_SNAPSHOT_PROFILER_ENABLEDEnables the snapshot profiler required for call graph generation.false
SPLUNK_SNAPSHOT_SAMPLING_INTERVALSampling interval. Lower values increase stack capture frequency.40ms
SPLUNK_SNAPSHOT_SELECTION_PROBABILITYProbability of selecting a trace for snapshot profiling. Maximum value is 0.10.0.01
SPLUNK_PROFILER_EXPORT_INTERVALInterval for exporting collected stack data. Minimum value: 500ms.500ms
SPLUNK_PROFILER_EXPORT_TIMEOUTTimeout for exporting stack data, in milliseconds.3000ms
SPLUNK_PROFILER_MAX_MEMORY_SAMPLESMaximum memory samples collected per minute. Max value:500200
Note: If both snapshot and continuous profilers are enabled, consider reducing SPLUNK_PROFILER_EXPORT_INTERVALto avoid buffer overflows. A good practice is to set it to half of the continuous profiler’s sampling interval.

Compatibility with Continuous Profiler

If thread sampling via the continuous profiler is enabled (SPLUNK_PROFILER_ENABLED=true), the value of SPLUNK_PROFILER_CALL_STACK_INTERVAL must be greater than and a multiple of SPLUNK_SNAPSHOT_SAMPLING_INTERVAL. For example, the default values — 10s and 40ms — satisfy this requirement.

Recommended settings to increase visibility

Use the following configuration adjustments to reduce the likelihood of missing stack data:

Environment variableRecommendation
SPLUNK_SNAPSHOT_SAMPLING_INTERVALLower to increase sampling frequency.
SPLUNK_SNAPSHOT_SELECTION_PROBABILITYRaise to 0.05 or 0.1 to include more traces.
Note: These adjustments may increase resource usage. Test changes in staging environments before applying to production.
Node.js
Environment variableDescriptionDefault value
SPLUNK_SNAPSHOT_PROFILER_ENABLEDEnables the snapshot profiler required for call graph generation.false
SPLUNK_SNAPSHOT_SAMPLING_INTERVALSampling interval in milliseconds. Lower values increase stack capture frequency.10
SPLUNK_SNAPSHOT_SELECTION_PROBABILITYPercentage of traces selected for snapshot profiling. Maximum value is 1.0.01
SPLUNK_CPU_PROFILER_COLLECTION_INTERVAL Interval (ms) for exporting collected call stacks from the native extension.30000
Note: Adjust sampling and selection rates based on your application's workload and performance sensitivity. Lower intervals increase visibility but may introduce overhead

Recommended settings to increase visibility

Use the following configuration adjustments to reduce the likelihood of missing stack data:

Environment variableRecommendation
SPLUNK_SNAPSHOT_PROFILER_SAMPLING_INTERVALLower to 1 ms to increase sampling frequency.
SPLUNK_SNAPSHOT_SELECTION_RATERaise to 0.05 or 0.1 to include more traces.
Note: These adjustments may increase resource usage. Test changes in staging environments before applying to production.