Comments (6)
Thank you for raising this, this is a valid point. We will adjust this so that we do not include all integrations by default for serverless, meaning you'll have to manually add the DB integrations etc. you care about.
from sentry-javascript.
We just shipped v8.0.0, where we do not automatically add all auto Instrumentation anymore. This should help to reduce the default bundle size!
from sentry-javascript.
Amazing, thank you for getting this in last minute ❤️
Separately, it would be nice to have a little more detail to the instrumentation customization guide.
from sentry-javascript.
@mydea I just tried v8.0.0 🎊 ... and the problem still exists.
The core of the issue is that they are "statically" imported and still on a valid code path:
Here is the latest screenshot from esbuild output:
So there is no difference, despite the changes you included in v8.
Would it be possible to create a "node-core" package that is most of the current "node" package? The difference being, using @sentry/node
would be an instantiation of "node-core" and contain references to all of the standard instrumentation. But then "serverless" would be an instantiation of "node-core" (instead of "node") and only have reference to:
- instrumentation-aws-sdk
- instrumentation-http
- instrumentation-aws-lambda
Then you would be required to add any additional if you wanted.
from sentry-javascript.
So just the presence/exporting of certain things should normally not affect the bundle size. As long as the code is not used, it should be tree-shaken away. How do you build your lambda function, if I may ask? Maybe there is some config option missing to ensure tree shaking works as expected 🤔
EDIT: Ignore this, I've seen there is a new issue with newer info.
from sentry-javascript.
Actually, I just noticed my "fix" did not really fix this. I will make sure to actually fix the bundle size, sorry about that...
from sentry-javascript.
Related Issues (20)
- hasTracingEnabled doesn't handle undefined values correctly HOT 1
- Seeing a spam of ResizeObserver has completed errors and repeated infinite requests to Sentry with the same body HOT 5
- some problem when I use Sentry.sessionTimingIntegration() with @sentry/vue Vesion HOT 3
- Web vitals board is empty, even if vitals seems to be registered in metrics HOT 7
- Incorrect error message received when Sentry DSN not provided HOT 1
- Next.js docs for v8.0.0 HOT 4
- @sentry/nextjs v8 does not create issue/error on vercel for API Route Handler HOT 5
- Multiple days long transactions that do not have any child spans
- Multiple incompatible `Scope` types in v8.x HOT 4
- [node][8.0.0] TypeError: acs.getCurrentScope is not a function HOT 7
- Sentry reports even handled errors in Fastify HOT 1
- [Sentry] Express is not instrumented. This is likely because you required/imported express before calling `Sentry.init()` HOT 17
- Redis span ops marked as 'db' instead of 'cache' HOT 6
- Node SDK generating Error: ENOENT in v8 HOT 8
- PPR - Static bail out error caught when using partial prerending nextjs HOT 3
- Incorrect v8 (241) lambda layer dependencies HOT 1
- Critical Dependency Warning After Upgrading to @sentry/nextjs v8 HOT 4
- Remix request handler build could be a function HOT 1
- [Replay] User feedback screenshotting in replays look wonky
- Error using v8 lambda layer (243) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-javascript.