This kind of post reopens that silly old question: what is productivity for a developer? Tasks solved over time? Task size over time? Lines of code over time?
To measure productivity you need a constant and repeatable output of work over time. Development tasks aren't that.
Also .... feeling that someone isn't productive? I get it if a manager has concerns but taking random decisions based on that is a no-no. I don't even want to know what will happen to a business run this way over time.
If you are considering surveillance as a solution to something, you'd better have damn solid reasons and a whole lot of numbers justifying the measure as well as an unbiased method to quantify the results, not "feeling".