Usually someone spots it visually then reports it and they get engineer out there to do some sort of official inspection. I would imagine this is part of the role of safety cars.
You also see minor ones spotted during inspections and they circle them with the yellow paint. Often seen small holes in the pavement circled as you taxi around.
Sydney airport used to have problems with pavement failure in prolonged periods of rain on A1. I would assume they redid the drainage and that seems to fix the problem.