Continued dimensional scaling of semiconductor devices has driven information technology into vastly diverse applications. As the size of devices approaches fundamental limits, metrology techniques with nanometre resolution and three-dimensional (3D) capabilities are desired for device optimisation. For example, the performance of an ultra-scaled transistor can be strongly influenced by the local electric field and strain. Here we study the spectral response of single erbium ions to applied electric field and strain in a silicon ultra-scaled transistor. Stark shifts induced by both the overall electric field and the local charge environment are observed. Further, changes in strain smaller than $3times 10^{-6}$ are detected, which is around two orders of magnitude more sensitive than the standard techniques used in the semiconductor industry. These results open new possibilities for non-destructive 3D mapping of the local strain and electric field in the channel of ultra-scaled transistors, using the single erbium ions as ultra-sensitive atomic probes.