Required The user-defined metric to calculate.
The threshold value. If null, a default value will be set depending on the selected metric.