No description
Find a file
Weston Thayer 6aef4b8445
Update with-sentry example to show how to track API routes + bug fixes (#16484)
## New features

- Example of how to use `Sentry.captureException()` in API routes 5a35982717

## Bug fixes

- Server-side source maps now work in Sentry when deployed to Vercel 629a9ed504
- If uploading source maps, `Sentry.init()` now sets the `release`, so that exceptions are correctly associated with the source maps in that release

## Open issues

### `_error.js` is unused for `getServerSideProps` errors when deployed to Vercel

Instead of rendering this example's overridden `_error.js` (like it does when testing locally with `NODE_ENV='production'`), when deployed to Vercel and an Error is thrown from `getServerSideProps`, this page is shown:

![Screenshot of Vercel Application Error page](https://user-images.githubusercontent.com/709153/90968889-aa3c3d00-e4a6-11ea-9eff-fafee3d1ff33.png)

This confuses me because the Error is still successfully sent to Sentry, but I would've expected it to be sent by the call to `Sentry.captureException()` in `_error.js`. I'm not sure why it works.

### API test 2 & 3 don't work in the "server" build config

They don't work when deployed to Vercel in the "serverless" config either, but that's expected because there aren't any handlers to flush the Sentry queue. I can't figure out why they don't work in the long-lived "server" config.
2020-11-09 18:36:36 +00:00
.github Update Azure config (#18931) 2020-11-09 00:56:39 -05:00
.vscode skip node internals (#13345) 2020-05-25 16:21:06 +02:00
bench Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
docs Add type keyword to API Routes examples (#18234) 2020-11-09 03:24:02 +00:00
errors Update default widths configuration to handle 2x/3x DPI (#18717) 2020-11-03 02:12:46 +00:00
examples Update with-sentry example to show how to track API routes + bug fixes (#16484) 2020-11-09 18:36:36 +00:00
packages Upgrade sass-loader to 10.0.5 (#18972) 2020-11-09 15:14:47 +00:00
test Fix false positive in isSerializable with shared references in arrays (#18232) 2020-11-09 14:25:41 +00:00
.eslintignore Update Azure config (#18931) 2020-11-09 00:56:39 -05:00
.eslintrc.json Remove unused variable (#13716) 2020-06-03 11:58:58 -04:00
.gitignore Update Azure config (#18931) 2020-11-09 00:56:39 -05:00
.npmrc Remove version prefix 2018-10-02 01:35:56 +02:00
.prettierignore Update Azure config (#18931) 2020-11-09 00:56:39 -05:00
.prettierignore_staged Move next-codemod to Next.js monorepo (#15536) 2020-08-10 11:14:53 +02:00
.prettierrc.json Prettier trailingComma default value to es5 since 2.0 (#14391) 2020-06-22 13:25:24 +02:00
azure-pipelines.yml Update Azure cache key (#18964) 2020-11-09 06:43:24 +00:00
check-examples.sh Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
check-pre-compiled.sh Pre-ncc compiled packages to prevent re-nccing unnecessarily (#11569) 2020-04-07 09:42:16 -04:00
CODE_OF_CONDUCT.md Update Code of Conduct email address (#12108) 2020-04-22 16:27:24 +02:00
contributing.md Simplify example usage instructions (#16678) 2020-08-29 22:22:02 -04:00
jest.config.js Use the jest-circus test runner (#12974) 2020-05-16 16:56:06 -04:00
lerna.json v10.0.2-canary.5 2020-11-08 18:13:02 -06:00
license.md Update year on license files 2020-04-21 12:24:08 +02:00
lint-staged.config.js Update browserslist/caniuse-lite (#13605) 2020-05-31 19:37:01 +00:00
package.json ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
publish-release.sh Make sure to exit publish script with correct code (#10310) 2020-01-28 14:03:32 -05:00
readme.md Monorepo (#5341) 2018-10-01 01:02:10 +02:00
release-stats.sh Update release stats workflow (#17580) 2020-10-05 09:32:12 +00:00
release.js Remove common PR title prefixes 2020-08-07 09:34:50 +02:00
run-tests.js Update Azure config (#18931) 2020-11-09 00:56:39 -05:00
SECURITY.md Create SECURITY.md 2020-07-13 19:25:08 +02:00
test-file.txt Add additional file serving tests (#12479) 2020-05-04 11:58:19 -05:00
UPGRADING.md Move upgrading guide to /docs (#10727) 2020-02-28 23:46:18 +01:00
vercel.json Silence GH Comments for Preview URLs (#18766) 2020-11-03 21:59:47 +00:00
yarn.lock Upgrade sass-loader to 10.0.5 (#18972) 2020-11-09 15:14:47 +00:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Authors