#[Unity|Windows] Sentry using a lot of disk space on users PC

11 messages · Page 1 of 1 (latest)

vagrant condor
#

We've recently added Sentry to our Unity app and we have seen at least two users report that the "Sentry" sub folder in our applications main folder is growing rather large, we're talking 20GB+.

I have 0 clue how to debug this, haven't experienced this myself yet and I also have no idea what might be causing this? Maybe a wrong implementation of how we attach log files? That's my best guess anyways.

bright solar
#

Hey @vagrant condor, thanks for reaching out. Lemme check some suspicion real quick.

vagrant condor
bright solar
#

How do you attach those logs?

bright solar
#

I think I can reproduce this behaviour locally.
If the event fails to get sent due to an attachment being too big the create envelope still persists on disk.

vagrant condor
#

Hm, that would make sense. here is what we're doing:

SentrySdk.ConfigureScope(scope =>
{
    scope.AddAttachment(Application.consoleLogPath);
    scope.AddAttachment(Application.consoleLogPath.Replace("Player.log", "Player-prev.log"));
});

I guess workaround on our end would then be to simply check for the size of the file(s) and either not attach them or compress/trim them to fit the size limits?

bright solar
#

That'd definitely help.

#

The docs need a bit of updating here but looks like this is the relevant number (50MB)

vagrant condor
#

Okay, thanks for your help, @bright solar !

bright solar
#

But that's definitely a bug. We will follow up on that.

bright solar