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

feat(nestjs): add SentryGlobalGenericFilter and allow specifying application ref in global filter #13673

Merged

Conversation

Sjoertjuh
Copy link
Contributor

@Sjoertjuh Sjoertjuh commented Sep 12, 2024

Currently, a hybrid nestjs application should create its own global filter, since there is no way to use both http and graphql exception filters from sentry. This adds a new filter that uses the correct filter based on the context.

The new filter should also be usable for http-only and graphql-only applications, so it could be possible to deprecate the other filters.

These changes also allow the application ref to be set in the SentryGlobalFilter, which can be nice if the filter is registered with app.useGlobalFilters()

@mydea mydea requested review from lforst and chargome September 13, 2024 08:44
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for that! The new e2e did not pass yet, did you try running it locally?

@chargome chargome self-assigned this Sep 19, 2024
@Sjoertjuh
Copy link
Contributor Author

I can't seem to properly run the tests locally. I followed the CONTRIBUTING.md, but for some reason the tests keep failing because of a timeout (Test timeout of 30000ms exceeded.)

@Sjoertjuh Sjoertjuh requested a review from chargome September 20, 2024 09:26
@chargome
Copy link
Member

@Sjoertjuh thanks, I'll check that today and get back to you

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sjoertjuh looks good already, only the file formatting failed (yarn lint:prettier && yarn lint:biome)

@Sjoertjuh Sjoertjuh requested a review from chargome September 24, 2024 07:18
@chargome chargome merged commit 5fffd1b into getsentry:develop Sep 24, 2024
125 checks passed
Lms24 pushed a commit that referenced this pull request Sep 24, 2024
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #13673

Co-authored-by: chargome <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants