Productivity is not a uni-directional metric. It covers a wide variety of aspects to see it as a whole. People have been using DORA metrics, coding activity etc. for a while but I will suggest that's just one part of the broader picture.
You should definitely read SPACE framework to understand this in detail!
Typo