-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Browser Profiling #792
Comments
cc @JonasBa |
@timfish can you explain a bit more about what breaks? |
Or wait, do you mean newer versions of Electron right? |
Just need to publish an SDK release and then I'll upload my demo app which is easier to debug. So far the log looks like this:
My best guess so far is that the |
Oh I see. It does seem like the profiler is correctly started, it just never gets attached to the envelope 🤔 Let me know when you publish your example app and I'll take a look |
Sorry for the delay. Here is the demo repo:
It's worth noting that in the case of this basic app, and in many Electron apps, Node integration is enabled in the renderer processes which gives you full Node mixed into the browser context! This is not the recommended way to use Electron now, especially if you're loading remote content, but for many apps this is less of a concern. Historically this has caused issues with libraries that do any kind of Node detection but I don't think this is the case here. |
There is nothing wrong with profiling, the issue is how we route envelopes through the apps main process! |
Ah, is it because the envelope lifecycle hook doesn't work properly with electron? |
No, that's all working in the renderer/browser process. The issue is that we intercept all events and transactions and capture them through the main/node process so they have the full content. At this point, the profiles are being stripped off: sentry-electron/src/main/ipc.ts Lines 113 to 125 in 81cb706
We want to maintain passing through the main process event pipeline so events from both processes have the same context. However, there's no way to pass the profiles (or envelope items other than attachment) through. Replays work since they are a completely separate envelope which can be directly forwarded. Possible solutions:
|
Problem Statement
Newer versions of Chrome support the
BrowserProfilingIntegration
which captures CPU profiles.Solution Brainstorm
Initial testing shows this does not work out-of-the-box.
The text was updated successfully, but these errors were encountered: