Allium leaf miner is a pest of many common crops: leeks, onion, chives, shallot and garlic. The initial damage is done by the maggots, but secondary fungal and bacterial infections often cause the most noticeable rotting.
Royal Horticultural Society
Royal Horticultural Society