@openclaw/diagnostics-otel 2026.6.5 → 2026.6.6-beta.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/dist/index.js CHANGED
@@ -564,9 +564,9 @@ function assignOtelModelContentAttributes(attributes, content, policy) {
564
564
  if (policy.outputMessages) assignOtelContentAttribute(attributes, "openclaw.content.output_messages", content?.outputMessages);
565
565
  if (policy.systemPrompt) assignOtelContentAttribute(attributes, "openclaw.content.system_prompt", content?.systemPrompt);
566
566
  }
567
- function assignOtelToolContentAttributes(attributes, event, policy) {
568
- if (policy.toolInputs) assignOtelContentAttribute(attributes, "openclaw.content.tool_input", event.toolInput);
569
- if (policy.toolOutputs) assignOtelContentAttribute(attributes, "openclaw.content.tool_output", event.toolOutput);
567
+ function assignOtelToolContentAttributes(attributes, content, policy) {
568
+ if (policy.toolInputs) assignOtelContentAttribute(attributes, "openclaw.content.tool_input", content?.toolInput);
569
+ if (policy.toolOutputs) assignOtelContentAttribute(attributes, "openclaw.content.tool_output", content?.toolOutput);
570
570
  }
571
571
  function assignOtelLogAttribute(attributes, key, value) {
572
572
  if (Object.keys(attributes).length >= MAX_OTEL_LOG_ATTRIBUTE_COUNT) return;
@@ -1881,13 +1881,13 @@ function createDiagnosticsOtelService() {
1881
1881
  startTimeMs: evt.ts
1882
1882
  }));
1883
1883
  };
1884
- const recordToolExecutionCompleted = (evt, metadata) => {
1884
+ const recordToolExecutionCompleted = (evt, metadata, toolContent) => {
1885
1885
  const attrs = toolExecutionBaseAttrs(evt);
1886
1886
  toolExecutionDurationHistogram.record(evt.durationMs, attrs);
1887
1887
  if (!tracesEnabled) return;
1888
1888
  const spanAttrs = { ...toolExecutionBaseAttrs(evt) };
1889
1889
  addRunAttrs(spanAttrs, evt);
1890
- assignOtelToolContentAttributes(spanAttrs, evt, contentCapturePolicy);
1890
+ assignOtelToolContentAttributes(spanAttrs, toolContent, contentCapturePolicy);
1891
1891
  const span = takeTrackedTrustedSpan(evt, metadata) ?? spanWithDuration("openclaw.tool.execution", spanAttrs, evt.durationMs, {
1892
1892
  parentContext: activeTrustedParentContext(evt, metadata),
1893
1893
  endTimeMs: evt.ts
@@ -1895,7 +1895,7 @@ function createDiagnosticsOtelService() {
1895
1895
  setSpanAttrs(span, spanAttrs);
1896
1896
  span.end(evt.ts);
1897
1897
  };
1898
- const recordToolExecutionError = (evt, metadata) => {
1898
+ const recordToolExecutionError = (evt, metadata, toolContent) => {
1899
1899
  const attrs = {
1900
1900
  ...toolExecutionBaseAttrs(evt),
1901
1901
  "openclaw.errorCategory": lowCardinalityAttr(evt.errorCategory, "other")
@@ -1908,7 +1908,7 @@ function createDiagnosticsOtelService() {
1908
1908
  };
1909
1909
  addRunAttrs(spanAttrs, evt);
1910
1910
  if (evt.errorCode) spanAttrs["openclaw.errorCode"] = lowCardinalityAttr(evt.errorCode, "other");
1911
- assignOtelToolContentAttributes(spanAttrs, evt, contentCapturePolicy);
1911
+ assignOtelToolContentAttributes(spanAttrs, toolContent, contentCapturePolicy);
1912
1912
  const span = takeTrackedTrustedSpan(evt, metadata) ?? spanWithDuration("openclaw.tool.execution", spanAttrs, evt.durationMs, {
1913
1913
  parentContext: activeTrustedParentContext(evt, metadata),
1914
1914
  endTimeMs: evt.ts
@@ -2143,10 +2143,10 @@ function createDiagnosticsOtelService() {
2143
2143
  recordToolExecutionStarted(evt, metadata);
2144
2144
  return;
2145
2145
  case "tool.execution.completed":
2146
- recordToolExecutionCompleted(evt, metadata);
2146
+ recordToolExecutionCompleted(evt, metadata, privateData.toolContent);
2147
2147
  return;
2148
2148
  case "tool.execution.error":
2149
- recordToolExecutionError(evt, metadata);
2149
+ recordToolExecutionError(evt, metadata, privateData.toolContent);
2150
2150
  return;
2151
2151
  case "tool.execution.blocked":
2152
2152
  recordToolExecutionBlocked(evt, metadata);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/diagnostics-otel",
3
- "version": "2026.6.5",
3
+ "version": "2026.6.6-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/diagnostics-otel",
9
- "version": "2026.6.5",
9
+ "version": "2026.6.6-beta.1",
10
10
  "dependencies": {
11
11
  "@opentelemetry/api": "1.9.1",
12
12
  "@opentelemetry/api-logs": "0.218.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/diagnostics-otel",
3
- "version": "2026.6.5",
3
+ "version": "2026.6.6-beta.1",
4
4
  "description": "OpenClaw diagnostics OpenTelemetry exporter for metrics and traces.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,10 +31,10 @@
31
31
  "minHostVersion": ">=2026.4.25"
32
32
  },
33
33
  "compat": {
34
- "pluginApi": ">=2026.6.5"
34
+ "pluginApi": ">=2026.6.6-beta.1"
35
35
  },
36
36
  "build": {
37
- "openclawVersion": "2026.6.5"
37
+ "openclawVersion": "2026.6.6-beta.1"
38
38
  },
39
39
  "release": {
40
40
  "publishToClawHub": true,
@@ -51,7 +51,7 @@
51
51
  "README.md"
52
52
  ],
53
53
  "peerDependencies": {
54
- "openclaw": ">=2026.6.5"
54
+ "openclaw": ">=2026.6.6-beta.1"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "openclaw": {