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
System properties Description Default value
splunk.snapshot.profiler.enabled Enables the snapshot profiler required for call graph generation. false
splunk.snapshot.profiler.sampling.interval Sampling interval (e.g., 10ms). Lower values increase stack capture frequency. 10ms
splunk.snapshot.selection.probability Probability of selecting a trace for snapshot profiling. Maximum value is 0.10. 0.01
splunk.snapshot.profiler.max.stack.depth Maximum depth of captured call stacks. 1024
splunk.snapshot.profiler.export.interval Interval for exporting collected stack data. 5s
splunk.snapshot.profiler.staging.capacity Capacity of the staging buffer before export. 2000
Note: These settings can be passed as JVM system properties or as environment variables depending on your deployment model.

Recommended settings to increase visibility

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

Environment variable Recommendation
splunk.snapshot.profiler.sampling.interval Lower to 1 ms to maximize sampling frequency.
splunk.snapshot.selection.probability Raise 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.
.NET
Environment variable Description Default value
SPLUNK_SNAPSHOT_PROFILER_ENABLED Enables the snapshot profiler required for call graph generation. false
SPLUNK_SNAPSHOT_SAMPLING_INTERVAL Sampling interval. Lower values increase stack capture frequency. 40ms
SPLUNK_SNAPSHOT_SELECTION_PROBABILITY Probability of selecting a trace for snapshot profiling. Maximum value is 0.10. 0.01
SPLUNK_PROFILER_EXPORT_INTERVAL Interval for exporting collected stack data. Minimum value: 500ms. 500ms
SPLUNK_PROFILER_EXPORT_TIMEOUT Timeout for exporting stack data, in milliseconds. 3000ms
SPLUNK_PROFILER_MAX_MEMORY_SAMPLES Maximum memory samples collected per minute. Max value:500 200
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 variable Recommendation
SPLUNK_SNAPSHOT_SAMPLING_INTERVAL Lower to increase sampling frequency.
SPLUNK_SNAPSHOT_SELECTION_PROBABILITY Raise 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 variable Description Default value
SPLUNK_SNAPSHOT_PROFILER_ENABLED Enables the snapshot profiler required for call graph generation. false
SPLUNK_SNAPSHOT_SAMPLING_INTERVAL Sampling interval in milliseconds. Lower values increase stack capture frequency. 10
SPLUNK_SNAPSHOT_SELECTION_PROBABILITY Percentage 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 variable Recommendation
SPLUNK_SNAPSHOT_PROFILER_SAMPLING_INTERVAL Lower to 1 ms to increase sampling frequency.
SPLUNK_SNAPSHOT_SELECTION_RATE Raise 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.