Fuel flow is measured by flow transducers in line with the fuel pipes. And they do a very good job at measuring flow, but unfortunately a fuel leak bypasses them. There is no direct measurement of the leak flow anywhere.
The pilots of Air Transat 236 had two indications of the fuel leak:
- Increased fuel flow through the oil/fuel heat exchanger caused a drop in oil temperature and a corresponding increase in oil pressure.
- Drained fuel on the leaky side caused a fuel imbalance.
It would only be possible to positively identify increased flow as a leak if the leak occurs in between two flow transducers, both mounted in the same fuel line. If the leak occurs after a single transducer, the increased flow gives an indication. Otherwise, the leak flow would have to be observed from available volume, minus legitimately used engine flow. There are fuel tank probes distributed in airliner fuel tanks that give an indication of fuel volume per tank. Picture below shows the six fuel probes in the 747 centre tank (source).
The difficulty here is that leak flow must be derived from volume measurement: unit of flow is $m^3$/sec, the derivative of volume. The wing tanks are long and flat and the probes measure vertical distance, with an accuracy that suffices for Qty indication but lacks the precision of the fuel flow meters which directly measure impulse of the mass flowing through them. Plus they measure mass directly, a more useful entity than volume. Volume per mass changes with fuel temperature, tank levels change with aircraft pitch and roll, the level needs to be derived over time: all of this can only give an indication over the course of hours, when a large amount of fuel has leaked out already, and with a degree of uncertainty that would leave room for doubt.
You're right though, in wondering why there seemed to be no automated way for monitoring discrepancies in fuel quantity. @Waked mentions the estimation messages of the B737NG, which would also only seem to occur after much fuel has been lost aready. The A330 now has an ECAM caution message: FUEL FU/FOB DISCREPANCY, put in place after the Air Transat incident. Lessons learned from this incident would now be incorporated in the fuel management systems and aircrew procedures. The brilliant glide flight of the pilots demonstrates once again why we need pilots in front of the aeroplane.