Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us, check out our open positions.
Integrations | Downloads | NuGet Stable | NuGet Preview |
---|---|---|---|
Sentry.Xamarin.Forms | |||
Sentry.Xamarin |
Sentry.Xamarin is the tool to go for Xamarin that enriches your errors with valuable data, like breadcrumbs, tags, issue grouping and more!.
Includes for all Platforms supported by Xamarin Essentials:
- Automatic Navigation breacrumbs. (Xamarin.Forms)
- Xaml warnings as breadcrumbs. (Xamarin.Forms)
- Simulator flag.
- Device manufacturer.
- Device model.
- Operational system name and version.
- Screen information (Pixel density and resolution).
- Connectivity status.
Additionaly, Android and IOS will include additional information:
- Free Internal memory (Android/iOS).
- Total RAM (Android/iOS).
- CPU model (Android).
All you need to do is to initialize Xamarin integration by calling SentryXamarin.Init, and, it's recommended to start Sentry Xamarin SDK as early as possible, for an example, the start of OnCreate on MainActivity for Android, and, the top of FinishedLaunching on AppDelegate for iOS)
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
If your app uses Xamarin.Forms you can also use the package Sentry.Xamarin.Forms and initialize the SDK with additional line options.AddXamarinFormsIntegration()
.
On your MainActivity
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
...
On AppDelegate.cs
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
...
On App.Xaml.cs
sealed partial class App : Application
{
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
...
The package requires the following versions or newer:
- Tizen 4.0 (for Tizen)
- Xamarin.Android 9.0 (for Android)
- Xamarin.iOS 10.14 (for iOS)
- Universal Windows Platform 10.0.16299 (for UWP)
- Xamarin.Forms 4.6.0.726 (for Xamarin.Forms integration)
- Xamarin.Essentials 1.4.0
- Sentry 3.0.0
There are no line numbers on stack traces for UWP and in release builds for Android and iOS, furthermore, mono symbolication is not yet supported.