The invention relates to a sensor element for detecting at least one analyte in a body fluid or in a body tissue, particularly for determining at least one metabolite concentration in a body fluid. The sensor element comprises an implantable, one-piece shaped body, which comprises a sensor end and a coupling end. The shaped body comprises, in the area of the sensor end, at least one sensor area, which comprises at least one sensor material. The sensor material changes at least one optically measurable property in the presence of the analyte. The shaped body also has at least one optically transparent coupling part, which is designed to transmit electromagnetic radiation in at least one spectral range between the sensor area and the coupling end. In the sensor area, the shaped body has at least one optically transparent matrix material, and the analyte can at least partially diffuse through the matrix material to the sensor material. The sensor material is embedded in the matrix material. The coupling part is formed at least partially by the matrix material.