|
4 | 4 | </a>
|
5 | 5 | </p>
|
6 | 6 |
|
7 |
| -# Official Sentry SDK for Vercel Edge Runtime [ALPHA] |
| 7 | +# Internal Sentry Utilities for Vercel Edge Runtime |
| 8 | + |
| 9 | +> **NOTICE:** It is discouraged to depend on this package directly. `@sentry/vercel-edge` is used as building block for |
| 10 | +> higher level Sentry SDKs like `@sentry/nextjs`. The API of this `@sentry/vercel-edge` may break with any major and |
| 11 | +> non-major version! |
8 | 12 |
|
9 | 13 | [](https://www.npmjs.com/package/@sentry/vercel-edge)
|
10 | 14 | [](https://www.npmjs.com/package/@sentry/vercel-edge)
|
11 | 15 | [](https://www.npmjs.com/package/@sentry/vercel-edge)
|
12 | 16 |
|
13 | 17 | ## Links
|
14 | 18 |
|
15 |
| -- [Official SDK Docs](https://docs.sentry.io/quickstart/) |
16 |
| -- [TypeDoc](http://getsentry.github.io/sentry-javascript/) |
17 |
| - |
18 |
| -**Note: This SDK is still in an alpha state. Breaking changes can occur at any time.** |
19 |
| - |
20 |
| -## Usage |
21 |
| - |
22 |
| -To use this SDK, call `init(options)` as early as possible in the main entry module. This will initialize the SDK and |
23 |
| -hook into the environment. Note that you can turn off almost all side effects using the respective options. |
24 |
| - |
25 |
| -```javascript |
26 |
| -// CJS Syntax |
27 |
| -const Sentry = require('@sentry/vercel-edge'); |
28 |
| -// ESM Syntax |
29 |
| -import * as Sentry from '@sentry/vercel-edge'; |
30 |
| - |
31 |
| -Sentry.init({ |
32 |
| - dsn: '__DSN__', |
33 |
| - // ... |
34 |
| -}); |
35 |
| -``` |
36 |
| - |
37 |
| -To set context information or send manual events, use the exported functions of `@sentry/vercel-edge`. Note that these |
38 |
| -functions will not perform any action before you have called `init()`: |
39 |
| - |
40 |
| -```javascript |
41 |
| -// Set user information, as well as tags and further extras |
42 |
| -Sentry.setExtra('battery', 0.7); |
43 |
| -Sentry.setTag('user_mode', 'admin'); |
44 |
| -Sentry.setUser({ id: '4711' }); |
45 |
| - |
46 |
| -// Add a breadcrumb for future events |
47 |
| -Sentry.addBreadcrumb({ |
48 |
| - message: 'My Breadcrumb', |
49 |
| - // ... |
50 |
| -}); |
51 |
| - |
52 |
| -// Capture exceptions, messages or manual events |
53 |
| -Sentry.captureMessage('Hello, world!'); |
54 |
| -Sentry.captureException(new Error('Good bye')); |
55 |
| -Sentry.captureEvent({ |
56 |
| - message: 'Manual', |
57 |
| - stacktrace: [ |
58 |
| - // ... |
59 |
| - ], |
60 |
| -}); |
61 |
| -``` |
| 19 | +- [Sentry.io](https://sentry.io/?utm_source=github&utm_medium=npm_vercel_edge) |
| 20 | +- [Sentry Discord Server](https://discord.gg/Ww9hbqr) |
| 21 | +- [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry) |
0 commit comments