@openclaw/diagnostics-prometheus 2026.11.1 → 2026.11.3

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 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
- // extensions/diagnostics-prometheus/src/prometheus-format.ts
7
+ //#region 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,7 +32,8 @@ function seconds(ms) {
32
32
  const value = asNonNegativeFiniteNumber(ms);
33
33
  return value === void 0 ? void 0 : value / 1e3;
34
34
  }
35
- // extensions/diagnostics-prometheus/src/prometheus-metric-store.ts
35
+ //#endregion
36
+ //#region extensions/diagnostics-prometheus/src/prometheus-metric-store.ts
36
37
  const DURATION_BUCKETS_SECONDS = [
37
38
  .005,
38
39
  .01,
@@ -163,7 +164,8 @@ function createPrometheusMetricStore() {
163
164
  snapshot
164
165
  };
165
166
  }
166
- // extensions/diagnostics-prometheus/src/service-child-process.ts
167
+ //#endregion
168
+ //#region extensions/diagnostics-prometheus/src/service-child-process.ts
167
169
  /** Git owners and SQLite session transports carry bounded operation labels. */
168
170
  function recordChildProcessSpawn(store, evt) {
169
171
  store.counter("openclaw_child_process_spawn_total", "Successful child launches through the shared spawn and exec owners.", {
@@ -171,7 +173,8 @@ function recordChildProcessSpawn(store, evt) {
171
173
  operation: normalizeDiagnosticValue(evt.operation ?? (evt.family === "git" ? "unknown" : "none"))
172
174
  }, asNonNegativeFiniteNumber(evt.count) ?? 0);
173
175
  }
174
- // extensions/diagnostics-prometheus/src/service-memory.ts
176
+ //#endregion
177
+ //#region extensions/diagnostics-prometheus/src/service-memory.ts
175
178
  function recordMemorySample(store, memory, byteBuckets) {
176
179
  for (const message of memory.workerMessages ?? []) {
177
180
  const labels = {
@@ -247,7 +250,8 @@ function recordMemorySample(store, memory, byteBuckets) {
247
250
  }
248
251
  store.histogram("openclaw_memory_rss_bytes", "RSS memory sample distribution in bytes.", {}, asNonNegativeFiniteNumber(memory.rssBytes), byteBuckets);
249
252
  }
250
- // extensions/diagnostics-prometheus/src/service-model-usage.ts
253
+ //#endregion
254
+ //#region extensions/diagnostics-prometheus/src/service-model-usage.ts
251
255
  const TOKEN_BUCKETS = [
252
256
  1,
253
257
  4,
@@ -291,7 +295,8 @@ function recordModelUsage(store, evt) {
291
295
  store.counter("openclaw_model_cost_usd_total", "Estimated model cost in USD reported by diagnostic usage events.", labels, asNonNegativeFiniteNumber(evt.costUsd) ?? 0);
292
296
  store.histogram("openclaw_model_usage_duration_seconds", "Model usage event duration in seconds.", labels, seconds(evt.durationMs));
293
297
  }
294
- // extensions/diagnostics-prometheus/src/service-operation-timing.ts
298
+ //#endregion
299
+ //#region extensions/diagnostics-prometheus/src/service-operation-timing.ts
295
300
  const RPC_DURATION_BUCKETS_SECONDS = [
296
301
  .005,
297
302
  .01,
@@ -476,7 +481,8 @@ function recordWorktreePreparation(store, evt) {
476
481
  }, typeof elapsed === "number" ? seconds(elapsed) : void 0);
477
482
  }
478
483
  }
479
- // extensions/diagnostics-prometheus/src/service-sessions.ts
484
+ //#endregion
485
+ //#region extensions/diagnostics-prometheus/src/service-sessions.ts
480
486
  function createGatewayWorkMetricsRecorder(store) {
481
487
  return (snapshot) => {
482
488
  if (!snapshot) {
@@ -529,7 +535,8 @@ function recordSessionDiagnosticEvent(store, evt) {
529
535
  });
530
536
  }
531
537
  }
532
- // extensions/diagnostics-prometheus/src/service-worker.ts
538
+ //#endregion
539
+ //#region extensions/diagnostics-prometheus/src/service-worker.ts
533
540
  function recordWorkerRequest(store, event) {
534
541
  store.gauge("openclaw_worker_queue_depth", "Requests awaiting dispatch across worker owners of this kind.", { kind: event.kind }, event.queueDepth);
535
542
  const labels = {
@@ -585,7 +592,8 @@ function recordWorkerRequest(store, event) {
585
592
  }, seconds(finished - started));
586
593
  }
587
594
  }
588
- // extensions/diagnostics-prometheus/src/service.ts
595
+ //#endregion
596
+ //#region extensions/diagnostics-prometheus/src/service.ts
589
597
  const BYTE_BUCKETS = [
590
598
  1024,
591
599
  4096,
@@ -1014,7 +1022,8 @@ function createDiagnosticsPrometheusExporter() {
1014
1022
  }
1015
1023
  };
1016
1024
  }
1017
- // extensions/diagnostics-prometheus/index.ts
1025
+ //#endregion
1026
+ //#region extensions/diagnostics-prometheus/index.ts
1018
1027
  const exporter = createDiagnosticsPrometheusExporter();
1019
1028
  var diagnostics_prometheus_default = definePluginEntry({
1020
1029
  id: "diagnostics-prometheus",
@@ -1031,4 +1040,5 @@ var diagnostics_prometheus_default = definePluginEntry({
1031
1040
  });
1032
1041
  }
1033
1042
  });
1043
+ //#endregion
1034
1044
  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.11.1",
3
+ "version": "2026.11.3",
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.11.1"
21
+ "pluginApi": ">=2026.11.3"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.11.1"
24
+ "openclawVersion": "2026.11.3"
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.11.1"
42
+ "openclaw": ">=2026.11.3"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "openclaw": {
@@ -1 +0,0 @@
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"]}