Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@sentry/node depends on unused packages #15278

Closed
hitsthings opened this issue Feb 3, 2025 · 3 comments
Closed

@sentry/node depends on unused packages #15278

hitsthings opened this issue Feb 3, 2025 · 3 comments

Comments

@hitsthings
Copy link

Problem Statement

@opentelemetry version management is complicated already with the plethora of packages there, but Sentry depends on a bunch of additional modules I don't need, which in turn depend on further modules I don't need, which creates more dependency management problems. Downloading excess packages is bad for my hard drive, the environment, npm install time, cold start time, my sanity, etc.

Solution Brainstorm

Ideally, @sentry/node would not depend directly on e.g. @opentelemetry/instrumentation-ioredis. You could move it to an optionalDependencies and people could choose whether they want that integration or not. Same for fastify, express, kafka, hapi, graphql, ...

It already fails at runtime, so safety-wise, the benefit is limited for the current setup. It'd be great if it only failed if I actually attempted to include the expressIntegration() or fastifyIntegration() or whatever, rather than failing on startup for any missing dependency.

Product Area

APIs

@getsantry
Copy link

getsantry bot commented Feb 3, 2025

Assigning to @getsentry/support for routing ⏲️

@hitsthings
Copy link
Author

I guess peerDependencies would be better to not install by default. You can use peerDependenciesMeta to set them optional as well.

@ReneGreen27 ReneGreen27 transferred this issue from getsentry/sentry Feb 3, 2025
@getsantry getsantry bot moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 3 Feb 3, 2025
@s1gr1d
Copy link
Member

s1gr1d commented Feb 4, 2025

Hello, I think your concerns are valid. We created an issue for a @sentry/node-core SDK here. Feel free to react with an emoji and subscribe to it.

Closing this as it is a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants