Description
Custom user attachments that were set in Java via Sentry.configureScope do not end up in NDK crashes.
The issue originated from the Unreal Engine SDK which uses sentry-java internally to support error monitoring on Android:
Currently, the only way to workaround this is to configure a custom beforeSend handler and add the missing attachments to captured crash event manually on the next app launch by using a Hint object. However, this requires us to instruct sentry-unreal users to instrument their code accordingly whereas the expected behavior is for this functionality to work out of the box.
A potential solution is to persist the attachment metadata to disk (see PersistingScopeObserver.java) and then enrich the NDK event on the next launch, similar to how this is handled for data like tags, contexts, etc.
Description
Custom user attachments that were set in Java via
Sentry.configureScopedo not end up in NDK crashes.The issue originated from the Unreal Engine SDK which uses
sentry-javainternally to support error monitoring on Android:Currently, the only way to workaround this is to configure a custom
beforeSendhandler and add the missing attachments to captured crash event manually on the next app launch by using aHintobject. However, this requires us to instructsentry-unrealusers to instrument their code accordingly whereas the expected behavior is for this functionality to work out of the box.A potential solution is to persist the attachment metadata to disk (see PersistingScopeObserver.java) and then enrich the NDK event on the next launch, similar to how this is handled for data like tags, contexts, etc.