@openclaw/diagnostics-otel 2026.8.1-beta.2 → 2026.8.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/README.md CHANGED
@@ -14,7 +14,7 @@ Restart the Gateway after installing or updating the plugin.
14
14
 
15
15
  ## Configure
16
16
 
17
- Enable the plugin and set the OTLP endpoint in `plugins.entries.diagnostics-otel.config`.
17
+ Enable the plugin, set `diagnostics.otel.enabled` to `true`, and set the collector URL in `diagnostics.otel.endpoint`.
18
18
 
19
19
  The full config surface, metric names, span names, and collector examples live in the docs:
20
20
 
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createDiagnosticsOtelService } from "./runtime-api-1JbI8_wJ.js";
1
+ import { t as createDiagnosticsOtelService } from "./runtime-api-DYYOitFJ.js";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
3
  //#region extensions/diagnostics-otel/index.ts
4
4
  var diagnostics_otel_default = definePluginEntry({
@@ -308,8 +308,7 @@ function describeJsonValue(value) {
308
308
  //#endregion
309
309
  //#region extensions/diagnostics-otel/src/service-exporter.ts
310
310
  function normalizeEndpoint(endpoint) {
311
- const trimmed = endpoint?.trim();
312
- return trimmed ? trimmed.replace(/\/+$/, "") : void 0;
311
+ return endpoint?.trim() || void 0;
313
312
  }
314
313
  const SIGNAL_QUALIFIED_OTLP_PATH_PATTERN = /\/v1\/(traces|metrics|logs)$/iu;
315
314
  function appendOrReplaceSignalPath(value, path) {
@@ -317,9 +316,11 @@ function appendOrReplaceSignalPath(value, path) {
317
316
  return SIGNAL_QUALIFIED_OTLP_PATH_PATTERN.test(base) ? base.replace(SIGNAL_QUALIFIED_OTLP_PATH_PATTERN, `/${path}`) : `${base}/${path}`;
318
317
  }
319
318
  function resolveSharedOtelUrl(endpoint, path) {
320
- const matchedSignal = (endpoint.split(/[?#]/, 1)[0] ?? endpoint).replace(/\/+$/u, "").match(SIGNAL_QUALIFIED_OTLP_PATH_PATTERN)?.[1];
319
+ const endpointWithoutQueryOrFragment = endpoint.split(/[?#]/, 1)[0] ?? endpoint;
320
+ const base = endpointWithoutQueryOrFragment.replace(/\/+$/u, "");
321
+ const matchedSignal = base.match(SIGNAL_QUALIFIED_OTLP_PATH_PATTERN)?.[1];
321
322
  const requestedSignal = path.slice(path.lastIndexOf("/") + 1);
322
- if (matchedSignal?.toLowerCase() === requestedSignal.toLowerCase()) return endpoint;
323
+ if (matchedSignal?.toLowerCase() === requestedSignal.toLowerCase()) return endpoint === endpointWithoutQueryOrFragment ? base : endpoint;
323
324
  if (/[?#]/u.test(endpoint)) {
324
325
  const url = new URL(endpoint);
325
326
  url.pathname = appendOrReplaceSignalPath(url.pathname, path);
@@ -327,11 +328,8 @@ function resolveSharedOtelUrl(endpoint, path) {
327
328
  }
328
329
  return appendOrReplaceSignalPath(endpoint, path);
329
330
  }
330
- function normalizeSignalEndpoint(endpoint) {
331
- return endpoint?.trim() || void 0;
332
- }
333
331
  function resolveSignalOtelUrl(params) {
334
- const signalEndpoint = normalizeSignalEndpoint(params.signalEndpoint ?? params.signalEnvEndpoint);
332
+ const signalEndpoint = normalizeEndpoint(params.signalEndpoint ?? params.signalEnvEndpoint);
335
333
  const endpoint = signalEndpoint ?? params.endpoint;
336
334
  const signalEnvEndpoint = params.signalEnvEndpoint?.trim() ? params.signalEnvEndpoint : void 0;
337
335
  const sharedEnvEndpoint = params.sharedEnvEndpoint?.trim() ? params.sharedEnvEndpoint : void 0;
@@ -1680,13 +1678,7 @@ function contentParts(value) {
1680
1678
  if (!isRecord(part)) continue;
1681
1679
  const text = textPartContent(part);
1682
1680
  if (text !== void 0) parts.push(textPart(text));
1683
- else if (part.type === "toolCall" && typeof part.name === "string") parts.push({
1684
- type: "tool_call",
1685
- name: part.name,
1686
- ...typeof part.id === "string" ? { id: part.id } : {},
1687
- ...part.arguments !== void 0 ? { arguments: part.arguments } : {}
1688
- });
1689
- else if (part.type === "tool_call" && typeof part.name === "string") parts.push({
1681
+ else if ((part.type === "toolCall" || part.type === "tool_call") && typeof part.name === "string") parts.push({
1690
1682
  type: "tool_call",
1691
1683
  name: part.name,
1692
1684
  ...typeof part.id === "string" ? { id: part.id } : {},
@@ -1,2 +1,2 @@
1
- import { t as createDiagnosticsOtelService } from "./runtime-api-1JbI8_wJ.js";
1
+ import { t as createDiagnosticsOtelService } from "./runtime-api-DYYOitFJ.js";
2
2
  export { createDiagnosticsOtelService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/diagnostics-otel",
3
- "version": "2026.8.1-beta.2",
3
+ "version": "2026.8.1",
4
4
  "description": "OpenClaw diagnostics OpenTelemetry exporter for metrics, traces, and logs.",
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.8.1-beta.2"
37
+ "pluginApi": ">=2026.8.1"
38
38
  },
39
39
  "build": {
40
- "openclawVersion": "2026.8.1-beta.2"
40
+ "openclawVersion": "2026.8.1"
41
41
  },
42
42
  "release": {
43
43
  "publishToClawHub": true,
@@ -53,7 +53,7 @@
53
53
  "README.md"
54
54
  ],
55
55
  "peerDependencies": {
56
- "openclaw": ">=2026.8.1-beta.2"
56
+ "openclaw": ">=2026.8.1"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "openclaw": {