|
10 | 10 | [](https://www.npmjs.com/package/@sentry/nextjs) |
11 | 11 | [](https://www.npmjs.com/package/@sentry/nextjs) |
12 | 12 |
|
13 | | -> See the [Official Sentry Next.js SDK Docs](https://docs.sentry.io/platforms/javascript/guides/nextjs/) to get started. |
| 13 | +The official Sentry SDK for monitoring Next.js applications. |
14 | 14 |
|
15 | | -## Compatibility |
| 15 | +## Documentation |
16 | 16 |
|
17 | | -Currently, the minimum supported version of Next.js is `14.0.0`. |
| 17 | +- [Getting started](https://docs.sentry.io/platforms/javascript/guides/nextjs/) |
| 18 | +- [Configuration](https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/) |
18 | 19 |
|
19 | | -## Installation |
| 20 | +## Support |
20 | 21 |
|
21 | | -To get started installing the SDK, use the Sentry Next.js Wizard by running the following command in your terminal or |
22 | | -read the [Getting Started Docs](https://docs.sentry.io/platforms/javascript/guides/nextjs/): |
23 | | - |
24 | | -```sh |
25 | | -npx @sentry/wizard@latest -i nextjs |
26 | | -``` |
27 | | - |
28 | | -The wizard will prompt you to log in to Sentry. After the wizard setup is completed, the SDK will automatically capture |
29 | | -unhandled errors, and monitor performance. |
30 | | - |
31 | | -## Custom Usage |
32 | | - |
33 | | -To set context information or to send manual events, you can use `@sentry/nextjs` as follows: |
34 | | - |
35 | | -```ts |
36 | | -import * as Sentry from '@sentry/nextjs'; |
37 | | - |
38 | | -// Set user information, as well as tags and further extras |
39 | | -Sentry.setTag('user_mode', 'admin'); |
40 | | -Sentry.setUser({ id: '4711' }); |
41 | | -Sentry.setContext('application_area', { location: 'checkout' }); |
42 | | - |
43 | | -// Add a breadcrumb for future events |
44 | | -Sentry.addBreadcrumb({ |
45 | | - message: '"Add to cart" clicked', |
46 | | - // ... |
47 | | -}); |
48 | | - |
49 | | -// Capture exceptions or messages |
50 | | -Sentry.captureException(new Error('Oh no.')); |
51 | | -Sentry.captureMessage('Hello, world!'); |
52 | | -``` |
53 | | - |
54 | | -## Links |
55 | | - |
56 | | -- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/nextjs/) |
57 | | -- [Sentry.io](https://sentry.io/?utm_source=github&utm_medium=npm_nextjs) |
58 | | -- [Sentry Discord Server](https://discord.gg/Ww9hbqr) |
59 | | -- [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry) |
| 22 | +- [Report a bug](https://github.com/getsentry/sentry-javascript/issues/new/choose) |
| 23 | +- [Contributing](https://github.com/getsentry/sentry-javascript/blob/develop/CONTRIBUTING.md) |
0 commit comments