A wireless sensor network (WSN) is a computer wireless network composed of spatially distributed and autonomous tiny nodes - smart dustsensors, motes -, which cooperatively monitor physical or environmental conditions. Nowadays these kinds of networks support a wide range of applications, such as target tracking, security, environmental control, habitat monitoring, source detection, source localization, vehicular and traffic monitoring, health monitoring, building and industrial monitoring, etc. Many of these applications have strong requirements for end-to-end delay and losses during data transmissions. In this work we have classified the main mechanisms that have been proposed to provide Quality of Service (QoS) in WSN at Medium Access Control (MAC) and network layers. Finally, taking into account some particularities of the studied MAC- andnetwork-layer protocols, we have selected a real application scenario in order to show how to choose an appropriate approach for guaranteeing performance in a WSN deployed application.