Atomic absorption spectroscopy (AAS) has been used as an in situ diagnostic tool to study sputtering of high-temperature superconductors. Hollow-cathode lamps were used as line sources to measure relative atomic species concentrations during sputtering of Y-Ba-Cu-oxide targets using a Kaufman ion gun. The AAS measurements showed that the fluxes of ground state Ba and Cu ejected from a composite target during argon- and oxygen-ion bombardment varied greatly with sputtering parameters. Measurements were made of the effects of changes in ion-beam energy, ion flux to the target, and target temperature. In addition, the variation in atomic densities of Ba and Cu with distance from the target were measured. For comparison, AAS measurements during argon- and oxygen-ion sputtering of a pure copper target were also performed. The AAS results were verified by measuring stoichiometry variations of thin films deposited under identical conditions.