ReportingObserver

通过 `ReportingObserver` 接口捕获报告并将其发送到 Sentry。

Import name: Sentry.reportingObserverIntegration

此集成连接到 Reporting API,并将捕获的事件发送到 Sentry。它可以配置为仅处理特定的问题类型。

Copied
import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  integrations: [Sentry.reportingObserverIntegration()],
});

Type: ('crash'|'deprecation'|'intervention')[]

仅处理给定的问题类型。默认情况下,所有问题类型都会被处理。