Log the size of the artifacts archive before upload attempt

I have an on-prem instance of GitLab and I started seeing the following error in one of the pipelines:

ERROR: Uploading artifacts as “archive” to coordinator… 413 Request Entity Too Large id=1390915 responseStatus=413 Request Entity Too Large status=413

Before I go to the admins and request that they increase the limit, I would like to see what is the size of the compressed artifact - perhaps I am packing too many things.

How can I log the size of the package into the output?