Connect app traces with web content in a WebView

Open
#5,951 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
csharp

Research direction

Read the Apple and Android WebView tracing docs linked in the issue, then review the Cocoa bindings and the option dropped in #5949. Compare the platform APIs and the MAUI WebView and BlazorWebView use cases, including the context in #1954. Done means agreeing on the .NET API and shared behavior before implementing trace continuation into JavaScript pages.

Written by the indexing model from the issue text.

Description

.NET Feature Framework: MAUI Platform: Android Platform: iOS State: Needs Discussion

Cocoa 9.33.0 and Android 8.64.0 can pass the app's current trace into a web view, so the JavaScript SDK in the page continues it. The Apple and Android docs show how. Cocoa 9.35.0 adds options.webViewTracing to do this for every WKWebView, and React Native has sentryWebViewProps. .NET doesn't expose it on either platform. Our Cocoa bindings leave out SentryObjCWebViewTracing, and #5949 has to drop the new option because we don't bind its options type.

Some questions to discuss when we pick this up:

  • Which .NET apps would use this? MAUI's WebView and BlazorWebView both use the native web views. In a Blazor Hybrid app the components run in .NET, so the trace only helps if the page also runs the JavaScript SDK. #1954 has more on Blazor Hybrid.
  • Should .NET expose each platform's API through the native options, or one MAUI API for both? Cocoa's option covers every WKWebView on its own, while Android still needs a call per WebView.
  • The Cocoa, Android and React Native SDKs added this together. Should .NET join that effort, and is there a shared spec we should match?
Dominant language
C#
Stars
775
Forks
262
Avg merge
1d 16h
Merged PRs (30d)
118

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-dotnet

All issues in getsentry/sentry-dotnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.