fixed metrics logging