Skip to content

Comments

feat: Add support for UI profiling#1267

Merged
AbhiPrasad merged 1 commit intomasterfrom
abhi-electron-ui-profiling
Nov 28, 2025
Merged

feat: Add support for UI profiling#1267
AbhiPrasad merged 1 commit intomasterfrom
abhi-electron-ui-profiling

Conversation

@AbhiPrasad
Copy link
Contributor

@AbhiPrasad AbhiPrasad commented Nov 25, 2025

resolves #1264

This PR adds support for UI profiling to Electron.

The profilesSampleRate is now deprecated in favor of profileSessionSampleRate. The decisions if something should be profiled or not will now be made at SDK initialization (start of a user session on page load). And then, the whole user session will be continuously profiled.

In profileLifecycle: "manual" (default), users can start and stop profiling with Sentry.uiProfiler.startProfiler() and .stopProfiler().

In profileLifecycle: "trace" the SDK automatically profiles when there is at least one active root/segment span. This is most similar to our previous transaction-based approach.

@AbhiPrasad AbhiPrasad self-assigned this Nov 25, 2025
@AbhiPrasad AbhiPrasad force-pushed the abhi-electron-ui-profiling branch from f2f88b5 to b145dbe Compare November 27, 2025 16:46
@AbhiPrasad
Copy link
Contributor Author

hmm @timfish any idea why the renderer e2e tests are failing here?

@timfish
Copy link
Collaborator

timfish commented Nov 27, 2025

Looks like flake since they passed on the third attempt 🤔

@AbhiPrasad AbhiPrasad marked this pull request as ready for review November 27, 2025 18:11
@AbhiPrasad AbhiPrasad requested a review from timfish November 27, 2025 18:13
@AbhiPrasad
Copy link
Contributor Author

alright cool! This is ready for review now then. @timfish if you have a sufficiently complicated electron app, would be good to test this on that. My apps are all pretty simple so I don't know if there are cases where this could break.

@AbhiPrasad AbhiPrasad merged commit c91f6cb into master Nov 28, 2025
401 of 416 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-electron-ui-profiling branch November 28, 2025 18:43
AbhiPrasad added a commit to getsentry/sentry-docs that referenced this pull request Nov 28, 2025
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.

Add ui profiling support to electron

2 participants