Fix metrics service instantiation to use the builder and avoid reflection.