npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sl-error-tracker

v1.0.19

Published

错误监控SDK

Readme

sl-error-tracker

错误监控SDK

功能

  • 支持监控vue运行,js错误,异步请求错误,资源加载错误
  • 支持收集用户加载时间,dom加载时间,首屏渲染时间,用户停留时长
  • 支持基础数据上报

用法

安装

npm install sl-error-tracker

使用

import { createApp } from 'vue';
import router from './router';
import * as tracker from 'sl-error-tracker';
import App from './App.vue';

const app = createApp(App);

const { logger } = tracker.init(app, {
  environment: "development/production" // 开发环境会把错误日志直接输出到控制台
  dingTalkWebHook:'',  // 钉钉群告警机器人的webhook地址
  dingTalkNotice: true, // 是否开启钉钉通知
  baseURL: '',  // 接口上报地址
  ipURL: '',  // IP地址获取接口
  router: router, //vue-router实例 用于收集每个页面停留时长
});
app.use(router);
app.config.globalProperties.logger = logger;
app.mount('#app');

数据结构

核心数据都在event_params节点

uuid: '', //设备的唯一标记,前端生成,可以根据设备指纹啥的,任意即可 0-j-g-f
uid: '', //UG用户id 8e4051a0-66f1-4968-90cf-0ed11af4adca
event_code: 'click', //事件编码
event_params: '', //业务自定义上报 JSON '{"name": ""}'
event_time: 0,
req_id: '', //请求id  529ab3e6-14c7-4854-928c-2789ddafa347
sig: '', //签名
app_id: '1', //1=测算商城 2=聆听 3=万年历
attr: {
    ip: '',
    scan_time: 0, //浏览时长 毫秒 1000
    mobile: '', // 手机号
    dy_send_id: '1', //短邮的发送记录id
    referer: '', // 父级的url 
    url: window.location.href, //当前url 
    app_version: '1.0.3', //当前版本
    useragent: navigator.userAgent, //浏览器信息
    language: 'zh-CN',
    time_zone: tool.getTimeZone(), //时区
    screen_width: window.screen.width,
    screen_height: window.screen.height,
    screen_size: window.screen.width + ' * ' + window.screen.height,
    title: document.title,
    cookie: '', // decodeURI()  加密
},