getsentry / sentry-unreal

Unreal Engine
https://docs.sentry.io/platforms/unreal/
MIT License
87 stars 36 forks source link

Enable Attachments on PC #430

Open gid-sentry opened 1 year ago

gid-sentry commented 1 year ago

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."

tustanivsky commented 1 year ago

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 (https://github.com/getsentry/sentry-native/pull/433).

gid-sentry commented 1 year ago

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

tustanivsky commented 1 year ago

@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: https://github.com/getsentry/sentry-native/issues/586

cc @Swatinem @supervacuus

dachakra commented 11 months ago

@tustanivsky @Swatinem any updates on this ask?

tustanivsky commented 11 months ago

@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.

dachakra commented 11 months ago

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

tustanivsky commented 11 months ago

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.

bruno-garcia commented 1 month ago

Still blocked on: