Optical sensor for real time online monitoring of defects and vital characteristics of filament yarn