Checkpoint of refactoring put_metrics