Add metrics for log failures/partials Upstream-commit: ab0dccf80174fa5eef4583a0235b0bf57bdff8df Component: engine