PIM-2992: Use Metric Factory

| Q                    | A
| -------------------- | ---
| Bug fix?             | N
| New feature?         | N
| BC breaks?           | Y
| CI currently passes? | Y
| Tests pass?          | Y
| Scenarios pass?      | TODO
| Checkstyle issues?*  | N
| PMD issues?**        | N
| Changelog updated?   | TODO
| Fixed tickets        | PIM-2992
| Doc PR               |