Skip to content
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

Investigate Blazor+MAUI hybrid apps #1954

Open
Tracked by #1174
mattjohnsonpint opened this issue Sep 28, 2022 · 6 comments
Open
Tracked by #1174

Investigate Blazor+MAUI hybrid apps #1954

mattjohnsonpint opened this issue Sep 28, 2022 · 6 comments

Comments

@mattjohnsonpint
Copy link
Contributor

Problem Statement

Looks like MAUI Blazor hybrid apps are getting popular.

We should see if we can support it OOTB with the Sentry .NET MAUI SDK.

Solution Brainstorm

It may be helpful to bundle the Sentry JavaScript SDK, not sure.

@kanadaj
Copy link
Contributor

kanadaj commented Sep 28, 2022

It may be required to sign up to the NavigationManager.LocationChanged event for tracking page loads, but not sure if there is a good way to track page loading times in general otherwise.

@kanadaj
Copy link
Contributor

kanadaj commented Mar 23, 2023

From what we've observed, some JS errors never make it to the .NET side so they have to be logged by the JS SDK. On the other hand, this is also true for many .NET errors; they never make it to the JS console (or if they do, they lack metadata). So you basically need both SDKs.

The main issue is keeping scope in sync via asynchronous IPCs. I think for the most part you only need to push metadata to the JS side, not backwards; maybe even a pull approach could work before sending events to Sentry?

Some de-duplication mechanism is also needed if there are 2 SDKs since some events seem to make it through to both ends of the logging pipeline. Maybe just push events directly from the JS SDK to the .NET SDK and have the .NET side handle the messaging and de-duplication?

@domagojmedo
Copy link

Any info about this?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 8, 2024
@bruno-garcia
Copy link
Member

Any info about this?

We didn't make progress on this yet. But would be nice to add support.
Do you have Sentry already in the app? I imagine at least the native crashes get captured, do the C# ones within the Blazor view also get captured?

@domagojmedo
Copy link

We started a new blazor hybrid project and are still exploring options so can't really tell how it behaves

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 8, 2024
@bruno-garcia
Copy link
Member

We started a new blazor hybrid project and are still exploring options so can't really tell how it behaves

I recommend adding Sentry.Maui for now. You should be able to use SentrySdk.CaptureException for example from within the Blazor webview (it does run on Web, the core bits). But we didn't test/try this out ourselves yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: No status
Archived in project
Development

No branches or pull requests

5 participants