Skip to content

Commit

Permalink
fix: don't add WinUI integration on mobile (#2821)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 13, 2023
1 parent f539268 commit 83d8b4e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Additionally, we're dropping support for some of the old target frameworks, plea
- Contexts now inherits from `IDictionary` rather than `ConcurrentDictionary`. The specific dictionary being used is an implementation detail. ([#2729](https://github.com/getsentry/sentry-dotnet/pull/2729))
- Transaction names for ASP.NET Core are now consistently named `HTTP-VERB /path` (e.g. `GET /home`). Previously the leading forward slash was missing for some endpoints. ([#2808](https://github.com/getsentry/sentry-dotnet/pull/2808))

### Fixes

- Don't add WinUI exception integration on mobile platforms ([#2821](https://github.com/getsentry/sentry-dotnet/pull/2821))

### Features

#### Native AOT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET5_0_OR_GREATER
#if NET5_0_OR_GREATER && !__MOBILE__
using Sentry.Extensibility;
using Sentry.Internal;

Expand Down
6 changes: 3 additions & 3 deletions src/Sentry/SentryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ internal IEnumerable<ISdkIntegration> Integrations
}
#endif

#if NET5_0_OR_GREATER
#if NET5_0_OR_GREATER && !__MOBILE__
if ((_defaultIntegrations & DefaultIntegrations.WinUiUnhandledExceptionIntegration) != 0)
{
yield return new WinUIUnhandledExceptionIntegration();
Expand Down Expand Up @@ -1184,7 +1184,7 @@ public SentryOptions()
#if HAS_DIAGNOSTIC_INTEGRATION
| DefaultIntegrations.SentryDiagnosticListenerIntegration
#endif
#if NET5_0_OR_GREATER
#if NET5_0_OR_GREATER && !__MOBILE__
| DefaultIntegrations.WinUiUnhandledExceptionIntegration
#endif
;
Expand Down Expand Up @@ -1283,7 +1283,7 @@ internal enum DefaultIntegrations
#if HAS_DIAGNOSTIC_INTEGRATION
SentryDiagnosticListenerIntegration = 1 << 5,
#endif
#if NET5_0_OR_GREATER
#if NET5_0_OR_GREATER && !__MOBILE__
WinUiUnhandledExceptionIntegration = 1 << 6,
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/SentryOptionsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static void DisableNetFxInstallationsIntegration(this SentryOptions optio
public static void DisableAppDomainProcessExitFlush(this SentryOptions options) =>
options.RemoveDefaultIntegration(SentryOptions.DefaultIntegrations.AppDomainProcessExitIntegration);

#if NET5_0_OR_GREATER
#if NET5_0_OR_GREATER && !__MOBILE__
/// <summary>
/// Disables WinUI exception handler
/// </summary>
Expand Down

0 comments on commit 83d8b4e

Please sign in to comment.