Optical fiber sensor encapsulated by polyurethane