@openclaw/diagnostics-prometheus 2026.7.1 → 2026.7.2-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 CHANGED
@@ -1,5 +1,6 @@
1
1
  import { isInternalDiagnosticEventMetadata, redactSensitiveText } from "./api.js";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
+ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
3
4
  //#region extensions/diagnostics-prometheus/src/service.ts
4
5
  const DURATION_BUCKETS_SECONDS = [
5
6
  .005,
@@ -194,7 +195,7 @@ function createPrometheusMetricStore() {
194
195
  };
195
196
  }
196
197
  function safeErrorMessage(err) {
197
- return redactSensitiveText(err instanceof Error ? err.message ?? err.name : String(err)).replaceAll("\0", " ").replace(/[\r\n\t\u2028\u2029]/gu, " ").slice(0, 500);
198
+ return truncateUtf16Safe(redactSensitiveText(err instanceof Error ? err.message ?? err.name : String(err)).replaceAll("\0", " ").replace(/[\r\n\t\u2028\u2029]/gu, " "), 500);
198
199
  }
199
200
  function shouldRecordDiagnosticEvent(metadata) {
200
201
  return metadata.trusted || isInternalDiagnosticEventMetadata(metadata);
@@ -547,8 +548,8 @@ function recordDiagnosticEvent(store, evt, metadata) {
547
548
  if (evt.droppedUntrustedEvents !== void 0) store.counter("openclaw_diagnostic_async_queue_dropped_total", "Async diagnostic queue drops by dropped event class.", { drop_class: "untrusted" }, numericValue(evt.droppedUntrustedEvents));
548
549
  if (evt.droppedPriorityEvents !== void 0) store.counter("openclaw_diagnostic_async_queue_dropped_total", "Async diagnostic queue drops by dropped event class.", { drop_class: "priority" }, numericValue(evt.droppedPriorityEvents));
549
550
  store.gauge("openclaw_diagnostic_async_queue_length", "Latest async diagnostic queue length after a drop summary.", {}, numericValue(evt.queueLength));
550
- return;
551
- case "diagnostic.heartbeat": return;
551
+ break;
552
+ case "diagnostic.heartbeat": break;
552
553
  case "telemetry.exporter":
553
554
  store.counter("openclaw_telemetry_exporter_total", "Telemetry exporter lifecycle events.", {
554
555
  exporter: lowCardinalityLabel(evt.exporter),
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/diagnostics-prometheus",
3
- "version": "2026.7.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/diagnostics-prometheus",
9
- "version": "2026.7.1"
9
+ "version": "2026.7.2-beta.2"
10
10
  }
11
11
  }
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/diagnostics-prometheus",
3
- "version": "2026.7.1",
3
+ "version": "2026.7.2-beta.2",
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.7.1"
21
+ "pluginApi": ">=2026.7.2-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.7.1"
24
+ "openclawVersion": "2026.7.2-beta.2"
25
25
  },
26
26
  "release": {
27
27
  "publishToClawHub": true,
@@ -38,7 +38,7 @@
38
38
  "README.md"
39
39
  ],
40
40
  "peerDependencies": {
41
- "openclaw": ">=2026.7.1"
41
+ "openclaw": ">=2026.7.2-beta.2"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "openclaw": {