@wujibase/cls-report
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

CLS 日志上报

Usage

import { ClsLogger } from '@wujibase/cls-report';

new WUJIServer({
  // ...
  xySetting: {
    // ...
    dataSource: {
      clsLogger: new ClsLogger({
        endpoint: 'ap-{region}.cls.tencentyun.com',
        secretId: '{yunti-平台子用户-secret-id}',
        secretKey: '{yunti-平台子用户-secret-key}',
        topicId: '{cls-topic-id}',
        keys: ['k1', 'k2'], // 见下面说明
      }),
    },
  },
});

// keys 说明
// cls 以 kv 上报的形式,这里先定义上报字段列表,上报时直接上报对应的值列表
// clsLogger.report(['v1', 'v2']);

Readme

Keywords

none

Package Sidebar

Install

npm i @wujibase/cls-report

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

30 kB

Total Files

16

Last publish

Collaborators

  • maoyiluo
  • vvdennisjames
  • yzzhuo