@openclaw/diagnostics-otel 2026.11.5-beta.1 → 2026.11.5-beta.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.
|
@@ -24,7 +24,7 @@ import { B3InjectEncoding, B3Propagator } from "@opentelemetry/propagator-b3";
|
|
|
24
24
|
import { JaegerPropagator } from "@opentelemetry/propagator-jaeger";
|
|
25
25
|
import { ATTR_GEN_AI_INPUT_MESSAGES, ATTR_GEN_AI_OUTPUT_MESSAGES, ATTR_GEN_AI_TOOL_CALL_ARGUMENTS, ATTR_GEN_AI_TOOL_CALL_ID, ATTR_GEN_AI_TOOL_CALL_RESULT, ATTR_GEN_AI_TOOL_DEFINITIONS, GEN_AI_OPERATION_NAME_VALUE_EXECUTE_TOOL, GEN_AI_OPERATION_NAME_VALUE_INVOKE_AGENT } from "@opentelemetry/semantic-conventions/incubating";
|
|
26
26
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
27
|
-
|
|
27
|
+
//#region extensions/diagnostics-otel/src/service-content-normalization.ts
|
|
28
28
|
const MAX_OTEL_CONTENT_ATTRIBUTE_CHARS = 131072;
|
|
29
29
|
const MAX_OTEL_ERROR_MESSAGE_CHARS = 4096;
|
|
30
30
|
const PRELOADED_OTEL_SDK_ENV = "OPENCLAW_OTEL_PRELOADED";
|
|
@@ -39,16 +39,27 @@ function normalizeOtelErrorMessage(value) {
|
|
|
39
39
|
function hasPreloadedOtelSdk() {
|
|
40
40
|
return process.env[PRELOADED_OTEL_SDK_ENV] === "1";
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function createOtelContentRedactor() {
|
|
43
|
+
const redacted = /* @__PURE__ */ new Map();
|
|
44
|
+
return (value) => {
|
|
45
|
+
let result = redacted.get(value);
|
|
46
|
+
if (result === void 0) {
|
|
47
|
+
result = redactSensitiveText(value);
|
|
48
|
+
redacted.set(value, result);
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function normalizeOtelContentValue(value, redact) {
|
|
43
54
|
if (typeof value === "string") return normalizeOtelLogString(value, MAX_OTEL_CONTENT_ATTRIBUTE_CHARS);
|
|
44
55
|
if (Array.isArray(value)) {
|
|
45
56
|
const items = value.slice(0, 200).filter((item) => typeof item === "string");
|
|
46
57
|
if (items.length > 0) return normalizeOtelLogString(items.join("\n"), MAX_OTEL_CONTENT_ATTRIBUTE_CHARS);
|
|
47
58
|
}
|
|
48
|
-
return safeJsonString(value);
|
|
59
|
+
return safeJsonString(value, redact);
|
|
49
60
|
}
|
|
50
|
-
function assignOtelContentAttr(attributes, key, value) {
|
|
51
|
-
const normalized = normalizeOtelContentValue(value);
|
|
61
|
+
function assignOtelContentAttr(attributes, key, value, redact) {
|
|
62
|
+
const normalized = normalizeOtelContentValue(value, redact);
|
|
52
63
|
if (normalized) attributes[key] = normalized;
|
|
53
64
|
}
|
|
54
65
|
const TRUNCATED_JSON_TEXT_SUFFIX = "...(truncated)";
|
|
@@ -74,34 +85,38 @@ const JSON_TRUNCATION_ARRAY_ITEM_BUDGETS = [
|
|
|
74
85
|
];
|
|
75
86
|
const JSON_TRUNCATION_MAX_OBJECT_FIELDS = 64;
|
|
76
87
|
const JSON_TRUNCATION_MAX_DEPTH = 8;
|
|
77
|
-
|
|
88
|
+
const MAX_OTEL_REDACTED_JSON_CANDIDATE_CHARS = 4 * MAX_OTEL_CONTENT_ATTRIBUTE_CHARS;
|
|
89
|
+
function safeJsonString(value, redact = createOtelContentRedactor()) {
|
|
78
90
|
if (value === void 0 || typeof value === "function" || typeof value === "symbol") return;
|
|
79
|
-
const
|
|
80
|
-
|
|
91
|
+
const json = serializeJsonForOtelAttribute(value);
|
|
92
|
+
const exact = json && json.length <= MAX_OTEL_REDACTED_JSON_CANDIDATE_CHARS ? redactJsonWithinAttributeBudget(serializeJsonForOtelAttribute(value, redact)) : void 0;
|
|
93
|
+
if (exact) return exact;
|
|
81
94
|
for (const maxArrayItems of JSON_TRUNCATION_ARRAY_ITEM_BUDGETS) for (const maxStringChars of JSON_TRUNCATION_STRING_BUDGETS) {
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
95
|
+
const truncated = redactJsonWithinAttributeBudget(serializeJsonForOtelAttribute(truncateJsonValueForOtelAttribute(value, maxArrayItems, maxStringChars, redact)));
|
|
96
|
+
if (truncated) return truncated;
|
|
84
97
|
}
|
|
85
|
-
|
|
98
|
+
return redactJsonWithinAttributeBudget(serializeJsonForOtelAttribute({
|
|
86
99
|
truncated: true,
|
|
87
|
-
reason:
|
|
100
|
+
reason: json ? "max_attribute_size" : "unserializable_value",
|
|
88
101
|
type: describeJsonValue(value)
|
|
89
|
-
});
|
|
90
|
-
return summary && summary.length <= MAX_OTEL_CONTENT_ATTRIBUTE_CHARS ? summary : void 0;
|
|
102
|
+
}));
|
|
91
103
|
}
|
|
92
|
-
function
|
|
104
|
+
function serializeJsonForOtelAttribute(value, redact) {
|
|
93
105
|
try {
|
|
94
|
-
|
|
95
|
-
if (!json) return;
|
|
96
|
-
return redactSensitiveText(json);
|
|
106
|
+
return JSON.stringify(value, redact ? (_key, field) => typeof field === "string" ? redact(field) : field : void 0) || void 0;
|
|
97
107
|
} catch {
|
|
98
108
|
return;
|
|
99
109
|
}
|
|
100
110
|
}
|
|
101
|
-
function
|
|
111
|
+
function redactJsonWithinAttributeBudget(json) {
|
|
112
|
+
if (!json || json.length > MAX_OTEL_REDACTED_JSON_CANDIDATE_CHARS) return;
|
|
113
|
+
const redacted = redactSensitiveText(json);
|
|
114
|
+
return redacted.length <= 131072 ? redacted : void 0;
|
|
115
|
+
}
|
|
116
|
+
function truncateJsonValueForOtelAttribute(input, maxArrayItems, maxStringChars, redact) {
|
|
102
117
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
103
118
|
function visit(value, depth) {
|
|
104
|
-
if (typeof value === "string" || typeof value === "bigint") return truncateJsonTextForOtelAttribute(String(value), maxStringChars);
|
|
119
|
+
if (typeof value === "string" || typeof value === "bigint") return truncateJsonTextForOtelAttribute(redact(String(value)), maxStringChars);
|
|
105
120
|
if (typeof value === "number" || typeof value === "boolean" || value === null) return value;
|
|
106
121
|
if (typeof value !== "object") return;
|
|
107
122
|
if (depth <= 0) return {
|
|
@@ -139,8 +154,7 @@ function truncateJsonValueForOtelAttribute(input, maxArrayItems, maxStringChars)
|
|
|
139
154
|
}
|
|
140
155
|
return visit(input, JSON_TRUNCATION_MAX_DEPTH);
|
|
141
156
|
}
|
|
142
|
-
function truncateJsonTextForOtelAttribute(
|
|
143
|
-
const redacted = redactSensitiveText(value);
|
|
157
|
+
function truncateJsonTextForOtelAttribute(redacted, maxChars) {
|
|
144
158
|
if (redacted.length <= maxChars) return redacted;
|
|
145
159
|
const suffixBudget = Math.min(14, maxChars);
|
|
146
160
|
const prefixBudget = Math.max(0, maxChars - suffixBudget);
|
|
@@ -151,7 +165,8 @@ function describeJsonValue(value) {
|
|
|
151
165
|
if (value === null) return "null";
|
|
152
166
|
return typeof value;
|
|
153
167
|
}
|
|
154
|
-
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region extensions/diagnostics-otel/src/service-exporter.ts
|
|
155
170
|
const SIGNAL_QUALIFIED_OTLP_PATH_PATTERN = /\/v1\/(traces|metrics|logs)$/iu;
|
|
156
171
|
const OTEL_EXPORTER_OTLP_CERTIFICATE_ENV = "OTEL_EXPORTER_OTLP_CERTIFICATE";
|
|
157
172
|
const OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE_ENV = "OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE";
|
|
@@ -270,7 +285,8 @@ function findOtlpExporterError(reason) {
|
|
|
270
285
|
...Array.isArray(current.errors) ? current.errors : []
|
|
271
286
|
])) if (readErrorName(candidate) === "OTLPExporterError" && candidate && typeof candidate === "object") return candidate;
|
|
272
287
|
}
|
|
273
|
-
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region extensions/diagnostics-otel/src/service-events.ts
|
|
274
290
|
function createDiagnosticsEventHandler(params) {
|
|
275
291
|
const { logger, recorders } = params;
|
|
276
292
|
return (evt, metadata, privateData) => {
|
|
@@ -281,7 +297,8 @@ function createDiagnosticsEventHandler(params) {
|
|
|
281
297
|
}
|
|
282
298
|
};
|
|
283
299
|
}
|
|
284
|
-
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region extensions/diagnostics-otel/src/service-exporter-health.ts
|
|
285
302
|
function publicFailureKey(event) {
|
|
286
303
|
return `${event.reason ?? "unspecified"}\u0000${event.errorCategory ?? "unknown"}`;
|
|
287
304
|
}
|
|
@@ -409,7 +426,8 @@ function observeOtlpExporterHealth(exporter, params) {
|
|
|
409
426
|
};
|
|
410
427
|
return exporter;
|
|
411
428
|
}
|
|
412
|
-
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region extensions/diagnostics-otel/src/service-constants.ts
|
|
413
431
|
const SECURITY_TARGET_NAME_VALUE_RE = /^[A-Za-z0-9@/_.:-]{1,256}$/u;
|
|
414
432
|
const GEN_AI_TOKEN_USAGE_BUCKETS = [
|
|
415
433
|
1,
|
|
@@ -488,7 +506,8 @@ const CONTEXT_TOKENS_BUCKETS = [
|
|
|
488
506
|
2e6
|
|
489
507
|
];
|
|
490
508
|
const MAX_RETAINED_TRUSTED_SPAN_CONTEXTS = 1024;
|
|
491
|
-
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region extensions/diagnostics-otel/src/service-attributes.ts
|
|
492
511
|
const DROPPED_OTEL_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
493
512
|
"openclaw.callId",
|
|
494
513
|
"openclaw.call_id",
|
|
@@ -635,7 +654,8 @@ function assignOtelSecurityAttributes(attributes, evt) {
|
|
|
635
654
|
}
|
|
636
655
|
assignOtelEventAttributes(attributes, evt.attributes, "openclaw.security.attribute.", normalizeDiagnosticValue);
|
|
637
656
|
}
|
|
638
|
-
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region extensions/diagnostics-otel/src/service-trace-context.ts
|
|
639
659
|
function normalizeTraceContext(value) {
|
|
640
660
|
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
641
661
|
const candidate = value;
|
|
@@ -665,7 +685,8 @@ function contextForTraceContext(traceContext) {
|
|
|
665
685
|
function normalizedTrustedTraceContext(evt, metadata) {
|
|
666
686
|
return metadata.trusted || metadata.trustedTraceContext === true ? normalizeTraceContext(evt.trace) : void 0;
|
|
667
687
|
}
|
|
668
|
-
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region extensions/diagnostics-otel/src/service-logs.ts
|
|
669
690
|
const MAX_OTEL_LOG_BODY_CHARS = 4096;
|
|
670
691
|
const LOG_RECORD_EXPORT_FAILURE_REPORT_INTERVAL_MS = 6e4;
|
|
671
692
|
const LOG_SEVERITY_MAP = {
|
|
@@ -778,7 +799,8 @@ function createDiagnosticsLogExporter(params) {
|
|
|
778
799
|
recordLogEvent
|
|
779
800
|
};
|
|
780
801
|
}
|
|
781
|
-
|
|
802
|
+
//#endregion
|
|
803
|
+
//#region extensions/diagnostics-otel/src/service-metrics.ts
|
|
782
804
|
const DEFAULT_METRIC_NAME_PREFIX = "openclaw.";
|
|
783
805
|
const sessionRowSelectionBaselines = /* @__PURE__ */ new WeakMap();
|
|
784
806
|
function createDiagnosticsMetrics(meter, metricNamePrefix = DEFAULT_METRIC_NAME_PREFIX) {
|
|
@@ -920,7 +942,8 @@ function createDiagnosticsMetrics(meter, metricNamePrefix = DEFAULT_METRIC_NAME_
|
|
|
920
942
|
telemetryExporterCounter: createCounter("telemetry.exporter.events", "Diagnostic telemetry exporter lifecycle and failure events")
|
|
921
943
|
};
|
|
922
944
|
}
|
|
923
|
-
|
|
945
|
+
//#endregion
|
|
946
|
+
//#region extensions/diagnostics-otel/src/service-propagation.ts
|
|
924
947
|
const DEFAULT_PROPAGATORS = ["tracecontext", "baggage"];
|
|
925
948
|
function createConfiguredPropagator(warn) {
|
|
926
949
|
const names = (getStringListFromEnv("OTEL_PROPAGATORS") ?? DEFAULT_PROPAGATORS).map((name) => name.toLowerCase());
|
|
@@ -954,7 +977,8 @@ function registerOwnedSdkRuntime(warn) {
|
|
|
954
977
|
if (ownsContext) context.disable();
|
|
955
978
|
};
|
|
956
979
|
}
|
|
957
|
-
|
|
980
|
+
//#endregion
|
|
981
|
+
//#region extensions/diagnostics-otel/src/service-genai-content.ts
|
|
958
982
|
function textPart(content) {
|
|
959
983
|
return {
|
|
960
984
|
type: "text",
|
|
@@ -1045,6 +1069,7 @@ function redactInternalReasoningParts(value) {
|
|
|
1045
1069
|
if (!isRecord(part)) return part;
|
|
1046
1070
|
const redacted = { ...part };
|
|
1047
1071
|
for (const field of INTERNAL_REASONING_PART_FIELDS) delete redacted[field];
|
|
1072
|
+
if (part.type === "image" && typeof part.data === "string" && part.data.length > 131072) delete redacted.data;
|
|
1048
1073
|
return redacted;
|
|
1049
1074
|
});
|
|
1050
1075
|
}
|
|
@@ -1113,9 +1138,11 @@ function normalizeGenAiToolDefinitions(value) {
|
|
|
1113
1138
|
}
|
|
1114
1139
|
return definitions;
|
|
1115
1140
|
}
|
|
1116
|
-
function
|
|
1117
|
-
const json = safeJsonString(value);
|
|
1118
|
-
if (json)
|
|
1141
|
+
function assignJsonAttributes(attributes, keys, value, redact) {
|
|
1142
|
+
const json = safeJsonString(value, redact);
|
|
1143
|
+
if (!json) return false;
|
|
1144
|
+
for (const key of keys) attributes[key] = json;
|
|
1145
|
+
return true;
|
|
1119
1146
|
}
|
|
1120
1147
|
function assignOtelToolIdentityAttributes(attributes, evt) {
|
|
1121
1148
|
attributes["gen_ai.operation.name"] = GEN_AI_OPERATION_NAME_VALUE_EXECUTE_TOOL;
|
|
@@ -1126,23 +1153,16 @@ function assignOtelModelContentAttributes(attributes, content, captureContent) {
|
|
|
1126
1153
|
if (!captureContent) return;
|
|
1127
1154
|
const redactedInput = redactInternalReasoningFromMessages(content?.inputMessages);
|
|
1128
1155
|
const redactedOutput = redactInternalReasoningFromMessages(content?.outputMessages);
|
|
1156
|
+
const redact = createOtelContentRedactor();
|
|
1129
1157
|
const inputMessages = normalizeGenAiMessages(redactedInput, "user");
|
|
1130
|
-
if (inputMessages.length > 0)
|
|
1131
|
-
assignJsonAttribute(attributes, ATTR_GEN_AI_INPUT_MESSAGES, inputMessages);
|
|
1132
|
-
assignJsonAttribute(attributes, "input.value", inputMessages);
|
|
1133
|
-
attributes["input.mime_type"] = "application/json";
|
|
1134
|
-
}
|
|
1158
|
+
if (inputMessages.length > 0 && assignJsonAttributes(attributes, [ATTR_GEN_AI_INPUT_MESSAGES, "input.value"], inputMessages, redact)) attributes["input.mime_type"] = "application/json";
|
|
1135
1159
|
const toolDefinitions = normalizeGenAiToolDefinitions(content?.toolDefinitions);
|
|
1136
|
-
if (toolDefinitions.length > 0)
|
|
1160
|
+
if (toolDefinitions.length > 0) assignJsonAttributes(attributes, [ATTR_GEN_AI_TOOL_DEFINITIONS], toolDefinitions, redact);
|
|
1137
1161
|
const outputMessages = normalizeGenAiMessages(redactedOutput, "assistant");
|
|
1138
|
-
if (outputMessages.length > 0)
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
}
|
|
1143
|
-
assignOtelContentAttr(attributes, "openclaw.content.input_messages", redactedInput);
|
|
1144
|
-
assignOtelContentAttr(attributes, "openclaw.content.tool_definitions", content?.toolDefinitions);
|
|
1145
|
-
assignOtelContentAttr(attributes, "openclaw.content.output_messages", redactedOutput);
|
|
1162
|
+
if (outputMessages.length > 0 && assignJsonAttributes(attributes, [ATTR_GEN_AI_OUTPUT_MESSAGES, "output.value"], outputMessages, redact)) attributes["output.mime_type"] = "application/json";
|
|
1163
|
+
assignOtelContentAttr(attributes, "openclaw.content.input_messages", redactedInput, redact);
|
|
1164
|
+
assignOtelContentAttr(attributes, "openclaw.content.tool_definitions", content?.toolDefinitions, redact);
|
|
1165
|
+
assignOtelContentAttr(attributes, "openclaw.content.output_messages", redactedOutput, redact);
|
|
1146
1166
|
}
|
|
1147
1167
|
function assignOtelToolContentAttributes(attributes, content, captureContent) {
|
|
1148
1168
|
if (!captureContent) return;
|
|
@@ -1157,7 +1177,8 @@ function assignOtelToolContentAttributes(attributes, content, captureContent) {
|
|
|
1157
1177
|
attributes["openclaw.content.tool_output"] = toolOutput;
|
|
1158
1178
|
}
|
|
1159
1179
|
}
|
|
1160
|
-
|
|
1180
|
+
//#endregion
|
|
1181
|
+
//#region extensions/diagnostics-otel/src/service-recorders-harness.ts
|
|
1161
1182
|
function createHarnessRecorders(runtime) {
|
|
1162
1183
|
const harnessRunMetricAttrs = (evt) => ({
|
|
1163
1184
|
"openclaw.harness.id": normalizeDiagnosticValue(evt.harnessId, "unknown"),
|
|
@@ -1283,7 +1304,8 @@ function createHarnessRecorders(runtime) {
|
|
|
1283
1304
|
"harness.run.error": recordHarnessRunFinished
|
|
1284
1305
|
};
|
|
1285
1306
|
}
|
|
1286
|
-
|
|
1307
|
+
//#endregion
|
|
1308
|
+
//#region extensions/diagnostics-otel/src/service-genai-attributes.ts
|
|
1287
1309
|
function emitLatestGenAiSemconv() {
|
|
1288
1310
|
return process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]?.split(",").map((part) => part.trim()).includes("gen_ai_latest_experimental") ?? false;
|
|
1289
1311
|
}
|
|
@@ -1372,7 +1394,8 @@ function addUpstreamRequestIdSpanEvent(span, upstreamRequestIdHash) {
|
|
|
1372
1394
|
if (boundedHash === "unknown") return;
|
|
1373
1395
|
span.addEvent?.("openclaw.provider.request", { "openclaw.upstreamRequestIdHash": boundedHash });
|
|
1374
1396
|
}
|
|
1375
|
-
|
|
1397
|
+
//#endregion
|
|
1398
|
+
//#region extensions/diagnostics-otel/src/service-recorders-model.ts
|
|
1376
1399
|
function createModelRecorders(runtime) {
|
|
1377
1400
|
function recordModelCallFinished(evt, metadata, { modelContent }) {
|
|
1378
1401
|
const errorType = evt.type === "model.call.error" ? normalizeDiagnosticValue(evt.errorCategory, "other") : void 0;
|
|
@@ -1471,7 +1494,8 @@ function createModelRecorders(runtime) {
|
|
|
1471
1494
|
"model.call.error": recordModelCallFinished
|
|
1472
1495
|
};
|
|
1473
1496
|
}
|
|
1474
|
-
|
|
1497
|
+
//#endregion
|
|
1498
|
+
//#region extensions/diagnostics-otel/src/service-recorders-operations.ts
|
|
1475
1499
|
function createOperationsRecorders(runtime) {
|
|
1476
1500
|
const rowSelections = runtime.sessionRowSelectionBaseline;
|
|
1477
1501
|
const sessionRecoveryAttrs = (evt) => {
|
|
@@ -1751,7 +1775,8 @@ function createOperationsRecorders(runtime) {
|
|
|
1751
1775
|
}
|
|
1752
1776
|
};
|
|
1753
1777
|
}
|
|
1754
|
-
|
|
1778
|
+
//#endregion
|
|
1779
|
+
//#region extensions/diagnostics-otel/src/service-recorders-tools.ts
|
|
1755
1780
|
function createToolAndSystemRecorders(runtime) {
|
|
1756
1781
|
const toolExecutionBaseAttrs = (evt) => ({
|
|
1757
1782
|
"openclaw.toolName": evt.toolName,
|
|
@@ -1962,7 +1987,8 @@ function createToolAndSystemRecorders(runtime) {
|
|
|
1962
1987
|
"tool.execution.error": recordToolExecutionFinished
|
|
1963
1988
|
};
|
|
1964
1989
|
}
|
|
1965
|
-
|
|
1990
|
+
//#endregion
|
|
1991
|
+
//#region extensions/diagnostics-otel/src/service-recorders-usage.ts
|
|
1966
1992
|
function createUsageRecorders(runtime) {
|
|
1967
1993
|
const messageDeliveryAttrs = (evt) => ({
|
|
1968
1994
|
"openclaw.channel": normalizeDiagnosticValue(evt.channel),
|
|
@@ -2186,7 +2212,8 @@ function createUsageRecorders(runtime) {
|
|
|
2186
2212
|
"message.delivery.error": recordMessageDeliveryFinished
|
|
2187
2213
|
};
|
|
2188
2214
|
}
|
|
2189
|
-
|
|
2215
|
+
//#endregion
|
|
2216
|
+
//#region extensions/diagnostics-otel/src/service-traces.ts
|
|
2190
2217
|
function createDiagnosticsTraceRuntime(tracer) {
|
|
2191
2218
|
const activeTrustedSpans = /* @__PURE__ */ new Map();
|
|
2192
2219
|
const activeTrustedSpanAliases = /* @__PURE__ */ new Map();
|
|
@@ -2348,7 +2375,8 @@ function createDiagnosticsTraceRuntime(tracer) {
|
|
|
2348
2375
|
stopActiveTrustedSpans
|
|
2349
2376
|
};
|
|
2350
2377
|
}
|
|
2351
|
-
|
|
2378
|
+
//#endregion
|
|
2379
|
+
//#region extensions/diagnostics-otel/src/service.ts
|
|
2352
2380
|
const OTLP_HTTP_PROTOBUF_PROTOCOL = "http/protobuf";
|
|
2353
2381
|
const DEFAULT_SERVICE_NAME = "openclaw";
|
|
2354
2382
|
const OTEL_EXPORTER_OTLP_ENDPOINT_ENV = "OTEL_EXPORTER_OTLP_ENDPOINT";
|
|
@@ -2736,4 +2764,5 @@ function createDiagnosticsOtelService() {
|
|
|
2736
2764
|
}
|
|
2737
2765
|
};
|
|
2738
2766
|
}
|
|
2767
|
+
//#endregion
|
|
2739
2768
|
export { createDiagnosticsOtelService as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/diagnostics-otel/api.ts"},{"output":"index.js","source":"extensions/diagnostics-otel/index.ts"},{"output":"runtime-api.js","source":"extensions/diagnostics-otel/runtime-api.ts"}],"chunks":[{"output":".setup/runtime-api-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/diagnostics-otel/api.ts"},{"output":"index.js","source":"extensions/diagnostics-otel/index.ts"},{"output":"runtime-api.js","source":"extensions/diagnostics-otel/runtime-api.ts"}],"chunks":[{"output":".setup/runtime-api-iB_eY9Ao.mjs","sha256":"f8831b36ab13c172cbc9e516ae144bab24d3da436f8bbc4fb6ebc456044a08b0","facadeSource":null,"sources":["extensions/diagnostics-otel/src/service-attributes.ts","extensions/diagnostics-otel/src/service-constants.ts","extensions/diagnostics-otel/src/service-content-normalization.ts","extensions/diagnostics-otel/src/service-events.ts","extensions/diagnostics-otel/src/service-exporter-health.ts","extensions/diagnostics-otel/src/service-exporter.ts","extensions/diagnostics-otel/src/service-genai-attributes.ts","extensions/diagnostics-otel/src/service-genai-content.ts","extensions/diagnostics-otel/src/service-logs.ts","extensions/diagnostics-otel/src/service-metrics.ts","extensions/diagnostics-otel/src/service-propagation.ts","extensions/diagnostics-otel/src/service-recorders-harness.ts","extensions/diagnostics-otel/src/service-recorders-model.ts","extensions/diagnostics-otel/src/service-recorders-operations.ts","extensions/diagnostics-otel/src/service-recorders-tools.ts","extensions/diagnostics-otel/src/service-recorders-usage.ts","extensions/diagnostics-otel/src/service-trace-context.ts","extensions/diagnostics-otel/src/service-traces.ts","extensions/diagnostics-otel/src/service.ts"]},{"output":"api.js","sha256":"605d6cf4480221a3ccac6ae6f372770ddff3ca620ff9688c2e669643ee4525c4","facadeSource":"extensions/diagnostics-otel/api.ts","sources":[]},{"output":"index.js","sha256":"0ff6bebd555669da1db5b33c3af9e66f20909397bc23ac2b8c76e3739ffe2421","facadeSource":"extensions/diagnostics-otel/index.ts","sources":["extensions/diagnostics-otel/index.ts"]},{"output":"runtime-api.js","sha256":"facf97b9fe5dcb84dc813877d4a5ca5acbb016236c08783ced4c911d19789de1","facadeSource":"extensions/diagnostics-otel/runtime-api.ts","sources":[]}],"unrenderedSources":["extensions/diagnostics-otel/api.ts","extensions/diagnostics-otel/runtime-api.ts"]}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createDiagnosticsOtelService } from "./.setup/runtime-api-
|
|
1
|
+
import { t as createDiagnosticsOtelService } from "./.setup/runtime-api-iB_eY9Ao.mjs";
|
|
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({
|
|
5
5
|
id: "diagnostics-otel",
|
|
6
6
|
name: "Diagnostics OpenTelemetry",
|
|
@@ -9,4 +9,5 @@ var diagnostics_otel_default = definePluginEntry({
|
|
|
9
9
|
api.registerService(createDiagnosticsOtelService());
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
//#endregion
|
|
12
13
|
export { diagnostics_otel_default as default };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createDiagnosticsOtelService } from "./.setup/runtime-api-
|
|
1
|
+
export { t as createDiagnosticsOtelService } from "./.setup/runtime-api-iB_eY9Ao.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/diagnostics-otel",
|
|
3
|
-
"version": "2026.11.5-beta.
|
|
3
|
+
"version": "2026.11.5-beta.3",
|
|
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.11.5-beta.
|
|
37
|
+
"pluginApi": ">=2026.11.5-beta.3"
|
|
38
38
|
},
|
|
39
39
|
"build": {
|
|
40
|
-
"openclawVersion": "2026.11.5-beta.
|
|
40
|
+
"openclawVersion": "2026.11.5-beta.3"
|
|
41
41
|
},
|
|
42
42
|
"release": {
|
|
43
43
|
"publishToClawHub": true,
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"assets/activity.svg"
|
|
56
56
|
],
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"openclaw": ">=2026.11.5-beta.
|
|
58
|
+
"openclaw": ">=2026.11.5-beta.3"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
61
61
|
"openclaw": {
|