@openclaw/diagnostics-otel 2026.5.4-beta.1 → 2026.5.4-beta.2
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/dist/index.js +15 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1299,6 +1299,18 @@ function createDiagnosticsOtelService() {
|
|
|
1299
1299
|
});
|
|
1300
1300
|
span.end(evt.ts);
|
|
1301
1301
|
};
|
|
1302
|
+
const recordDiagnosticPhaseCompleted = (evt) => {
|
|
1303
|
+
if (!tracesEnabled) return;
|
|
1304
|
+
const spanAttrs = {
|
|
1305
|
+
"openclaw.phase": lowCardinalityAttr(evt.name, "unknown"),
|
|
1306
|
+
...evt.cpuUserMs !== void 0 ? { "openclaw.phase.cpu_user_ms": evt.cpuUserMs } : {},
|
|
1307
|
+
...evt.cpuSystemMs !== void 0 ? { "openclaw.phase.cpu_system_ms": evt.cpuSystemMs } : {},
|
|
1308
|
+
...evt.cpuTotalMs !== void 0 ? { "openclaw.phase.cpu_total_ms": evt.cpuTotalMs } : {},
|
|
1309
|
+
...evt.cpuCoreRatio !== void 0 ? { "openclaw.phase.cpu_core_ratio": evt.cpuCoreRatio } : {}
|
|
1310
|
+
};
|
|
1311
|
+
for (const [key, value] of Object.entries(evt.details ?? {})) spanAttrs[`openclaw.phase.detail.${key}`] = typeof value === "boolean" ? String(value) : value;
|
|
1312
|
+
spanWithDuration("openclaw.diagnostic.phase", spanAttrs, evt.durationMs, { endTimeMs: evt.ts }).end(evt.ts);
|
|
1313
|
+
};
|
|
1302
1314
|
const recordTelemetryExporter = (evt, metadata) => {
|
|
1303
1315
|
if (!metadata.trusted) return;
|
|
1304
1316
|
telemetryExporterCounter.add(1, {
|
|
@@ -1368,6 +1380,9 @@ function createDiagnosticsOtelService() {
|
|
|
1368
1380
|
case "diagnostic.liveness.warning":
|
|
1369
1381
|
recordLivenessWarning(evt);
|
|
1370
1382
|
return;
|
|
1383
|
+
case "diagnostic.phase.completed":
|
|
1384
|
+
recordDiagnosticPhaseCompleted(evt);
|
|
1385
|
+
return;
|
|
1371
1386
|
case "run.started":
|
|
1372
1387
|
recordRunStarted(evt, metadata);
|
|
1373
1388
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/diagnostics-otel",
|
|
3
|
-
"version": "2026.5.4-beta.
|
|
3
|
+
"version": "2026.5.4-beta.2",
|
|
4
4
|
"description": "OpenClaw diagnostics OpenTelemetry exporter",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"minHostVersion": ">=2026.4.25"
|
|
35
35
|
},
|
|
36
36
|
"compat": {
|
|
37
|
-
"pluginApi": ">=2026.5.4-beta.
|
|
37
|
+
"pluginApi": ">=2026.5.4-beta.2"
|
|
38
38
|
},
|
|
39
39
|
"build": {
|
|
40
|
-
"openclawVersion": "2026.5.4-beta.
|
|
40
|
+
"openclawVersion": "2026.5.4-beta.2"
|
|
41
41
|
},
|
|
42
42
|
"release": {
|
|
43
43
|
"publishToClawHub": true,
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"openclaw.plugin.json"
|
|
53
53
|
],
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"openclaw": ">=2026.5.4-beta.
|
|
55
|
+
"openclaw": ">=2026.5.4-beta.2"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"openclaw": {
|