# sentry

> 通过 npm 安装 @sentry/node，并用 Sentry.init 配置 dsn 的最小接入示例。

- 发布于: 2019-11-08
- 原文: https://shanyue.tech/posts/node/sentry/
- 标签: node
- 专栏: Node 牛刀小试

---

```bash
$ npm install @sentry/node
```

```js
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: "https://f1dd118c70e04dc2bfbcd7296ae11f05@o274112.ingest.sentry.io/5278778",
});
```
