Debug
允许您检查传递给 `beforeSend` 或 `beforeSendTransaction` 的已处理事件和提示对象的内容。(已弃用)
弃用通知
Debug
集成已弃用,并将在 SDK 的下一个主要版本中移除。 要记录传出的事件,我们建议在 Sentry.init()
中使用 钩子选项。
Import name: Sentry.debugIntegration
此集成允许您检查传递给 beforeSend
或 beforeSendTransaction
的已处理事件和提示对象的内容。它将始终作为最后一个集成运行,无论它何时注册。
请注意,这与在您的 Sentry.init
选项中设置 debug: true
(这将在控制台中启用调试日志记录)不同。
Copied
import * as Sentry from "@sentry/node";
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
integrations: [Sentry.debugIntegration()],
});
Type: boolean
触发 DevTools 调试器而不是使用 console.log
。
Type: boolean
在传递给 console.log
之前将事件转换为字符串。