@openclaw/diagnostics-prometheus 2026.10.10-beta.5 → 2026.10.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/diagnostics-prometheus/api.ts"},{"output":"index.js","source":"extensions/diagnostics-prometheus/index.ts"}],"chunks":[{"output":"api.js","sha256":"a514f9c1b0487fa17674557ed61c64a027d8c883f0f25c7d912d77b89f6c9dc0","facadeSource":"extensions/diagnostics-prometheus/api.ts","sources":[]},{"output":"index.js","sha256":"
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/diagnostics-prometheus/api.ts"},{"output":"index.js","source":"extensions/diagnostics-prometheus/index.ts"}],"chunks":[{"output":"api.js","sha256":"a514f9c1b0487fa17674557ed61c64a027d8c883f0f25c7d912d77b89f6c9dc0","facadeSource":"extensions/diagnostics-prometheus/api.ts","sources":[]},{"output":"index.js","sha256":"8f565bb9bed1d097bec1b77224c0683fa39f7e08a8ff16e27d79dd8119c028c8","facadeSource":"extensions/diagnostics-prometheus/index.ts","sources":["extensions/diagnostics-prometheus/index.ts","extensions/diagnostics-prometheus/src/prometheus-format.ts","extensions/diagnostics-prometheus/src/prometheus-metric-store.ts","extensions/diagnostics-prometheus/src/service-child-process.ts","extensions/diagnostics-prometheus/src/service-memory.ts","extensions/diagnostics-prometheus/src/service-model-usage.ts","extensions/diagnostics-prometheus/src/service-operation-timing.ts","extensions/diagnostics-prometheus/src/service-sessions.ts","extensions/diagnostics-prometheus/src/service-worker.ts","extensions/diagnostics-prometheus/src/service.ts"]}],"unrenderedSources":["extensions/diagnostics-prometheus/api.ts"]}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { isDiagnosticsEnabled, normalizeDiagnosticLane, normalizeDiagnosticValue
|
|
|
4
4
|
import { asNonNegativeFiniteNumber } from "openclaw/plugin-sdk/number-runtime";
|
|
5
5
|
import { getPluginRuntimeGatewayRequestScope } from "openclaw/plugin-sdk/plugin-runtime";
|
|
6
6
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
|
-
|
|
7
|
+
// extensions/diagnostics-prometheus/src/prometheus-format.ts
|
|
8
8
|
function sortedLabels(labels) {
|
|
9
9
|
const entries = Object.entries(labels);
|
|
10
10
|
entries.sort(([left], [right]) => left.localeCompare(right));
|
|
@@ -32,8 +32,7 @@ function seconds(ms) {
|
|
|
32
32
|
const value = asNonNegativeFiniteNumber(ms);
|
|
33
33
|
return value === void 0 ? void 0 : value / 1e3;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
//#region extensions/diagnostics-prometheus/src/prometheus-metric-store.ts
|
|
35
|
+
// extensions/diagnostics-prometheus/src/prometheus-metric-store.ts
|
|
37
36
|
const DURATION_BUCKETS_SECONDS = [
|
|
38
37
|
.005,
|
|
39
38
|
.01,
|
|
@@ -164,8 +163,7 @@ function createPrometheusMetricStore() {
|
|
|
164
163
|
snapshot
|
|
165
164
|
};
|
|
166
165
|
}
|
|
167
|
-
|
|
168
|
-
//#region extensions/diagnostics-prometheus/src/service-child-process.ts
|
|
166
|
+
// extensions/diagnostics-prometheus/src/service-child-process.ts
|
|
169
167
|
/** Git owners and SQLite session transports carry bounded operation labels. */
|
|
170
168
|
function recordChildProcessSpawn(store, evt) {
|
|
171
169
|
store.counter("openclaw_child_process_spawn_total", "Successful child launches through the shared spawn and exec owners.", {
|
|
@@ -173,8 +171,7 @@ function recordChildProcessSpawn(store, evt) {
|
|
|
173
171
|
operation: normalizeDiagnosticValue(evt.operation ?? (evt.family === "git" ? "unknown" : "none"))
|
|
174
172
|
}, asNonNegativeFiniteNumber(evt.count) ?? 0);
|
|
175
173
|
}
|
|
176
|
-
|
|
177
|
-
//#region extensions/diagnostics-prometheus/src/service-memory.ts
|
|
174
|
+
// extensions/diagnostics-prometheus/src/service-memory.ts
|
|
178
175
|
function recordMemorySample(store, memory, byteBuckets) {
|
|
179
176
|
for (const message of memory.workerMessages ?? []) {
|
|
180
177
|
const labels = {
|
|
@@ -250,8 +247,7 @@ function recordMemorySample(store, memory, byteBuckets) {
|
|
|
250
247
|
}
|
|
251
248
|
store.histogram("openclaw_memory_rss_bytes", "RSS memory sample distribution in bytes.", {}, asNonNegativeFiniteNumber(memory.rssBytes), byteBuckets);
|
|
252
249
|
}
|
|
253
|
-
|
|
254
|
-
//#region extensions/diagnostics-prometheus/src/service-model-usage.ts
|
|
250
|
+
// extensions/diagnostics-prometheus/src/service-model-usage.ts
|
|
255
251
|
const TOKEN_BUCKETS = [
|
|
256
252
|
1,
|
|
257
253
|
4,
|
|
@@ -295,8 +291,7 @@ function recordModelUsage(store, evt) {
|
|
|
295
291
|
store.counter("openclaw_model_cost_usd_total", "Estimated model cost in USD reported by diagnostic usage events.", labels, asNonNegativeFiniteNumber(evt.costUsd) ?? 0);
|
|
296
292
|
store.histogram("openclaw_model_usage_duration_seconds", "Model usage event duration in seconds.", labels, seconds(evt.durationMs));
|
|
297
293
|
}
|
|
298
|
-
|
|
299
|
-
//#region extensions/diagnostics-prometheus/src/service-operation-timing.ts
|
|
294
|
+
// extensions/diagnostics-prometheus/src/service-operation-timing.ts
|
|
300
295
|
const RPC_DURATION_BUCKETS_SECONDS = [
|
|
301
296
|
.005,
|
|
302
297
|
.01,
|
|
@@ -481,8 +476,7 @@ function recordWorktreePreparation(store, evt) {
|
|
|
481
476
|
}, typeof elapsed === "number" ? seconds(elapsed) : void 0);
|
|
482
477
|
}
|
|
483
478
|
}
|
|
484
|
-
|
|
485
|
-
//#region extensions/diagnostics-prometheus/src/service-sessions.ts
|
|
479
|
+
// extensions/diagnostics-prometheus/src/service-sessions.ts
|
|
486
480
|
function createGatewayWorkMetricsRecorder(store) {
|
|
487
481
|
return (snapshot) => {
|
|
488
482
|
if (!snapshot) {
|
|
@@ -535,8 +529,7 @@ function recordSessionDiagnosticEvent(store, evt) {
|
|
|
535
529
|
});
|
|
536
530
|
}
|
|
537
531
|
}
|
|
538
|
-
|
|
539
|
-
//#region extensions/diagnostics-prometheus/src/service-worker.ts
|
|
532
|
+
// extensions/diagnostics-prometheus/src/service-worker.ts
|
|
540
533
|
function recordWorkerRequest(store, event) {
|
|
541
534
|
store.gauge("openclaw_worker_queue_depth", "Requests awaiting dispatch across worker owners of this kind.", { kind: event.kind }, event.queueDepth);
|
|
542
535
|
const labels = {
|
|
@@ -592,8 +585,7 @@ function recordWorkerRequest(store, event) {
|
|
|
592
585
|
}, seconds(finished - started));
|
|
593
586
|
}
|
|
594
587
|
}
|
|
595
|
-
|
|
596
|
-
//#region extensions/diagnostics-prometheus/src/service.ts
|
|
588
|
+
// extensions/diagnostics-prometheus/src/service.ts
|
|
597
589
|
const BYTE_BUCKETS = [
|
|
598
590
|
1024,
|
|
599
591
|
4096,
|
|
@@ -1022,8 +1014,7 @@ function createDiagnosticsPrometheusExporter() {
|
|
|
1022
1014
|
}
|
|
1023
1015
|
};
|
|
1024
1016
|
}
|
|
1025
|
-
|
|
1026
|
-
//#region extensions/diagnostics-prometheus/index.ts
|
|
1017
|
+
// extensions/diagnostics-prometheus/index.ts
|
|
1027
1018
|
const exporter = createDiagnosticsPrometheusExporter();
|
|
1028
1019
|
var diagnostics_prometheus_default = definePluginEntry({
|
|
1029
1020
|
id: "diagnostics-prometheus",
|
|
@@ -1040,5 +1031,4 @@ var diagnostics_prometheus_default = definePluginEntry({
|
|
|
1040
1031
|
});
|
|
1041
1032
|
}
|
|
1042
1033
|
});
|
|
1043
|
-
//#endregion
|
|
1044
1034
|
export { diagnostics_prometheus_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/diagnostics-prometheus",
|
|
3
|
-
"version": "2026.10.10
|
|
3
|
+
"version": "2026.10.10",
|
|
4
4
|
"description": "OpenClaw diagnostics Prometheus exporter for runtime metrics.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.4.25"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.10.10
|
|
21
|
+
"pluginApi": ">=2026.10.10"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.10.10
|
|
24
|
+
"openclawVersion": "2026.10.10"
|
|
25
25
|
},
|
|
26
26
|
"release": {
|
|
27
27
|
"publishToClawHub": true,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"assets/activity.svg"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"openclaw": ">=2026.10.10
|
|
42
|
+
"openclaw": ">=2026.10.10"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"openclaw": {
|