@trace-pilot/sdk
v1.0.0
Published
Trace Pilot - 前端监控聚合 SDK(错误监控 + 行为埋点 + 性能监控)
Maintainers
Readme
@trace-pilot/sdk
Trace Pilot 聚合 SDK,对外提供统一初始化入口,一次性开启:
- 错误监控(
@trace-pilot/error-monitor) - 用户行为埋点(
@trace-pilot/behavior-monitor) - 性能监控(
@trace-pilot/perf-monitor)
安装
npm install @trace-pilot/sdk快速开始
import { initTracePilot } from '@trace-pilot/sdk';
initTracePilot({
projectName: 'MyAwesomeProject',
environment: 'production',
error: {
reportUrl: 'http://localhost:4000/api/report/error'
},
behavior: {
reportUrl: 'http://localhost:4000/api/report/behavior'
},
perf: {
reportUrl: 'http://localhost:4000/api/report/perf'
}
});如需更细粒度控制,也可以直接使用各子包的 initErrorMonitor、initUserBehaviorMonitor、initPerfMonitor。+
