Spectroscopic assessment of rare-earth activated planar waveguides and microcavities