palz-connector 1.3.9 → 1.4.1
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/openclaw.plugin.json +1 -1
- package/package.json +4 -2
- package/src/bot.ts +1 -1
- package/src/tracing.ts +8 -0
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "palz-connector",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"description": "Palz IM 接入 OpenClaw — 模块化架构,基于 OpenClaw Runtime 消息管道",
|
|
@@ -18,11 +18,13 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@opentelemetry/api": "^1.9.1",
|
|
20
20
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.214.0",
|
|
21
|
+
"@opentelemetry/instrumentation-http": "^0.214.0",
|
|
21
22
|
"@opentelemetry/resources": "^2.6.1",
|
|
22
23
|
"@opentelemetry/sdk-node": "^0.214.0",
|
|
23
24
|
"@opentelemetry/sdk-trace-node": "^2.6.1",
|
|
24
25
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
25
26
|
"ali-oss": "^6.21.0",
|
|
26
|
-
"ws": "^8.18.0"
|
|
27
|
+
"ws": "^8.18.0",
|
|
28
|
+
"mcporter": "^0.8.1"
|
|
27
29
|
}
|
|
28
30
|
}
|
package/src/bot.ts
CHANGED
|
@@ -558,7 +558,7 @@ async function _dispatchPalzMessageInner(params: HandlePalzMessageParams): Promi
|
|
|
558
558
|
log(`${tag}: ${step6bCtx}`);
|
|
559
559
|
span?.addEvent(step6bCtx);
|
|
560
560
|
|
|
561
|
-
const showProcess =
|
|
561
|
+
const showProcess = config.showProcess === true;
|
|
562
562
|
|
|
563
563
|
const ctx = core.channel.reply.finalizeInboundContext({
|
|
564
564
|
Body: combinedBody,
|
package/src/tracing.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* - buildTraceparentHeader(): 构建当前 span 的 W3C traceparent 字符串
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
|
|
11
12
|
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
12
13
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
|
|
13
14
|
import { resourceFromAttributes } from "@opentelemetry/resources";
|
|
@@ -43,6 +44,13 @@ export function initTracing(): void {
|
|
|
43
44
|
traceExporter: new OTLPTraceExporter({
|
|
44
45
|
url: ARMS_ENDPOINT,
|
|
45
46
|
}),
|
|
47
|
+
instrumentations: [
|
|
48
|
+
new HttpInstrumentation({
|
|
49
|
+
ignoreOutgoingUrls: [
|
|
50
|
+
/tracing-analysis.*aliyuncs\.com/, // 排除 ARMS 上报请求自身
|
|
51
|
+
],
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
46
54
|
});
|
|
47
55
|
|
|
48
56
|
sdk.start();
|