I prefer an alternate measure - great developers write code with a long half life relative to the rest of the product. (An idea I learned from a hiring reference check ... of all places.)
This is in all likelihood an improvement on just measuring lines of code output, but not at all a silver bullet. I'd imagine this skews heavily towards developers who were around first in large projects. Also skews towards developers who pick certain tasks over others - there's always circumstances where the library you are building on passes breaking changes, etc. but that I feel might be more minor in comparison to the first concern.
I didn't mean to imply there's a single all-encompassing metric or silver bullet, but re-reading, I did kinda write it that way. When you find someone whose code persists a long time, that's often a strong signal of quality contributions. There are of course myriad other ways to contribute critically - ops, culture, finding and fixing hard defects, unusually good understanding of the customer, industry expertise, mentorship, ...