Photonic-based instantaneous frequency measurement (IFM) of unknown microwave signals offers improved flexibility and frequency range as compared with electronic solutions. However, no photonic platform has ever demonstrated the key capability to perform dynamic IFM, as required in real-world applications. In addition, all demonstrations to date employ bulky components or need high optical power for operation. Here we demonstrate an integrated photonic IFM system that can identify frequency-varying signals in a dynamic manner, without any need for fast measurement instrumentation. The system is based on a fully linear, ultracompact system based on a waveguide Bragg grating on silicon, only 65-mm long and operating up to B30 GHz with carrier power below 10 mW, significantly outperforming present technologies. These results open a solid path towards identification of dynamically changing signals over tens of GHz bandwidths using a practical, low-cost on-chip implementation for applications from broadband communications to biomedical, astronomy and more.