A better way to deal with this particular case is to find the code that emits this error and see if you can find a way to avoid stringifying the stacktrace before logging.
For example, log.error("Exception caught: " + traceback.format_exc(...)) causes less data to be sent than log.error("Exception caught", exc_info=True)