getsentry / getsentry/sentry-dotnet

Tags not being applied to native crash events

Open
#4,324 3 comments 0 reactions 0 assignees View on GitHub
.NET Bug Platform: Android
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

*Originally posted by @jamescrosswell in *[*#3855*]()

Tags that get set for .NET MAUI Android applications are being set correctly for Java Crashes. However they're not present in Native Crash events... which makes me believe the Java SDK is not syncing these tags correctly with the embedded Native SDK.

This can be reproduced by adding the following to the options in the [Sentry.Samples.Maui project](), running the app on an Android simulator and then clicking on the "Cause Native Crash" button. The crash dump will be written to disk and sent to Sentry the next time the application is run... so the application needs to be run a second time before you'll see this in Sentry.

```csharp
var processVersionId = Random.Shared.Next(1, 1000).ToString("D3");
options.DefaultTags.Add("ProcessVersion", processVersionId);
options.SetBeforeSend(evt =>
{
evt.SetTag("BeforeSendVersion", processVersionId);
return evt;
});
#if ANDROID
options.Native.EnableBeforeSend = true;
#endif
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.