A functional trait approach to identifying life history patterns in stochastic environments