-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide way to manually instrument WinUIUnhandledExceptionHandler #3561
Comments
Although it's possible to create an API to let SDK users manually attach Sentry's unhandled exception handler for WinUI 3 applications, there are a couple of red flags in the code that make me think we don't want to do this, The main one is this: sentry-dotnet/src/Sentry/Integrations/WinUIUnhandledExceptionIntegration.cs Lines 116 to 117 in cf26d46
Because we don't take a dependency on the WinUI3 packages we don't have access to some of the critical types like Without using reflection then, I think we keep coming back to the same conclusion (that we would need to add a Sentry.WinUI3 package or something to properly support WinUI 3 applications without people having to wire up the event handler by copying/pasting code from our documentation). Building a Sentry.WinUI3 package would be challenging however. For one thing, currently we build and publish all of our NuGet packages from our macOS runner on GitHub... I don't know how we could do that for a package with WinUI3 dependencies, so the process that we use for release builds would start to get very complicated and more fragile. cc: @bitsandfoxes |
Wouldn't it be
It seems like it carries a bunch of native libs but for building/packaging purposes I imagine it would build on Mac if we left it at If we had to build it on windows (for packaging purposes, I understand we need for running tests), we would need to do what we did on Unity. Where CI builds on the platforms that are needed. Then assembles the package once all builds are ready and artifacts available. That said, given the fact AppCenter is getting decommissioned could be nice to have a decent support here so folks migrate over. But I do understand this might involve a lot of effort on our end and we need to consider that carefully. Another benefit of a package is that install instructions can be simpler. We can add a hook/extension method to their app host (if there's one). And we can track the downloads on nugettrends.com. |
sentry-dotnet/src/Sentry/Integrations/WinUIUnhandledExceptionIntegration.cs
Lines 104 to 105 in 79b1dc3
Code changes
From here, Sentry 3.x has the reflection equivalient of:
sentry-dotnet/src/Sentry/Integrations/WinUIUnhandledExceptionIntegration.cs
Line 81 in 343d921
The exception handler it wires up is currently private though. To make this easier for users, we need to expose some way for them to be able to wire this up via our public API.
Docs
Once the code changes have been made, we should update the docs to show how people can manually wire up the exception handler that we provide.
Cross reference docs with this comment.
The text was updated successfully, but these errors were encountered: