-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
What SDK should we use for isomorphic JS #5805
-
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/browser
SDK Version
7.13
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
I'm curious which SDK we should be using if we need Sentry on both the client & server but we don't use NextJS. Should we still use the Next SDK? I also saw there is an electron SDK that seems to support both browser and node. The existing closed issues seem to just be for Next users so any guidance on this would be appreciated.
Expected Result
1 Sentry library working on both client and server
Actual Result
Not sure which library to install
Beta Was this translation helpful? Give feedback.
All reactions
Hey! We recommend initializing two SDK instances, one for the server (@sentry/node
) and one for the client (@sentry/browser
). This is how the NextJS SDK and the Electron SDK works under the hood.
Replies: 2 comments 3 replies
-
Hey! We recommend initializing two SDK instances, one for the server (@sentry/node
) and one for the client (@sentry/browser
). This is how the NextJS SDK and the Electron SDK works under the hood.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hey @AbhiPrasad, thanks for letting me know!
Beta Was this translation helpful? Give feedback.
All reactions
-
I just released npm package sentries which allows you to have one simple sentry package that works everywhere
Beta Was this translation helpful? Give feedback.
All reactions
-
Hey @remorses - I assume this works by using package.json
exports? Unfortunately in some bundlers, deployment environments, and usages of certain Node.js loaders this doesn't work well. Cool project though! Feel free to blog or post on social media about it, we're more than happy to share it though Sentry's social media.
I recommend you follow the same versioning structure of the @sentry/X
packages in isosentry
so that users know exactly what sentry releases map to isosentry
.
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes I am using exports
, if you use modern bundlers and runtimes it should work pretty well, it's supported everywhere nowadays
Beta Was this translation helpful? Give feedback.