Add an upload metrics callback.