From what I see most metrics on an individual or team level can/will be gamed leading to worse outcomes.
Metrics on higher levels like on the level of the product or even revenue of the company/product depends on many other players outside of the control of the engineering team (product management, operations, QA, regulatory, marketing, sales, etc). This of course it's due to the fact that delivering value to customers is a team effort.
But how can you know/show your department is on the right track?