Giter Site home page Giter Site logo

Comments (6)

mydea avatar mydea commented on June 21, 2024

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.

mydea avatar mydea commented on June 21, 2024

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.

jd-carroll avatar jd-carroll commented on June 21, 2024

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.

jd-carroll avatar jd-carroll commented on June 21, 2024

@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:
image

Here is the latest screenshot from esbuild output:
image
image

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.

mydea avatar mydea commented on June 21, 2024

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.

mydea avatar mydea commented on June 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.