Skip to content

Commit

Permalink
docs(vercel-edge): Update @sentry/vercel-edge readme to remove alph…
Browse files Browse the repository at this point in the history
…a status and clarify usage recommendations (#13329)
  • Loading branch information
lforst authored Aug 13, 2024
1 parent 043ae7e commit 334f869
Showing 1 changed file with 8 additions and 48 deletions.
56 changes: 8 additions & 48 deletions packages/vercel-edge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,18 @@
</a>
</p>

# Official Sentry SDK for Vercel Edge Runtime [ALPHA]
# Internal Sentry Utilities for Vercel Edge Runtime

> **NOTICE:** It is discouraged to depend on this package directly. `@sentry/vercel-edge` is used as building block for
> higher level Sentry SDKs like `@sentry/nextjs`. The API of this `@sentry/vercel-edge` may break with any major and
> non-major version!
[![npm version](https://img.shields.io/npm/v/@sentry/vercel-edge.svg)](https://www.npmjs.com/package/@sentry/vercel-edge)
[![npm dm](https://img.shields.io/npm/dm/@sentry/vercel-edge.svg)](https://www.npmjs.com/package/@sentry/vercel-edge)
[![npm dt](https://img.shields.io/npm/dt/@sentry/vercel-edge.svg)](https://www.npmjs.com/package/@sentry/vercel-edge)

## Links

- [Official SDK Docs](https://docs.sentry.io/quickstart/)
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)

**Note: This SDK is still in an alpha state. Breaking changes can occur at any time.**

## Usage

To use this SDK, call `init(options)` as early as possible in the main entry module. This will initialize the SDK and
hook into the environment. Note that you can turn off almost all side effects using the respective options.

```javascript
// CJS Syntax
const Sentry = require('@sentry/vercel-edge');
// ESM Syntax
import * as Sentry from '@sentry/vercel-edge';

Sentry.init({
dsn: '__DSN__',
// ...
});
```

To set context information or send manual events, use the exported functions of `@sentry/vercel-edge`. Note that these
functions will not perform any action before you have called `init()`:

```javascript
// Set user information, as well as tags and further extras
Sentry.setExtra('battery', 0.7);
Sentry.setTag('user_mode', 'admin');
Sentry.setUser({ id: '4711' });

// Add a breadcrumb for future events
Sentry.addBreadcrumb({
message: 'My Breadcrumb',
// ...
});

// Capture exceptions, messages or manual events
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
message: 'Manual',
stacktrace: [
// ...
],
});
```
- [Sentry.io](https://sentry.io/?utm_source=github&utm_medium=npm_vercel_edge)
- [Sentry Discord Server](https://discord.gg/Ww9hbqr)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry)

0 comments on commit 334f869

Please sign in to comment.