About 15 years ago I got a demo at a Gartner conference from a company doing just that. The vendor's primary goal, they said, was to measure where the developer was spending his time (coding vs debugger vs editor... I think it was a Visual Studio add-in?). But they admitted employers could use it to track what the developer was/wasn't doing.
...and that was before Facebook.