ModuleMetadata

将模块元数据添加到堆栈帧中。

Import name: Sentry.moduleMetadataIntegration

元数据可以通过 Sentry 打包插件使用 _experiments.moduleMetadata 配置选项注入。一旦添加了此集成,传递给打包插件的元数据将被添加到所有事件的堆栈帧中的 module_metadata 属性下。这可以用于帮助标记或路由来自不同团队或来源的事件。

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

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