哨兵没有向所需邮件抛出错误

Sentry not throwing error to the required mail

我在我的节点后端使用了 Sentry。这是过程

Sentry.init({
  dsn: 'my address',
  // ...
});
Sentry.captureException(new Error("Something broke"));

现在我没有收到任何错误或邮件。为什么我这里做错了?

您是否让应用程序在 运行 这两行之后立即终止? 如果是这种情况,您可能会在进程更改为刷新(发送到哨兵)其内部队列中的事件之前终止该进程。

文档描述了 Shutting down and draining the queue 的过程。