nodetool settraceprobability
Sets the probability of tracing a request.
Synopsis
Section titled “Synopsis”nodetool [connection_options] settraceprobability <probability>See connection options for connection options.
Description
Section titled “Description”nodetool settraceprobability sets the probability (0.0 to 1.0) that any given request will be traced. Trace data is stored in the system_traces keyspace.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
probability | Trace probability (0.0 to 1.0) |
Examples
Section titled “Examples”Enable 1% Tracing
Section titled “Enable 1% Tracing”nodetool settraceprobability 0.01Enable Full Tracing
Section titled “Enable Full Tracing”nodetool settraceprobability 1.0Disable Tracing
Section titled “Disable Tracing”nodetool settraceprobability 0.0When to Use
Section titled “When to Use”Performance Analysis
Section titled “Performance Analysis”# Enable tracingnodetool settraceprobability 0.1
# Query tracescqlsh -e "SELECT * FROM system_traces.sessions LIMIT 10;"
# Disable after analysisnodetool settraceprobability 0.0Best Practices
Section titled “Best Practices”Performance Impact
Tracing adds overhead. Use low probabilities in production:
- 0.001 (0.1%) for light sampling
- 0.01 (1%) for moderate analysis
- Higher values only for short periods
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| gettraceprobability | View current probability |