getsentry / sentry-javascript-bundler-plugins

JavaScript Bundler Plugins for Sentry
https://sentry.io
BSD 3-Clause "New" or "Revised" License
142 stars 37 forks source link

feat: Update Sentry telemetry to v8 #604

Closed timfish closed 2 months ago

timfish commented 2 months ago

Closes #579

Since we bundle the SDK into bundler-plugin-core, this PR migrates to using ServerRuntimeClient rather than the Node client because we don't need otel instrumentations and it reduces the bundle size by ~300kB. I copied and simplified the Node http transport because referencing the Node SDK at all caused bundling issues.

I also added a way to integration test the telemetry by setting a global which is used to store envelopes rather than sending them.