@zayn919/minisentry-browser
v2.0.4
Published
Mini Sentry Browser SDK:Runtime / Promise / Network(XHR+fetch) 错误采集
Maintainers
Readme
@zayn919/minisentry-browser
Mini Sentry Browser SDK:自动采集 Runtime Error、Promise Rejection、Network(fetch / XHR)。
安装
npm install @zayn919/minisentry-browser快速开始
import { init, getClient, close } from '@zayn919/minisentry-browser';
init({
dsn: 'https://sentry.example.com/api/<public_key>/ingest/',
release: '[email protected]',
environment: 'production',
sampleRate: 1,
dedupeWindow: 2000,
maxEventsPerMinute: 30,
});
getClient()?.capture({ type: 'error', message: '手动上报' });
// SPA 卸载时可选
// close();文档
完整配置项、行为说明与发布流程见仓库 docs/SDK_USAGE.md。
License
MIT
