Spending time with someone at their place of employment and observing what they do is called

This is called job shadowing or workplace observation.