This page explains how to use the stdev aggregation function in APL.
stdev
aggregation in APL computes the standard deviation of a numeric field within a dataset. This is useful for understanding the variability or dispersion of data points around the mean. You can apply this aggregation to various use cases, such as performance monitoring, anomaly detection, and statistical analysis of logs and traces.
Use the stdev
function to determine how spread out values like request duration, span duration, or response times are. This is particularly helpful when analyzing data trends and identifying inconsistencies, outliers, or abnormal behavior.
Splunk SPL users
stdev
aggregation function works similarly but has a different syntax. While SPL uses the stdev
command within the stats
function, APL users will find the aggregation works similarly in APL with just minor differences in syntax.ANSI SQL users
STDDEV
function. APL’s stdev
function is the direct equivalent of SQL’s STDDEV
, although APL uses pipes (|
) for chaining operations and different keyword formatting.numeric_field
: The field containing numeric values for which the standard deviation is calculated.stdev
aggregation returns a single numeric value representing the standard deviation of the specified numeric field in the dataset.
stdev
aggregation to analyze HTTP request durations and identify performance variations across different requests. For instance, you can calculate the standard deviation of request durations to identify potential anomalies.Queryreq_duration_std |
---|
345.67 |
req_duration_ms
field in the sample-http-logs
dataset, helping to understand how much variability there is in request durations.avg
to understand the central tendency of the data.min
when you need to find the minimum value.max
to identify the peak value in a dataset.sum
to get a total across records.count
when you need the number of occurrences or entries.