All-optical circuits for computing and information processing could overcome the speed limitations intrinsic to electronics. However, in photonics, very few fundamental 'building blocks' equivalent to those used in multi-functional electronic circuits exist. In this study, we report the first all-optical temporal integrator in a monolithic, integrated platform. Our device--a lightwave 'capacitor-like' element based on a passive micro-ring resonator--performs the time integral of the complex field of an arbitrary optical waveform with a time resolution of a few picoseconds, corresponding to a processing speed of ∼200 GHz, and a 'hold' time approaching a nanosecond. This device, compatible with electronic technology (complementary metal-oxide semiconductor), will be one of the building blocks of next-generation ultrafast data-processing technology, enabling optical memories and real-time differential equation computing units.