Suppose $f: \mathbb{R}^{n\times n}\to\mathbb{R}$ is invariant under conjugation by rotations, in the sense that $$f(M) = f(R^TMR) \quad \forall R\in SO(n).$$
What additional conditions are needed on $f$ in order for it to be true that $f$ can be expressed as a linear combination of monomial symmetric polynomials in the eigenvalues of $M$? For instance, is it enough that $f$ is analytic in the matrix entries?