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

@qapm/sse-minitor

v1.0.4

Published

qapm js sse monitor client

Readme

RUM大模型体验分析web-sdk使用文档

sdk版本:1.0.4

1、接入参数说明

| 字段名 | 是否必填 | 类型 | 说明 | 默认值 | | ----------------------- | -------- | ------------- | ------------------------------------------------------------------------------ | ----------------------- | | ​app_key​ | 是 | string | 上报的ID,需在RUM产品创建并获取,https://console.cloud.tencent.com/monitor/app | | | ​llm_ver​ | 是 | string | 大模型版本号,可通过 setLLMVer 动态设置 | | | ​include_url_reg​ | 是 | array | 需要监控的URL正则表达式数组 | | | ​use_fetch​ | 否 | boolean | 是否监控 window.fetch 的流式请求 | true | | ​use_xhr​ | 否 | boolean | 是否监控 window.XMLHttpRequest 的流式请求 | true | | ​user_event_source​ | 否 | boolean | 是否监控 window.EventSource | true | | ​user_id​ | 否 | string | 用户ID,可通过 setUserID 动态设置 | | | ​qapm_base_url​ | 否 | string | 性能数据上报地址 | https://app.rumt-zh.com | | ​version​ | 否 | string | 前端版本号 | | | ​host_ip​ | 否 | string | 接口服务端IP,可通过 setHostIP 动态设置 | UNSUPPORTED | | ​log_level​ | 否 | string (枚举) | 日志级别:none(关闭)、error、warn、info、debug、log | none |

2、接入方式

(1)使用script标签的方式接入

    <script src="https://qapmcdn-1253358381.cos.ap-guangzhou.myqcloud.com/web-sdk/latest/sse.qapm.js"></script>
    <script>
        const option = {
            app_key: "5f68970f-10248",
            llm_ver: "deepseek-7b",
            include_url_reg: [/conversation/, /https\:\/\/fibona\.woa\.com\/v1\/component\/session\/\d+$/],

            use_fetch: true,
            use_xhr: true,
            use_event_source: true,
            user_id: "smithabc",
            qapm_base_url: "https://app.rumt-zh.com",
            version: "1.0.0",
            host_ip: "10.2.3.40"
        }
        window.QAPM.initLLMMonitor(option)
    </script>

(2)npm安装后,使用import接入

安装依赖: npm install @qapm/sse-minitor

引入:

import {
    initLLMMonitor
} from "@qapm/sse-minitor"
const option = {
    app_key: "5f68970f-10248",
    llm_ver: "deepseek-7b",
    include_url_reg: [/conversation/, /https\:\/\/fibona\.woa\.com\/v1\/component\/session\/\d+$/],

    use_fetch: true,
    use_xhr: true,
    use_event_source: true,
    user_id: "smithabc",
    qapm_base_url: "https://app.rumt-zh.com",
    version: "1.0.0",
    host_ip: "10.2.3.40"
}
initLLMMonitor(option)

3、可用接口

(1)设置用户ID

import {
    setUserID
} from "@qapm/sse-minitor";
setUserID("OA::smithdeng");
或者
window.QAPM.setUserID("OA::smithdeng");

(2)设置模型版本

import {
    setLLMVer
} from "@qapm/sse-minitor";
setLLMVer("hunyuan-7b");
或者
window.QAPM.setLLMVer("hunyuan-7b");

(3)设置模型接口的服务端IP

import {
    setHostIP
} from "@qapm/sse-minitor";
setHostIP("10.2.3.40");
或者
window.QAPM.setHostIP("10.2.3.40");