clawpro-diagnostics-metrics-cls 2.0.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +161 -8
- package/dist/index.d.ts +165 -0
- package/dist/index.js +294 -0
- package/dist/src/cls-service.d.ts +103 -0
- package/dist/src/cls-service.js +1075 -0
- package/dist/src/credential.d.ts +59 -0
- package/dist/src/credential.js +276 -0
- package/dist/src/crypto-utils.d.ts +35 -0
- package/dist/src/crypto-utils.js +99 -0
- package/dist/src/diagnostics-shim.d.ts +98 -0
- package/dist/src/diagnostics-shim.js +12 -0
- package/dist/src/instance-metadata.d.ts +82 -0
- package/dist/src/instance-metadata.js +727 -0
- package/dist/src/log-service.d.ts +93 -0
- package/dist/src/log-service.js +619 -0
- package/dist/src/protobuf.d.ts +32 -0
- package/dist/src/protobuf.js +139 -0
- package/dist/src/remote-write.d.ts +156 -0
- package/dist/src/remote-write.js +480 -0
- package/dist/src/shared-constants.d.ts +7 -0
- package/{src/shared-constants.ts → dist/src/shared-constants.js} +0 -1
- package/dist/src/shared-credential.d.ts +147 -0
- package/dist/src/shared-credential.js +315 -0
- package/dist/src/trace-config.d.ts +50 -0
- package/dist/src/trace-config.js +140 -0
- package/dist/src/trace-constants.d.ts +33 -0
- package/{src/trace-constants.ts → dist/src/trace-constants.js} +10 -31
- package/dist/src/trace-sender.d.ts +87 -0
- package/dist/src/trace-sender.js +421 -0
- package/dist/src/trace-service.d.ts +45 -0
- package/dist/src/trace-service.js +1984 -0
- package/dist/src/trace-types.d.ts +123 -0
- package/dist/src/trace-types.js +6 -0
- package/dist/src/trace-utils.d.ts +101 -0
- package/dist/src/trace-utils.js +639 -0
- package/openclaw.plugin.json +42 -2
- package/package.json +73 -1
- package/index.ts +0 -216
- package/src/cls-service.ts +0 -1247
- package/src/credential.ts +0 -336
- package/src/crypto-utils.ts +0 -113
- package/src/instance-metadata.ts +0 -743
- package/src/protobuf.ts +0 -160
- package/src/remote-write.ts +0 -636
- package/src/shared-credential.ts +0 -398
- package/src/snappyjs.d.ts +0 -4
- package/src/trace-config.ts +0 -176
- package/src/trace-sender.ts +0 -470
- package/src/trace-service.ts +0 -2128
- package/src/trace-types.ts +0 -141
- package/src/trace-utils.ts +0 -666
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ OpenClaw 诊断指标导出插件,提供以下核心能力:
|
|
|
49
49
|
- [CLS 配置](#cls-配置)
|
|
50
50
|
- [Prometheus 配置](#prometheus-配置可选)
|
|
51
51
|
- [Trace 配置](#trace-配置可选)
|
|
52
|
+
- [Log 日志上报配置](#log-日志上报配置可选)
|
|
52
53
|
- [功能说明](#功能说明)
|
|
53
54
|
- [Prometheus 指标列表](#prometheus-指标列表)
|
|
54
55
|
- [全链路 Trace 追踪](#全链路-trace-追踪)
|
|
@@ -102,6 +103,12 @@ npx --yes clawpro-diagnostics-metrics-cls-onboard-cli install
|
|
|
102
103
|
| `--externalLabels <labels>` | Prometheus 自定义标签(格式:`key1=value1,key2=value2`) | 可选 |
|
|
103
104
|
| `--traceEnabled <bool>` | 是否启用 Trace 链路追踪功能(`true`/`false`,默认 `true`) | 可选 |
|
|
104
105
|
| `--traceTopicId <id>` | Trace 数据上报使用的 CLS 日志主题 ID | 可选(可在配置文件中动态更新) |
|
|
106
|
+
| `--enableLogReport <bool>` | 是否启用日志上报(`true`/`false`,默认 `false`) | 可选 |
|
|
107
|
+
| `--logTopicId <id>` | 日志上报使用的 CLS 日志主题 ID | 可选(可在配置文件中动态更新) |
|
|
108
|
+
| `--logSource <source>` | 日志来源标识,写入每条日志的 `source` 字段(默认 `openclaw`) | 可选 |
|
|
109
|
+
| `--enableGatewayLog <bool>` | 是否启用 gateway 运行日志上报(`true`/`false`,默认 `true`) | 可选 |
|
|
110
|
+
| `--enableSessionLog <bool>` | 是否启用会话日志上报(`true`/`false`,默认 `true`) | 可选 |
|
|
111
|
+
| `--logMinLevel <level>` | 最低上报日志级别,仅对 gateway 运行日志生效(默认 `info`) | 可选 |
|
|
105
112
|
| `--instanceId <id>` | 显式指定实例 ID,写入配置文件后插件启动时直接使用,跳过腾讯云 metadata 接口请求 | 可选 |
|
|
106
113
|
| `--instanceName <name>` | 显式指定实例名称,仅覆盖 `cvm_instance_name`,不影响 `host_name`(后者始终取 `os.hostname()`) | 可选 |
|
|
107
114
|
| `--localIpv4 <ip>` | 显式指定内网 IPv4 | 可选 |
|
|
@@ -373,7 +380,7 @@ Prometheus 功能通过插件的 `config.prometheus` 配置项控制,与 `cls`
|
|
|
373
380
|
"url": "http://prometheus:9090/api/v1/write"
|
|
374
381
|
}
|
|
375
382
|
],
|
|
376
|
-
"push_interval_ms":
|
|
383
|
+
"push_interval_ms": 30000
|
|
377
384
|
}
|
|
378
385
|
}
|
|
379
386
|
}
|
|
@@ -391,7 +398,7 @@ Prometheus 功能通过插件的 `config.prometheus` 配置项控制,与 `cls`
|
|
|
391
398
|
| `pull` | boolean | `true` | 是否启用 `/metrics` HTTP Pull 端点 |
|
|
392
399
|
| `default_metrics` | boolean | `true` | 是否采集 Node.js 默认指标(GC、事件循环等) |
|
|
393
400
|
| `external_labels` | object | `{}` | 附加到所有指标的自定义标签 |
|
|
394
|
-
| `push_interval_ms` | number | `
|
|
401
|
+
| `push_interval_ms` | number | `30000` | Remote Write 推送间隔(毫秒) |
|
|
395
402
|
|
|
396
403
|
> **说明**:当部署在腾讯云环境时,插件会自动注入实例元数据作为标签(`cvm_instance_id`、`cvm_instance_name`、`cvm_instance_intra_ip`)。若在 `external_labels` 中手动配置了同名标签,则以手动配置的值为准。
|
|
397
404
|
|
|
@@ -494,7 +501,142 @@ Trace 功能通过插件的 `config.trace` 配置项控制,与 `cls` 和 `prom
|
|
|
494
501
|
|
|
495
502
|
---
|
|
496
503
|
|
|
497
|
-
|
|
504
|
+
### Log 日志上报配置(可选)
|
|
505
|
+
|
|
506
|
+
Log 日志上报功能通过插件的 `config.log` 配置项控制,与 `cls`、`prometheus` 和 `trace` 配置并列放在 `plugins.entries["clawpro-diagnostics-metrics-cls"].config` 下。
|
|
507
|
+
|
|
508
|
+
**Log 模块复用 `cls` 配置中的 `secretId` / `secretKey` / `endpoint` 凭证**,只需在 `log` 中独立配置 `enableLogReport` 和 `logTopicId`。
|
|
509
|
+
|
|
510
|
+
> **默认关闭**:`enableLogReport` 默认为 `false`,需显式设置为 `true` 才会启用日志上报。
|
|
511
|
+
|
|
512
|
+
#### Log 模块与 Trace 模块的区别
|
|
513
|
+
|
|
514
|
+
| 维度 | Log 模块 | Trace 模块 |
|
|
515
|
+
|------|---------|-----------|
|
|
516
|
+
| **数据来源** | Gateway 运行日志 + 会话消息(session JSONL) | Agent 执行过程中的 Span 事件 |
|
|
517
|
+
| **数据格式** | 扁平化 KV 字段(`log_type`、`level`、`message`、`role`、`content` 等) | OTel GenAI 标准 Span 格式(`traceID`、`spanID`、`parentSpanID`、`kind` 等) |
|
|
518
|
+
| **查询场景** | 运维排障、会话内容审计、日志级别过滤 | 全链路调用追踪、LLM 耗时分析、工具调用链路 |
|
|
519
|
+
| **日志主题** | `logTopicId`(独立配置) | `traceTopicId`(独立配置) |
|
|
520
|
+
| **默认状态** | 默认关闭(`enableLogReport=false`) | 默认关闭(`enabled=false`) |
|
|
521
|
+
|
|
522
|
+
#### 上报的日志类型
|
|
523
|
+
|
|
524
|
+
1. **Gateway 运行日志**(`log_type=gateway`):OpenClaw gateway 进程的运行日志,通过 `registerLogTransport` 实时 flush 流上报,不读取本地日志文件
|
|
525
|
+
2. **会话日志**(`log_type=session`):每条写入会话 JSONL 的消息,通过 `before_message_write` hook 实时上报,与 session JSONL 文件内容完全一致
|
|
526
|
+
|
|
527
|
+
在 `~/.openclaw/openclaw.json` 中添加:
|
|
528
|
+
|
|
529
|
+
```json
|
|
530
|
+
{
|
|
531
|
+
"plugins": {
|
|
532
|
+
"allow": ["clawpro-diagnostics-metrics-cls"],
|
|
533
|
+
"entries": {
|
|
534
|
+
"clawpro-diagnostics-metrics-cls": {
|
|
535
|
+
"enabled": true,
|
|
536
|
+
"config": {
|
|
537
|
+
"cls": {
|
|
538
|
+
"secretId": "your-secret-id",
|
|
539
|
+
"secretKey": "your-secret-key",
|
|
540
|
+
"endpoint": "ap-guangzhou.cls.tencentcs.com"
|
|
541
|
+
},
|
|
542
|
+
"log": {
|
|
543
|
+
"enableLogReport": true,
|
|
544
|
+
"logTopicId": "your-log-topic-id",
|
|
545
|
+
"enableGatewayLog": true,
|
|
546
|
+
"enableSessionLog": true,
|
|
547
|
+
"minLevel": "info"
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
#### Log 基础配置
|
|
557
|
+
|
|
558
|
+
| 字段 | 类型 | 默认值 | 说明 |
|
|
559
|
+
|------|------|--------|------|
|
|
560
|
+
| `enableLogReport` | boolean | `false` | **是否启用日志上报**,默认关闭,需显式设置为 `true` |
|
|
561
|
+
| `logTopicId` | string | — | **必填**(启用时)。日志上报使用的 CLS 日志主题 ID |
|
|
562
|
+
| `source` | string | `"openclaw"` | 日志来源标识,写入每条日志的 `source` 字段 |
|
|
563
|
+
| `enableGatewayLog` | boolean | `true` | 是否启用 gateway 运行日志上报 |
|
|
564
|
+
| `enableSessionLog` | boolean | `true` | 是否启用会话日志上报(session JSONL) |
|
|
565
|
+
| `minLevel` | string | `"info"` | 最低上报日志级别(仅对 gateway 运行日志生效),可选值:`trace`、`debug`、`info`、`warn`、`error`、`fatal` |
|
|
566
|
+
| `sendTimeThreshold` | number | `2` | 异步发送时间阈值(秒) |
|
|
567
|
+
| `sendCountThreshold` | number | `1000` | 异步发送条数阈值 |
|
|
568
|
+
|
|
569
|
+
> **注意**:
|
|
570
|
+
> - Log 功能复用 `cls` 配置中的 `secretId` / `secretKey` / `endpoint` / `token`,无需在 `log` 中重复配置凭证
|
|
571
|
+
> - Log 功能使用独立的 CLS 日志主题(`logTopicId`),与 Prometheus 指标(`metricTopicId`)和 Trace(`traceTopicId`)分开
|
|
572
|
+
> - 所有日志均通过实时 flush 流上报,**不读取本地日志文件**
|
|
573
|
+
> - `enableLogReport` 默认为 `false`,避免在未配置 `logTopicId` 时意外上报
|
|
574
|
+
|
|
575
|
+
#### CLS 日志字段说明
|
|
576
|
+
|
|
577
|
+
每条上报到 CLS 的日志均包含以下字段(以 CLS LogItem KV 格式存储):
|
|
578
|
+
|
|
579
|
+
**Gateway 运行日志(`log_type=gateway`)公共字段:**
|
|
580
|
+
|
|
581
|
+
| 字段名 | 说明 | 示例值 |
|
|
582
|
+
|--------|------|--------|
|
|
583
|
+
| `log_type` | 日志类型,固定为 `gateway` | `gateway` |
|
|
584
|
+
| `level` | 日志级别 | `info`、`warn`、`error` |
|
|
585
|
+
| `message` | 日志消息内容 | `Plugin started successfully` |
|
|
586
|
+
| `source` | 日志来源标识(对应 `log.source` 配置) | `openclaw` |
|
|
587
|
+
| `subsystem` | 子系统名称(来自 tslog bindings,可选) | `cls-service`、`trace-service` |
|
|
588
|
+
| `logger` | logger 实例名称(可选) | `openclaw` |
|
|
589
|
+
| `args` | 额外参数(JSON 序列化,可选) | `[{"key":"value"}]` |
|
|
590
|
+
| `cvm_instance_id` | CVM 实例 ID(仅在腾讯云 CVM 环境下注入) | `ins-xxxxxxxx` |
|
|
591
|
+
| `cvm_instance_name` | CVM 实例名称(仅在腾讯云 CVM 环境下注入) | `my-cvm-instance` |
|
|
592
|
+
| `cvm_instance_intra_ip` | CVM 内网 IPv4(仅在腾讯云 CVM 环境下注入) | `10.0.0.1` |
|
|
593
|
+
|
|
594
|
+
**会话日志(`log_type=session`)公共字段:**
|
|
595
|
+
|
|
596
|
+
| 字段名 | 说明 | 示例值 |
|
|
597
|
+
|--------|------|--------|
|
|
598
|
+
| `log_type` | 日志类型,固定为 `session` | `session` |
|
|
599
|
+
| `role` | 消息角色 | `user`、`assistant`、`toolResult` |
|
|
600
|
+
| `content` | 完整消息 JSON(与写入 session JSONL 文件的行内容一致) | `{"role":"user","content":"..."}` |
|
|
601
|
+
| `source` | 日志来源标识 | `openclaw` |
|
|
602
|
+
| `session_key` | 会话标识 | `feishu_xxxxxxxx` |
|
|
603
|
+
| `agent_id` | Agent 标识 | `default` |
|
|
604
|
+
| `tool_call_id` | 工具调用 ID(仅 `role=toolResult` 时存在) | `toolu_xxxxxxxx` |
|
|
605
|
+
| `tool_name` | 工具名称(仅 `role=toolResult` 时存在) | `web_search` |
|
|
606
|
+
| `stop_reason` | 停止原因(仅 `role=assistant` 时存在) | `tool_use`、`end_turn` |
|
|
607
|
+
| `tool_calls` | 工具调用数量(仅 `role=assistant` 且包含工具调用时存在) | `2` |
|
|
608
|
+
| `cvm_instance_id` | CVM 实例 ID(仅在腾讯云 CVM 环境下注入) | `ins-xxxxxxxx` |
|
|
609
|
+
| `cvm_instance_name` | CVM 实例名称(仅在腾讯云 CVM 环境下注入) | `my-cvm-instance` |
|
|
610
|
+
| `cvm_instance_intra_ip` | CVM 内网 IPv4(仅在腾讯云 CVM 环境下注入) | `10.0.0.1` |
|
|
611
|
+
|
|
612
|
+
#### CLS 日志查询示例
|
|
613
|
+
|
|
614
|
+
在腾讯云 CLS 控制台,选择 `logTopicId` 对应的日志主题,使用以下检索语句:
|
|
615
|
+
|
|
616
|
+
**查询所有 gateway 运行日志(warn 及以上级别):**
|
|
617
|
+
```
|
|
618
|
+
log_type:gateway AND (level:warn OR level:error OR level:fatal)
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
**查询指定会话的所有消息:**
|
|
622
|
+
```
|
|
623
|
+
log_type:session AND session_key:feishu_xxxxxxxx
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
**查询包含工具调用的 assistant 消息:**
|
|
627
|
+
```
|
|
628
|
+
log_type:session AND role:assistant AND tool_calls:*
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
**查询指定工具的执行结果:**
|
|
632
|
+
```
|
|
633
|
+
log_type:session AND role:toolResult AND tool_name:web_search
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
**查询指定时间段内的 error 日志:**
|
|
637
|
+
```
|
|
638
|
+
log_type:gateway AND level:error
|
|
639
|
+
```
|
|
498
640
|
|
|
499
641
|
### Prometheus 指标列表
|
|
500
642
|
|
|
@@ -1113,6 +1255,12 @@ npx --yes clawpro-diagnostics-metrics-cls-onboard-cli UpdateParameter [选项]
|
|
|
1113
1255
|
| `--externalLabels <labels>` | Prometheus 自定义标签(格式:`key1=value1,key2=value2`) | ✅ 需要重启网关 |
|
|
1114
1256
|
| `--traceEnabled <bool>` | 是否启用 Trace 链路追踪功能(`true`/`false`) | ❌ 热加载(约 10 秒内生效) |
|
|
1115
1257
|
| `--traceTopicId <id>` | Trace 数据上报使用的 CLS 日志主题 ID | ❌ 热加载(约 10 秒内生效) |
|
|
1258
|
+
| `--enableLogReport <bool>` | 是否启用日志上报(`true`/`false`) | ❌ 热加载(约 10 秒内生效) |
|
|
1259
|
+
| `--logTopicId <id>` | 日志上报使用的 CLS 日志主题 ID | ❌ 热加载(约 10 秒内生效) |
|
|
1260
|
+
| `--logSource <source>` | 日志来源标识,写入每条日志的 `source` 字段(默认 `openclaw`) | ❌ 热加载(约 10 秒内生效) |
|
|
1261
|
+
| `--enableGatewayLog <bool>` | 是否启用 gateway 运行日志上报(`true`/`false`) | ❌ 热加载(约 10 秒内生效) |
|
|
1262
|
+
| `--enableSessionLog <bool>` | 是否启用会话日志上报(`true`/`false`) | ❌ 热加载(约 10 秒内生效) |
|
|
1263
|
+
| `--logMinLevel <level>` | 最低上报日志级别,仅对 gateway 运行日志生效(`trace`/`debug`/`info`/`warn`/`error`/`fatal`) | ❌ 热加载(约 10 秒内生效) |
|
|
1116
1264
|
| `--instanceId <id>` | 显式指定实例 ID,写入配置文件后插件启动时直接使用,跳过腾讯云 metadata 接口请求 | ❌ 热加载(约 10 秒内生效) |
|
|
1117
1265
|
| `--instanceName <name>` | 显式指定实例名称,仅覆盖 `cvm_instance_name`(不影响 `host_name`) | ❌ 热加载(约 10 秒内生效) |
|
|
1118
1266
|
| `--localIpv4 <ip>` | 显式指定内网 IPv4 | ❌ 热加载(约 10 秒内生效) |
|
|
@@ -1248,6 +1396,12 @@ npx clawpro-diagnostics-metrics-cls-onboard-cli UpdateParameter \
|
|
|
1248
1396
|
| `trace.traceTopicId` | 自动切换 Trace 数据上报的 CLS 日志主题 |
|
|
1249
1397
|
| `trace.debug` | 动态开启/关闭 Trace 调试日志,无需重启即可在运行时排查问题 |
|
|
1250
1398
|
| `trace.enabledHooks` | 动态调整启用的 hook 列表,可在运行时按需启用/禁用特定 hook,无需重启 |
|
|
1399
|
+
| `log.enableLogReport` | 动态启用/禁用日志上报。`false` 时立即停止上报并释放 Producer;`true` 时(需同时配置 `logTopicId`)约 10 秒内自动恢复 |
|
|
1400
|
+
| `log.logTopicId` | 自动切换日志上报的 CLS 日志主题,切换后立即重建 Producer 使新主题生效 |
|
|
1401
|
+
| `log.source` | 动态更新写入每条日志的 `source` 字段标识 |
|
|
1402
|
+
| `log.enableGatewayLog` | 动态开启/关闭 gateway 运行日志上报(注意:关闭后需重启网关才能重新注册 transport) |
|
|
1403
|
+
| `log.enableSessionLog` | 动态开启/关闭会话日志上报(session JSONL) |
|
|
1404
|
+
| `log.minLevel` | 动态调整 gateway 运行日志的最低上报级别,无需重启即可在运行时过滤噪音日志 |
|
|
1251
1405
|
|
|
1252
1406
|
> **注意**:`credentialMode`、`roleName` 等凭证模式相关字段,以及 `prometheusEnabled`、`pushIntervalMs`、`externalLabels` 等 Prometheus 配置字段变更后需要重启网关才能生效。可通过 `UpdateParameter` 命令更新,CLI 会自动判断是否需要重启。
|
|
1253
1407
|
>
|
|
@@ -1722,11 +1876,11 @@ npx clawpro-diagnostics-metrics-cls-onboard-cli install --credentialMode cvmRole
|
|
|
1722
1876
|
}
|
|
1723
1877
|
}
|
|
1724
1878
|
],
|
|
1725
|
-
"push_interval_ms":
|
|
1879
|
+
"push_interval_ms": 30000
|
|
1726
1880
|
},
|
|
1727
1881
|
"cls": {
|
|
1728
1882
|
"metricTopicId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
|
|
1729
|
-
"secretId": "ENC:dGhpcyBpcyBhIGJhc2U2NCBleGFtcGxl...",
|
|
1883
|
+
"secretId": "ENC: "secretId": "ENC:dGhpcyBpcyBhIGJhc2U2NCBleGFtcGxl...",
|
|
1730
1884
|
"secretKey": "ENC:YW5vdGhlciBiYXNlNjQgZXhhbXBsZQ==",
|
|
1731
1885
|
"endpoint": "ap-guangzhou.cls.tencentcs.com",
|
|
1732
1886
|
"enableReport": true
|
|
@@ -1777,11 +1931,10 @@ npx clawpro-diagnostics-metrics-cls-onboard-cli install --credentialMode cvmRole
|
|
|
1777
1931
|
}
|
|
1778
1932
|
}
|
|
1779
1933
|
],
|
|
1780
|
-
"push_interval_ms":
|
|
1934
|
+
"push_interval_ms": 30000
|
|
1781
1935
|
},
|
|
1782
1936
|
"cls": {
|
|
1783
|
-
"credentialMode": "cvmRole",
|
|
1784
|
-
"roleName": "CVM",
|
|
1937
|
+
"credentialMode": "cvmRole" "roleName": "CVM",
|
|
1785
1938
|
"metricTopicId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
|
|
1786
1939
|
"endpoint": "ap-guangzhou.cls.tencentcs.com",
|
|
1787
1940
|
"enableReport": true
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
2
|
+
declare const plugin: {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
configSchema: {
|
|
7
|
+
type: string;
|
|
8
|
+
properties: {
|
|
9
|
+
prometheus: {
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
properties: {
|
|
13
|
+
enabled: {
|
|
14
|
+
type: string;
|
|
15
|
+
default: boolean;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
metric_prefix: {
|
|
19
|
+
type: string;
|
|
20
|
+
default: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
pull: {
|
|
24
|
+
type: string;
|
|
25
|
+
default: boolean;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
default_metrics: {
|
|
29
|
+
type: string;
|
|
30
|
+
default: boolean;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
push_interval_ms: {
|
|
34
|
+
type: string;
|
|
35
|
+
default: number;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
cls: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
properties: {
|
|
44
|
+
endpoint: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
secretId: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
secretKey: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
metricTopicId: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
credentialMode: {
|
|
61
|
+
type: string;
|
|
62
|
+
enum: string[];
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
roleName: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
enableReport: {
|
|
70
|
+
type: string;
|
|
71
|
+
default: boolean;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
log: {
|
|
77
|
+
type: string;
|
|
78
|
+
description: string;
|
|
79
|
+
properties: {
|
|
80
|
+
enableLogReport: {
|
|
81
|
+
type: string;
|
|
82
|
+
default: boolean;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
logTopicId: {
|
|
86
|
+
type: string;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
source: {
|
|
90
|
+
type: string;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
enableGatewayLog: {
|
|
94
|
+
type: string;
|
|
95
|
+
default: boolean;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
enableSessionLog: {
|
|
99
|
+
type: string;
|
|
100
|
+
default: boolean;
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
103
|
+
minLevel: {
|
|
104
|
+
type: string;
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
107
|
+
sendTimeThreshold: {
|
|
108
|
+
type: string;
|
|
109
|
+
default: number;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
sendCountThreshold: {
|
|
113
|
+
type: string;
|
|
114
|
+
default: number;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
trace: {
|
|
120
|
+
type: string;
|
|
121
|
+
description: string;
|
|
122
|
+
properties: {
|
|
123
|
+
enabled: {
|
|
124
|
+
type: string;
|
|
125
|
+
default: boolean;
|
|
126
|
+
description: string;
|
|
127
|
+
};
|
|
128
|
+
traceTopicId: {
|
|
129
|
+
type: string;
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
serviceName: {
|
|
133
|
+
type: string;
|
|
134
|
+
default: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
debug: {
|
|
138
|
+
type: string;
|
|
139
|
+
default: boolean;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
batchSize: {
|
|
143
|
+
type: string;
|
|
144
|
+
default: number;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
flushIntervalMs: {
|
|
148
|
+
type: string;
|
|
149
|
+
default: number;
|
|
150
|
+
description: string;
|
|
151
|
+
};
|
|
152
|
+
enabledHooks: {
|
|
153
|
+
type: string;
|
|
154
|
+
items: {
|
|
155
|
+
type: string;
|
|
156
|
+
};
|
|
157
|
+
description: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
register(api: OpenClawPluginApi): void;
|
|
164
|
+
};
|
|
165
|
+
export default plugin;
|