One of the metrics that I use address your point:
Number of Ex-Engineers (NOEE): This is the total number of unique engineers who have touched a code and have left the company as of the release date of the software system
Implications: This measure deals with knowledge transfer. If the employee(s) who worked on a piece of code leaves the company then there is a likelihood that the new person taking over might not be familiar with the design rationale, the reasoning behind certain bug fixes, and information about other stake holders in the code.
A large loss of team members affects the knowledge retention and thus quality.
[1] https://www.microsoft.com/en-us/research/wp-content/uploads/...