getsentry/sentry-unreal

Enable Attachments in Windows

gid-sentry opened this issue · 7 comments

What problem could Sentry solve that it doesn't?

https://github.com/getsentry/sentry-unreal/blob/main/plugin-dev/Source/Sentry/Private/Desktop/SentryScopeDesktop.cpp#L34-L37

This is a request from a customer:

Adding support for this would enable "...custom filtered log files for particular subsystems, .utrace files, and any other artifacts we might want to upload via a CaptureMessageWithScope call."

Introducing a similar feature to sentry-native first could greatly help with supporting attachments in UE plugin on Windows. Apparently, some work in this regard has already been done (getsentry/sentry-native#433).

Looks like that Issue (getsentry/sentry-native#433) hasn't had work done on it in a couple years, would it be a necessary pre-requisite for attachments in Windows?

@gid-sentry We're somewhat limited in terms of what can be done on Unreal's side of things to enable adding attachments on Windows.

The key problem is that the sentry-native integration we have for UE plugin relies on crashpad backend which at this point doesn't support "dynamic" attachments meaning those can be specified only during its initialization and the corresponding file names have to be pre-defined. In other words, if there is no fixed list of attachments that should be reflected in captured events (which most likely will be the case) then the current setup won't work.

One possible workaround here is to zip the dynamic list of attachments at a certain location whenever needed and upload it to Sentry instead however this feels like something that has to be a part of the native library already.

Another thing to consider is introducing buffer-based attachment support for sentry-native in order to align the plugin API with other platforms where we have this feature enabled (Android/macOS/iOS).

Here is one more related issue raised a while ago: getsentry/sentry-native#586

cc @Swatinem @supervacuus

@tustanivsky @Swatinem any updates on this ask?

@dachakra The feature is still under consideration and currently there is no ETA when it might be ready. Adding the game log to captured events is the only type of attachment that is supported for Windows at the moment.

Would it be possible to support attachments on Linux and consoles?

Since both Linux and Windows relies on the same implementation I think the answer is yes. However consoles support is a completely separate thing so currently I can't give you any insights on that.