AFAIK, one technique for monitoring cracks uses ultrasonic sensors. They send sound waves through the rails and detect cracks by analyzing reflected waves.