【发布时间】:2019-12-01 10:04:22
【问题描述】:
有人知道 Sentry 如何拦截异常吗?
我才刚刚开始使用 Sentry。这是它给我的建议:
// add this
const Sentry = require('@sentry/node');
Sentry.init({ dsn: 'https://eed343acxxxxxxxxxxx3bb7e3f4bc10@sentry.io/1511416' });
// and call some undefined function
myUndefinedFunction();
如果没有try .. catch 的东西,那么 Sentry 是如何跟踪错误的呢?源代码是开放的,但很难掌握。
附:我对内部工作机制感兴趣,而不是用户说明。
【问题讨论】:
标签: javascript node.js sentry