@zayn919/minisentry-core
v2.0.4
Published
Mini Sentry SDK 核心:零依赖、平台无关的捕获引擎、防洪与脱敏
Maintainers
Readme
@zayn919/minisentry-core
Mini Sentry SDK 核心:零依赖、平台无关的捕获引擎、防洪与脱敏。
默认只发送前端技术异常字段:URL query 与 extra 默认关闭,不采集表单、DOM 文本、请求/响应正文;用户 ID 只有配置 hashUserId 后才会发送。
一般业务请直接使用 @zayn919/minisentry-browser / @zayn919/minisentry-vue3 等适配包。本包适合自研平台二次封装。
安装
npm install @zayn919/minisentry-core示例
import { MiniSentryCore } from '@zayn919/minisentry-core';
const client = new MiniSentryCore({
dsn: 'https://host/api/<public_key>/ingest/',
release: '[email protected]',
});
client.capture({
type: 'error',
message: 'something broke',
frames: [{ filename: 'app.js', lineno: 10, colno: 1 }],
});文档
License
MIT
