getsentry / sentry-dotnet

Sentry SDK for .NET
https://docs.sentry.io/platforms/dotnet
MIT License
584 stars 206 forks source link

Maui tracing on ContentPages #3629

Open thinkocapo opened 1 month ago

thinkocapo commented 1 month ago

Problem Statement

Customer has a Maui app on Android and they say everything is launched on top of the Activity but they use Pages in Maui for screens.

Automatic Instrumentation sounds like it traces http requests but not Pages (Screens)

https://docs.sentry.io/platforms/dotnet/guides/maui/tracing/instrumentation/automatic-instrumentation/

Solution Brainstorm

Trace ContentPages.

jamescrosswell commented 1 month ago

Hey @thinkocapo ,

The Sentry.Maui integration doesn't currently include any automatic instrumentation for tracing.

The SentryHttpMessageHandler can be used to intercept outbound HttpClient requests and create tracing spans for these. However that functionality is not specific to MAUI - that works in Console applications or ASP.NET Core applications as well and it's not tied to Android activities in any way.