newrelic / newrelic-xamarin-plugin

Xamarin plugin to implement New Relic Mobile agents for Android and iOS
Apache License 2.0
1 stars 2 forks source link

Add exception attributes overload to RecordException method #25

Open follesoe opened 6 months ago

follesoe commented 6 months ago

Summary

The CrossNewRelicClient.Current.RecordException(ex); method in the Unity, MAUI, and Xamarin libraries is missing the attributes overload. This overload is available in the iOS and Android SDK.

Desired Behavior

Possible Solution

Add a CrossNewRelicClient.Current.RecordException(Exception exception, Dictionary<string, object> attributes) overload.

Additional context

This overload is helpful as it allows passing additional context about a handled exception. Also, when migrating away from AppCenter, which I suspect many .NET customers are doing these days, the ability to associate attributes with an error is something that is available in AppCenter.

https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/record-handled-exceptions/#xamarin

ndesai-newrelic commented 6 months ago

@follesoe we will add this item in our backlog. thank you for suggestion.