sentry-dotnet
sentry-dotnet copied to clipboard
Add managed attachments to native events
Package
Sentry
.NET Flavor
.NET
.NET Version
8.0.303
OS
Android
SDK Version
4.10.1
Self-Hosted Sentry Version
No response
Steps to Reproduce
- Create an Android app and install Sentry NuGet package;
- Configure Sentry so that reported events should have attachments (both logcat and custom attachments are affected by the issue):
SentrySdk.Init(options =>
{
options.Dsn = "...";
options.Android.LogCatIntegration = LogCatIntegrationType.All;
});
SentrySdk.ConfigureScope(scope =>
{
scope.AddAttachment("path/to/existing/file.txt", AttachmentType.Default, MediaTypeNames.Text.Plain);
});
- Generate crashes using
SentrySdk.CauseCrash()
with different parameters
Expected Result
All reported events should have logcat.log
attachment with logcat logs and custom file.txt
file attachment.
Actual Result
- Crash generated with parameter
CrashType.Native
is reported with mechanismsignalhandler
and contains no attachments; - Crash generated with parameter
CrashType.JavaBackgroundThread
is reported twice: one with mechanismUncaughtExceptionHandler
and contains no attachments, and another with mechanismAppDomain.UnhandledException
and contains both attachments; - All other crash types (
CrashType.Managed
,CrashType.ManagedBackgroundThread
,CrashType.Java
) are reported with mechanismAppDomain.UnhandledException
and contain both attachments.
This issue might be related to #3461
Reproduction sample: SampleProject.zip