The first thing to figure out is: what is the program producing that is of value to its users? Usually this is answered by a fast look at the chapter The Purpose of Software from Code Simplicity, which talks about how the purpose of software is "to help people." So the first step here would be to determine what group of people you're helping do what with your software, and then figure out how you would describe the result of that help as a product.
For example, if you have accounting software that helps individuals file their taxes, you might measure the total number of tax returns fully and correctly filed by individuals using your software. Yes, other people contribute to that too (such as salespeople) but the programmer is primarily responsible for how easily and successfully the actual work gets done.
One might want to pick metrics that focus closely on things that only the programmer has control over, but don't go overboard on that – the programmer doesn't...