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 🙏

© 2024 – Pkg Stats / Ryan Hefner

tencentcloud-cls-sdk-js

v1.0.6

Published

TencentCloud CLS Javascript SDK

Downloads

698

Readme

CLS JavaScript SDK

腾讯云CLS日志上传SDK, 支持nodejs

安装指令

npm i tencentcloud-cls-sdk-js

参数描述

| 参数名 | 类型 | 必填 | Description | | ------------- | --------------- | -------- | ------------------------------------------------------------ | | secretId | string | 是 | 访问密钥ID,密钥信息获取请前往密钥获取。并请确保密钥关联的账号具有相应的SDK上传日志权限 | | secretKey | string | 是 | 访问密钥KEY,密钥信息获取请前往密钥获取。并请确保密钥关联的账号具有相应的SDK上传日志权限 | | endpoint | string | 是 | 访问目标日志主题所在地域的域名, e.g. ap-guangzhou.cls.tencentcs.com,详情请参见可用地域 | | sourceIp | string | 否 | 源IP地址 | | retry_times | integer | 是 | 重试次数 | | topic_id | string | 是 | 目标CLS日志服务日志主题ID |

注意:

endpoint填写请参考可用地域API上传日志 Tab中的域名image-20230403191435319

请求样例


// CLS日志服务日志主题ID; 必填参数
let topicID = "xxxx"

let client = new AsyncClient({
						// 目标日志主题所在地域域名; 必填参数
            endpoint: "ap-guangzhou.cls.tencentcs.com",
            // 访问密钥ID; 必填参数
            secretId: "[secretId]", 
            // 访问密钥KEY; 必填参数
            secretKey: "[secretKey]",
            // 源IP地址: 选填参数, 为空则自动填充本机IP
            sourceIp: "127.0.0.1",
            // 重试次数: 必填参数, 为空则自动填充本机IP
            retry_times: 10,
        });

let item = new LogItem()
item.pushBack(new Content("__CONTENT__", "你好,我来自深圳|hello world2"))
item.setTime(Math.floor(Date.now()/1000))

let loggroup = new LogGroup()
loggroup.addLogs(item)
let request = new PutLogsRequest(topicID, loggroup);
let data = await client.PutLogs(request);
console.log(data)

Features

  • 支持lz4压缩上传