-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Sentry/Express tracing issues when using
app.use()
(#440)
## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> Express performs some runtime checks to assess functions being used to handle middleware. When used with Express Sentry middleware (which wraps other endpoints, like Inngest's), our internal use of variadic arguments can produce a function signature that looks like it can't adequately handle a request. This should be resolved by using the signature of the function passed when creating the serve handler, ensuring we keep the function signature looking healthy. Thanks for the repro of this issue, @spastorelli! Looks fixed using this PR (`inngest@pr-440`). - Original repro: https://replit.com/@spsgitbook/InngestWithSentryRepro#index.js - Fixed repro: https://replit.com/@jpwilliams1/InngestWithSentryRepro#index.js `npm install inngest@pr-440` ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [ ] ~~Added a [docs PR](https://github.com/inngest/website) that references this PR~~ N/A Bug fix - [x] Added unit/integration tests - [x] Added changesets if applicable ## Related - Fixes #436 - getsentry/sentry-javascript#3284
- Loading branch information
1 parent
cb953ee
commit 0fc642d
Showing
5 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"inngest": patch | ||
--- | ||
|
||
Fix an issue where Sentry's wrapping of `inngest/express` caused Sentry to throw a runtime error during instantiation |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters