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

Rename submodule export from setup #13589

Open
Tracked by #12504
nicohrubec opened this issue Sep 4, 2024 · 0 comments
Open
Tracked by #12504

Rename submodule export from setup #13589

nicohrubec opened this issue Sep 4, 2024 · 0 comments
Labels
Package: nestjs Issues related to the Sentry Nestjs SDK

Comments

@nicohrubec
Copy link
Contributor

nicohrubec commented Sep 4, 2024

The setup.ts file in our NestJS SDK relies on imports from @nestjs/core and @nestjs/common. This initially led to problems with our otel instrumentation, because the NestJS packages were being imported in applications before we could call Sentry.init, leading to the standard @nestjs/core otel instrumentation not being loaded properly.

We solved this by adding a submodule export @sentry/nestjs/setup for the setup.ts file. However, the naming of this might be a bit confusing to users or specifically what should be imported from this submodule export vs the non-submodule export. One idea for a rename would be module, since the file actually mainly exports the SentryModule. This would require to also rename the setup.ts file, because the name of the file and submodule path must be identical for some reason.

Additional Note:
Originally the SentryModule also included the global error filters provided by Sentry (SentryGlobalFilter and SentryGlobalGraphQLFilter). For this reason these filters still live in this file. However, these filters are no longer part of the SentryModule, meaning that we could potentially looking into moving these error filters to a separate file, which would then allow us to export them from @sentry/nestjs instead of @sentry/nestjs/setup.

@nicohrubec nicohrubec added Type: Improvement Package: nestjs Issues related to the Sentry Nestjs SDK labels Sep 4, 2024
@nicohrubec nicohrubec changed the title Rename submodule export from setup to module Rename submodule export from setup Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nestjs Issues related to the Sentry Nestjs SDK
Projects
None yet
Development

No branches or pull requests

2 participants