You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 callSentry.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 thesetup.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 bemodule
, since the file actually mainly exports theSentryModule
. This would require to also rename thesetup.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
andSentryGlobalGraphQLFilter
). For this reason these filters still live in this file. However, these filters are no longer part of theSentryModule
, 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
.The text was updated successfully, but these errors were encountered: