A light source device comprising: a laser diode configured to emit laser light, the laser diode being an edge-emission type laser diode having an end surface through which in operation the laser light is emitted; a substrate directly or indirectly supporting the laser diode such that the laser diode in operation emits the laser light in a direction along a principal surface of the substrate; and a cap secured to the substrate and covering the laser diode, the cap comprising: a first glass portion disposed at a position on the substrate such that the first glass portion intersects a path of the laser light to transmit the laser light; and a second glass portion comprising a pair of lateral wall portions that are located at a lateral side of the laser diode, and a cover portion that is located above the laser diode and connects the pair of lateral wall portions together; and a third glass portion that faces the first glass portion with the laser diode disposed between the first glass portion and the third glass portion; and the second glass portion connects the first glass portion and the third glass portion together; wherein the first glass portion and the second glass portion are anodically bonded together via an electrically conductive layer that is in contact with an alkaline glass region, the first glass portion is made of a different material from the second glass portion, the cover portion of the second glass portion and the pair of lateral wall portions of the second glass portion are monolithically formed, and the anodically bonded surface between the first and second glass portions (40A, 40B) is in a plane perpendicular to the principal surface of the substrate. a laser diode configured to emit laser light, the laser diode being an edge-emission type laser diode having an end surface through which in operation the laser light is emitted; a substrate directly or indirectly supporting the laser diode such that the laser diode in operation emits the laser light in a direction along a principal surface of the substrate; and a cap secured to the substrate and covering the laser diode, the cap comprising: a first glass portion disposed at a position on the substrate such that the first glass portion intersects a path of the laser light to transmit the laser light; and a second glass portion comprising a pair of lateral wall portions that are located at a lateral side of the laser diode, and a cover portion that is located above the laser diode and connects the pair of lateral wall portions together; and a third glass portion that faces the first glass portion with the laser diode disposed between the first glass portion and the third glass portion; and the second glass portion connects the first glass portion and the third glass portion together; wherein the first glass portion and the second glass portion are anodically bonded together via an electrically conductive layer that is in contact with an alkaline glass region, the first glass portion is made of a different material from the second glass portion, the cover portion of the second glass portion and the pair of lateral wall portions of the second glass portion are monolithically formed, and the anodically bonded surface between the first and second glass portions (40A, 40B) is in a plane perpendicular to the principal surface of the substrate. a first glass portion disposed at a position on the substrate such that the first glass portion intersects a path of the laser light to transmit the laser light; and a second glass portion comprising a pair of lateral wall portions that are located at a lateral side of the laser diode, and a cover portion that is located above the laser diode and connects the pair of lateral wall portions together; and a third glass portion that faces the first glass portion with the laser diode disposed between the first glass portion and the third glass portion; and the second glass portion connects the first glass portion and the third glass portion together; wherein the first glass portion and the second glass portion are anodically bonded together via an electrically conductive layer that is in contact with an alkaline glass region, the first glass portion is made of a different material from the second glass portion, the cover portion of the second glass portion and the pair of lateral wall portions of the second glass portion are monolithically formed, and the anodically bonded surface between the first and second glass portions (40A, 40B) is in a plane perpendicular to the principal surface of the substrate.