Skip to content
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

integrate node profiling for electron /express app #1052

Open
alphaleadership opened this issue Jan 10, 2025 · 12 comments
Open

integrate node profiling for electron /express app #1052

alphaleadership opened this issue Jan 10, 2025 · 12 comments

Comments

@alphaleadership
Copy link

Problem Statement

electron dont send the data and the profiling is disableled

Solution Brainstorm

???

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 10, 2025
@timfish
Copy link
Collaborator

timfish commented Jan 10, 2025

Are you using ESM or CJS in your main process?

If you supply a repository with a minimal app demonstrating your issue I'll be able to help but as I don't currently have enough information to help you!

@alphaleadership
Copy link
Author

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 11, 2025
@alphaleadership
Copy link
Author

you can make pr if needed

@timfish
Copy link
Collaborator

timfish commented Jan 11, 2025

With CJS, you need to import and init Sentry before you require express or any other library where you want auto-instrumentation to work:

const Sentry = require("@sentry/electron/main");

Sentry.init({
  dsn: "__DSN__",
});

const https = require('https');
const express = require('express');
// ...

@alphaleadership
Copy link
Author

y dont think this is working

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 11, 2025
@alphaleadership
Copy link
Author

the profiler dont sent data

@timfish
Copy link
Collaborator

timfish commented Jan 13, 2025

Have you tried following the profiling setup docs?
https://docs.sentry.io/platforms/javascript/guides/node/profiling/node-profiling/

Note that the profiling binaries might not work out of the box with Electron and they might need to be rebuilt with @electron/rebuild.

@alphaleadership
Copy link
Author

Yes but the needed version Is not build

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 14, 2025
@alphaleadership
Copy link
Author

Is 106

@timfish
Copy link
Collaborator

timfish commented Jan 15, 2025

I'll take a look. This is on my list of things to debug!

@alphaleadership
Copy link
Author

You can fork m'y repo to test

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 15, 2025
@alphaleadership
Copy link
Author

132 with the latest electron version win32x64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants