  Particle detectors are an ubiquitous tool for probing quantum fields in the
context of relativistic quantum information (RQI). We formulate the
Unruh-DeWitt (UDW) particle detector model in terms of the path integral
formalism. The formulation is able to recover the results of the model in
general globally hyperbolic spacetimes and for arbitrary detector trajectories.
Integrating out the detector's degrees of freedom yields a line defect that
allows one to express the transition probability in terms of Feynman diagrams.
Inspired by the light-matter interaction, we propose a gauge invariant detector
model whose associated line defect is related to the derivative of a Wilson
line. This is another instance where nonlocal operators in gauge theories can
be interpreted as physical probes for quantum fields.
