In this talk we will study the notion of formality for differential graded algebras over differential graded operads. After a brief introduction to operads and algebras over operads, we will present general formality criteria, unifying and generalizing other known approaches like the ones by Manetti and Kaledin. More precisely, we construct general operadic Kaledin classes and show that they provide obstructions to formality. Moreover, we show that an algebra is formal if and only if its operadic cohomology spectral sequence degenerates at E_2. The talk is based on joint work with Marcel Rubió.