You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #3694 had been reverted, this issue should be reopened, we're still getting native crashes without logcats which is the most interesting situation in which we'd like to see the logcat.
If it's a native excepion (which a SIGSEGV is), I think the attachment has to be added when the exception is captured by the sentry-native SDK.
On Android, sentry-dotnet doesn't include sentry-native directly... only indirectly (since we include sentry-java and sentry-java includes sentry-native).
sentry-native itself won't know about LogCat, since it's not android specific (it's a native SDK). So I think for this to work, the sentry-java SDK would need to register some kind of BeforeSendCallback withe the sentry-native SDK and inside that callback it could add the logcat attachments.
If I've got all of that right, it sounds like that requires work and coordination across a few different repositories... so might be tricky but not impossible!e
@jpnurmi would be interested to get your take on this.
I tried quickly searching in sentry-java/android but didn't find any logcat.log attaching there. Is it something that only sentry-dotnet does/did?
In principle, I wouldn't mind having a simple logcat integration in sentry-native because this sounds very useful for all consumers. We should probably align the feature across different SDKs, though?
My main concern with extracting logcat at native crash time would be whether it's doable with async signal-safe code. Although at the same time, we're experimenting with an out-of-process crash handler for Android (getsentry/sentry-native#1725), which would make it safe to extract logcat.
But I don't think that will work for unhandled exceptions that crash the process. It might not be possible to do this before the process crashes but presumably the logs would still be there once the process started up again... so might be possible to grab the logs then.
Activity
linear commentedon Jan 18, 2026
NET-565
jamescrosswell commentedon May 20, 2026
If it's a native excepion (which a
SIGSEGVis), I think the attachment has to be added when the exception is captured by the sentry-native SDK.On Android, sentry-dotnet doesn't include sentry-native directly... only indirectly (since we include sentry-java and sentry-java includes sentry-native).
sentry-native itself won't know about LogCat, since it's not android specific (it's a native SDK). So I think for this to work, the sentry-java SDK would need to register some kind of
BeforeSendCallbackwithe the sentry-native SDK and inside that callback it could add the logcat attachments.If I've got all of that right, it sounds like that requires work and coordination across a few different repositories... so might be tricky but not impossible!e
@jpnurmi would be interested to get your take on this.
jpnurmi commentedon May 20, 2026
I tried quickly searching in sentry-java/android but didn't find any logcat.log attaching there. Is it something that only sentry-dotnet does/did?
In principle, I wouldn't mind having a simple logcat integration in sentry-native because this sounds very useful for all consumers. We should probably align the feature across different SDKs, though?
My main concern with extracting logcat at native crash time would be whether it's doable with async signal-safe code. Although at the same time, we're experimenting with an out-of-process crash handler for Android (getsentry/sentry-native#1725), which would make it safe to extract logcat.
jamescrosswell commentedon May 20, 2026
In .NET there's:
But I don't think that will work for unhandled exceptions that crash the process. It might not be possible to do this before the process crashes but presumably the logs would still be there once the process started up again... so might be possible to grab the logs then.