Ultrasonic guided wave measurements in structural health monitoring systems are affected over a long term by measurement noise, environmental conditions, transducer aging, and malfunction. This results in measurement variability which affects detection performance, especially in complex structures where baseline data comparison is required. This article derives the optimal detector structure, within the framework of detection theory, based on reducing a guided wave signal at the sensor into a single feature value that can be used for comparison with a threshold. Three different types of detectors are derived depending on the underlying structure’s complexity: (a) simple structures where defect reflections can be identified without the need for baseline data; (b) simple structures that require baseline data due to overlap of defect scatter with scatter from structural features; and (c) complex structure with dense structural features that require baseline data. The detectors are derived by modeling the effects of variabilities and uncertainties as random processes. Analytical solutions for the performance of detectors in terms of the probability of detection and false alarm are derived. A finite element model that simulates guided wave inspection is used in a Monte-Carlo procedure to quantify the effects of environmental variability in terms of defect probability of detection. Results demonstrate that the problems of structural complexity and environmental variability introduce temporal diversity in the signals, which can be exploited to improve detection performance.