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

feat(node): Log process and thread info on initialisation #11972

Merged
merged 3 commits into from May 10, 2024

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented May 10, 2024

Starting Sentry via --require and --import can cause the SDK to be initialised in every worker thread and forked process which can be confusing to users. With debug: true you can see the SDK being initialised multiple times but it's not immediately obvious why this is happening.

This PR adds logging to the NodeClient constructor that logs Initializing Sentry along with with the process.pid and threadId to make it a little more clear what's happening:

image

Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser 21.65 KB (0%)
@sentry/browser (incl. Tracing) 32.68 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.02 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.42 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.06 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.24 KB (0%)
@sentry/browser (incl. Feedback) 37.76 KB (0%)
@sentry/browser (incl. sendFeedback) 26.21 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.77 KB (0%)
@sentry/react 24.33 KB (0%)
@sentry/react (incl. Tracing) 35.64 KB (0%)
@sentry/vue 25.48 KB (0%)
@sentry/vue (incl. Tracing) 34.47 KB (0%)
@sentry/svelte 21.78 KB (0%)
CDN Bundle 24.13 KB (0%)
CDN Bundle (incl. Tracing) 34.05 KB (0%)
CDN Bundle (incl. Tracing, Replay) 67.72 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 72.86 KB (0%)
CDN Bundle - uncompressed 70.99 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 101 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.61 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 223.61 KB (0%)
@sentry/nextjs (client) 34.87 KB (0%)
@sentry/sveltekit (client) 33.24 KB (0%)
@sentry/node 147.41 KB (+0.05% 🔺)

@lforst lforst merged commit 1a51583 into develop May 10, 2024
83 checks passed
@lforst lforst deleted the timfish/node-process-thread branch May 10, 2024 12:13
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.

None yet

2 participants