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

jad-mon

v1.1.5

Published

##### **这是一个应用于 web 端中的监控服务**

Readme

jad-mon(极光广告前端监控 sdk)

这是一个应用于 web 端中的监控服务
  • 关于 jad-mon:

    1. 这是一个基于 elastic-apm-js-core 底层库封装编写的用于线上生产环境监控,适用于 web 无感嵌入监控,
    2. 上报功能基于 elastic-apm-js-core 底层 transaction 上报模式 - 扩展 transaction 部分功能,提供 network request 监控, element-action 监控, urlChange(spa->PageChange)监控
  • 功能:

    • 新增 transaction 相关服务,以下服务都会产生一个上报 transaction,但是不提供时间轴周期

      1. network_task: 全局监听 network request
      2. elementAction_task: 分为全量 element 动作捕获和标记 element 动作捕获,默认标记 element 动作捕获, 全量捕获: 全局 element -> trigger Event -> catch Event 标记捕获: element 标签 attribute 添加标记数据 -> jad-mon-flag='{这里是标记的 key}'-> flag element -> trigger Event -> catch Event

      3.pageChange_task: 监听 urlChange 相关事件,这里 spa 应用必须使用 hash 模式,不支持 h5-Model

      4.customEvent_task : 通过 api->createCustomLog 创建的自定义 transaction

    • 扩展 transaction 相关服务

      1. Pageload: transaction 自带服务
      2. PageRun: 整合的 transaction 服务,包含 network_task,elementAction_task,完整的用户操作时间轴周期,以 pageChange_task 为一次循环周期
      3. Errors :transaction 自带服务
  • 兼容与支持: 兼容目前所有主流框架运行版本, vue angular react等框架。IE 678 暂未测试

install

请使用npm安装管理
    npm install jad-mon

Examples

一个简单的使用例子

import Tracer from "jad-mon";
const tracerInstance = new Tracer({
  serviceName: "wk-test-1",
  serverUrl: "xxxxx",
  agentVersion: "demo"
});
tracerInstance.setUserInfo({
  id: "9527",
  username: "王凯",
  email: "[email protected]"
});
setTimeout(function() {
  var log = tracerInstance.createCustomLog("wk-test");
  log.addTags({ title: "oy" });
  log.addTags({ value: "我测试一下" });
  log.addTags({ xPath: "自定义事件" });
  log.end();
  tracerInstance.captureError(
    "测试一下,发出一个自定义错误信息, 这个api对接框架库等提供的onError中使用"
  );
  //暂停相关监听
  tracerInstance.stopElementActionCatch();
  tracerInstance.stopPageChangeEventCatch();
  tracerInstance.stopRequestCatch();
  setTimeout(function() {
    //恢复相关监听
    tracerInstance.resumeElementActionCatch();
    tracerInstance.resumePageChangeEventCatch();
    tracerInstance.resumeRequestCatch();
  }, 30000);
}, 20000);
更多 config 配置详情,以及相关 api 等,请参考 Documentation。

Documentation

相关文档说明