getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
332 stars 1.46k forks source link

[Node] Document how to use SDK with bundled code #10416

Open mydea opened 4 months ago

mydea commented 4 months ago

Core or SDK?

Platform/SDK

Which part? Which one?

Node

Description

We should document how you can use auto-instrumentation with node when bundling code into a single file (by configuring externals).

Suggested Solution

Add this to alternative installation docs, possibly?

lforst commented 4 months ago

Question: Did we see people running into problems when bundling their code? As it stands, I think our docs still hold, even when bundling your code. The only thing that is not great is doing the import statement and using ESM.

timfish commented 1 month ago

Did we see people running into problems when bundling their code?

I had trouble with the Sentry bundler plugins upgrading to v8 due to bundling. I didn't look into it that much because I used the ServerRuntimeClient instead.

We already have some bundler e2e tests so this could have just been something specific to our rollup config. I'll have a bit more of a dig around and try and work out what was causing the issues.