-
Notifications
You must be signed in to change notification settings - Fork 52
Description
We've got a bit of an issue and I can only think of bad solutions so I'm hoping I've just overlooked something obvious. We're using the "attachments" argument to 'StartHandler' to attach our log file on a crash. This works great. The log file is always there on disk...it's always useful to us...and it's uploaded successfully every time.
The issue is that there are often needs to add MORE files at a later time....files that did not exist at the time the handler was started and whose name/location might not be predictable early either. These are non-fatal incidents where the process is still healthy. (A GPU error for example). We cannot find a way to add files later.
Some ideas that I considered:
- Killing the existing handler and starting a NEW handler now that we have more specific file location information. There seems to be no exposed way to kill/restart a handler though.
- Communicating with the handler to send more information via IPC. This would require customizing the handler source of course which isn't ideal.
- Disable 'Uploads', write ourselves a private note somewhere to disk about the location/need of the extra files and then add them to the report the next time the app is restarted and THEN upload it. It seems like the only access to a 'Report' implies that its immutable and cannot easily add attachments to it.
- Let the system upload reports without the extra attached files and then upload them directly to backtrace later. I've not found an API for this but maybe there's some URL we can use to send via CURL on a worker thread if we knew the report's UUID.
- Add one or more placeholder paths to StartHandler. If we end up needing them later, we can rename the files to align with those paths. If we don't end up needing them, it seems like handler doesn't care that the files don't exist and will just log out an error but still continue just fine. This seems like it would work but it's a bit crude.
Would you guys have any recommendations on this issue?
Thanks!