Monitoring is a widely-used technique to check assumptions about the real-time behavior of a system, debug the code, or enforce the system to react if certain deadlines are passed. Program instrumentation is needed to insert monitoring code fragments into the monitored system if the monitor is implemented without hardware support. This paper describes a language-based approach to automated program instrumentation using the general purpose aspect language AspectC++. The language is an extension to the C/C++ programming language. It provides language features that allow a highly modular and thus easily configurable implementation of monitoring tasks and supports re-use of common implementations. Even though the AspectC++ language provides a convenient level of abstraction no overhead is imposed on the system in comparison to pure C/C++ code.