


























@@ -1035,6 +1035,13 @@ export function createDiagnosticsOtelService(): OpenClawPluginService {
10351035unit: "1",
10361036description: "Diagnostic memory pressure events",
10371037});
1038+const asyncQueueDroppedCounter = meter.createCounter(
1039+"openclaw.diagnostic.async_queue.dropped",
1040+{
1041+unit: "1",
1042+description: "Async diagnostic queue drops by dropped event class",
1043+},
1044+);
10381045const livenessWarningCounter = meter.createCounter("openclaw.liveness.warning", {
10391046unit: "1",
10401047description: "Diagnostic liveness warning events",
@@ -1801,6 +1808,29 @@ export function createDiagnosticsOtelService(): OpenClawPluginService {
18011808span.end(evt.ts);
18021809};
180318101811+const recordAsyncQueueDropped = (
1812+evt: Extract<DiagnosticEventPayload, { type: "diagnostic.async_queue.dropped" }>,
1813+) => {
1814+asyncQueueDroppedCounter.add(evt.droppedEvents, {
1815+"openclaw.diagnostic.async_queue.drop_class": "total",
1816+});
1817+if (evt.droppedTrustedEvents !== undefined) {
1818+asyncQueueDroppedCounter.add(evt.droppedTrustedEvents, {
1819+"openclaw.diagnostic.async_queue.drop_class": "trusted",
1820+});
1821+}
1822+if (evt.droppedUntrustedEvents !== undefined) {
1823+asyncQueueDroppedCounter.add(evt.droppedUntrustedEvents, {
1824+"openclaw.diagnostic.async_queue.drop_class": "untrusted",
1825+});
1826+}
1827+if (evt.droppedPriorityEvents !== undefined) {
1828+asyncQueueDroppedCounter.add(evt.droppedPriorityEvents, {
1829+"openclaw.diagnostic.async_queue.drop_class": "priority",
1830+});
1831+}
1832+};
1833+18041834const recordRunCompleted = (
18051835evt: Extract<DiagnosticEventPayload, { type: "run.completed" }>,
18061836metadata: DiagnosticEventMetadata,
@@ -2614,6 +2644,9 @@ export function createDiagnosticsOtelService(): OpenClawPluginService {
26142644case "diagnostic.memory.pressure":
26152645recordMemoryPressure(evt);
26162646return;
2647+case "diagnostic.async_queue.dropped":
2648+recordAsyncQueueDropped(evt);
2649+return;
26172650case "telemetry.exporter":
26182651recordTelemetryExporter(evt, metadata);
26192652return;
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。