Skip to content

@tripo3d/lens / index / ErrorPluginOptions

Interface: ErrorPluginOptions ​

Defined in: src/plugins/error/index.ts:26

ErrorPlugin 构造选项(领域私有,不进全局 InitConfig)

Extends ​

  • ErrorControlOptions.WhiteScreenOptions

Properties ​

PropertyTypeDescriptionInherited fromDefined in
errorRateLimit?number全局滑动窗口限流条数(默认 10)ErrorControlOptions.errorRateLimitsrc/plugins/error/control.ts:12
errorSessionMax?number每指纹会话上限(含首次),达上限同指纹静默仅本地累计(默认 5)ErrorControlOptions.errorSessionMaxsrc/plugins/error/control.ts:14
rateWindowMs?number限流窗口 ms(默认 60000)ErrorControlOptions.rateWindowMssrc/plugins/error/control.ts:16
captureApi?boolean采集 api 错误(fetch/XHR HTTP 失败)。默认关(包裹属侵入操作);开启后自动排除 SDK 自身上报接口防反馈环-src/plugins/error/index.ts:28
captureResource?boolean采集资源加载错误(默认 true)-src/plugins/error/index.ts:30
captureSsr?boolean采集 SSR 服务端错误:读 __TRIPO_SSR_ERR__ 容器归 ssr 子类。默认关(需服务端先注入容器,否则 no-op)-src/plugins/error/index.ts:32
captureWhiteScreen?boolean启用白屏检测(默认 true;无 DOM 自动 no-op)-src/plugins/error/index.ts:34
detectTamper?boolean检测原生方法(fetch/XHR/sendBeacon)篡改(安全信号)。默认关;篡改归 js 错误,须在 api 包裹之前跑避免误报自身 wrap-src/plugins/error/index.ts:36
errorLevels?Partial<Record<ErrorEventType, ErrorLevelRule[]>>本地分级规则,按错误类型分组(优先级 local,低于 remote、高于默认)-src/plugins/error/index.ts:38
whiteScreenContainers?string[]空容器白名单(默认 html/body/#app/#__nuxt + 常见骨架屏容器选择器)WhiteScreenOptions.whiteScreenContainerssrc/plugins/error/white-screen.ts:23
whiteScreenDelay?number首屏判定延迟 ms(默认 1000)WhiteScreenOptions.whiteScreenDelaysrc/plugins/error/white-screen.ts:25

基于 MIT 协议发布(内部使用)