Implement creating metrics by a schema