@tars/notify

2.0.0 • Public • Published

@tars/notify

上报业务(框架)消息(告警)至 TARS 平台。

report(message[, id])

将消息上报到平台上,并可以在WEB管理页面上查看到。

  • message: 消息内容( 必填
  • id: 服务线程(进程)ID, 默认值为 process.pid

notify(message[, level, id])

上报通知信息到平台。

  • message: 通知内容( 必填
  • level: 通知内容的级别,为 LEVEL 枚举, 默认值为 LEVEL.NOTIFYNORMAL
  • id: 服务线程(进程)ID, 默认值为 process.pid

LEVEL 枚举中有3项可选:

  • LEVEL.NOTIFYNORMAL: 正常(默认)
  • LEVEL.NOTIFYWARN: 警告
  • LEVEL.NOTIFYERROR: 错误

平台每10分钟对上报的异常进行收敛告警。

Readme

Keywords

Package Sidebar

Install

npm i @tars/notify

Weekly Downloads

27

Version

2.0.0

License

BSD-3-Clause

Unpacked Size

23.7 kB

Total Files

6

Last publish

Collaborators

  • zoucz
  • medns
  • jsfiend
  • superzheng
  • tars_at_tencent