新建 Agent 监测应用¶
- 进入 Agent 监测 > 应用列表;
- 点击“新建应用”;
- 选择 Agent 监测应用 Tab。
集成类型¶
当前支持 OpenClaw 集成框架。
接入配置¶
安装插件¶
复制以下命令到终端执行:
cd ~/.openclaw/extensions
git clone https://github.com/GuanceDemo/openclaw-otel-plugin.git
cd openclaw-otel-plugin
npm install
npm run build
修改配置文件¶
将以下配置合并到本机的 ~/.openclaw/openclaw.json 文件中:
{
"plugins": {
"allow": [
"openclaw-otel-plugin"
],
"load": {
"paths": [
"/Users/yourname/.openclaw/extensions/openclaw-otel-plugin"
]
},
"entries": {
"openclaw-otel-plugin": {
"enabled": true,
"config": {
"endpoint": "https://llm-openway.guance.com",
"tracePath": "v1/write/otel-llm",
"metricsPath": "v1/write/otel-metrics",
"logsEnabled": false,
"logsPath": "v1/write/otel-logs",
"headers": {
"X-Token": "agent_f2a712a939*******896",
"to_headless": "true"
},
"sampleRate": 1,
"serviceName": "openclaw-otel-plugin",
"flushIntervalMs": 15000,
"rootSpanTtlMs": 600000,
"resourceAttributes": {
"agent_provider": "openclaw",
"env": "prod"
}
}
}
}
}
}
注意
高亮字段需要根据右侧表单单独修改,其他字段可保持默认。
重启验证¶
修改配置后执行:
发送一条 OpenClaw 测试消息后,按 trace_id 或 service.name 查询。
填写代码中的变量¶
在页面右侧填写以下信息:
| 字段 | 说明 |
|---|---|
| 应用名称 | 自定义应用名称 |
| 应用 ID | 公钥,仅支持英文、数字、下划线,用于在链路、日志、指标中归属当前应用 |
| 插件路径 | 填写本机 OpenClaw 插件安装目录 |
| 服务地址 | 填写 Dataway 网关地址 |
| Client Token | 应用创建后自动生成,用于从用户设备中发送数据 |
| 诊断日志 | 是否同时上报 OpenClaw diagnosticlogs |
确认信息无误后,点击创建,完成 Agent 监测应用接入。