Skip to content

feat(apple): Add session replay trouble shooting page with custom window handling #13753

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

philprime
Copy link
Member

@philprime philprime commented May 19, 2025

DESCRIBE YOUR PR

During debugging of the SDK we discovered that session replay for iOS requires on the window property of the window scene delegate / UIWindowSceneDelegate to be set. By default this will be set during the bootstrapping of the app, but it appears that the property can also be omitted and not configured.

This PR adds documentation to indicate to users how to deal with this. It's also the start of having a troubleshooting section dedicated to session replay:

https://sentry-docs-git-philprime-session-replay-scene-delegate.sentry.dev/platforms/apple/guides/ios/session-replay/troubleshooting/

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

EXTRA RESOURCES

@philprime philprime self-assigned this May 19, 2025
Copy link

vercel bot commented May 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 11, 2025 8:22am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Aug 11, 2025 8:22am
develop-docs ⬜️ Ignored (Inspect) Visit Preview Aug 11, 2025 8:22am

@codeowner-assignment codeowner-assignment bot requested a review from a team May 19, 2025 08:43
Copy link

codecov bot commented May 19, 2025

Bundle Report

Changes will increase total bundle size by 1.31kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 12.38MB 1.31kB (0.01%) ⬆️
sentry-docs-client-array-push 9.85MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 882.71kB -0.0%
static/chunks/8321-*.js -3 bytes 425.87kB -0.0%
static/HlM8bnB8Pncy8qcpy0OKS/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/HlM8bnB8Pncy8qcpy0OKS/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/OyMpO1gIKXV2rF4F-*.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/OyMpO1gIKXV2rF4F-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.77MB -0.0%
../instrumentation.js -3 bytes 1.1MB -0.0%
9523.js -3 bytes 1.08MB -0.0%
../app/[[...path]]/page.js.nft.json 441 bytes 745.52kB 0.06%
../app/platform-redirect/page.js.nft.json 441 bytes 745.44kB 0.06%
../app/sitemap.xml/route.js.nft.json 441 bytes 742.91kB 0.06%

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can detect this in the SDK. So basically, if we can't find the window. Maybe it makes sense to print the link to the docs in the SDK warning or error log?

LGTM

@@ -0,0 +1,71 @@
---
title: Troubleshooting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: I think we should add a link to this troubleshooting guide from https://docs.sentry.io/platforms/apple/troubleshooting/, so people can find it here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll do that.

@philprime
Copy link
Member Author

I guess we can detect this in the SDK. So basically, if we can't find the window. Maybe it makes sense to print the link to the docs in the SDK warning or error log?

I believe I didn't do this before, because it's also possible that the window will be created afterwards:

https://github.com/getsentry/sentry-cocoa/blob/50a9ff782513949ffe7c8e3eb1e00878f0159f85/Sources/Sentry/SentrySessionReplayIntegration.m#L333-L348

I would have to add the log statement here, with a detection if the window should already be there, e.g. checking the app state. I'll create another issue in sentry-cocoa for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants