An insect trap and a method of using the same. The insect trap includes a housing. The insect trap also includes a glue board receiving space located inside the housing. The insect trap further includes one or more light sources for attracting insects into the housing. The insect trap also includes a camera having a lens. The lens has a front element. The camera is positioned to capture images of a glue board when the glue board is received in the glue board receiving space. There is no line of sight between the or each light source and the front element of the lens. This may prevent light from the or each light source reaching the front element directly. The method can include using an image captured by the camera to determine that a glue board received in the glue board receiving space needs to be replaced.