惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
D
Docker
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
量子位
有赞技术团队
有赞技术团队
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
M
MIT News - Artificial intelligence
B
Blog
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
月光博客
月光博客

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(diagnostics): export liveness warning telemetry · ope...
steipete · 2026-04-28 · via Recent Commits to openclaw:main

@@ -888,6 +888,38 @@ export function createDiagnosticsOtelService(): OpenClawPluginService {

888888

unit: "1",

889889

description: "Diagnostic memory pressure events",

890890

});

891+

const livenessWarningCounter = meter.createCounter("openclaw.liveness.warning", {

892+

unit: "1",

893+

description: "Diagnostic liveness warning events",

894+

});

895+

const livenessEventLoopDelayP99Histogram = meter.createHistogram(

896+

"openclaw.liveness.event_loop_delay_p99_ms",

897+

{

898+

unit: "ms",

899+

description: "P99 event-loop delay reported by diagnostic liveness warnings",

900+

},

901+

);

902+

const livenessEventLoopDelayMaxHistogram = meter.createHistogram(

903+

"openclaw.liveness.event_loop_delay_max_ms",

904+

{

905+

unit: "ms",

906+

description: "Maximum event-loop delay reported by diagnostic liveness warnings",

907+

},

908+

);

909+

const livenessEventLoopUtilizationHistogram = meter.createHistogram(

910+

"openclaw.liveness.event_loop_utilization",

911+

{

912+

unit: "1",

913+

description: "Event-loop utilization reported by diagnostic liveness warnings",

914+

},

915+

);

916+

const livenessCpuCoreRatioHistogram = meter.createHistogram(

917+

"openclaw.liveness.cpu_core_ratio",

918+

{

919+

unit: "1",

920+

description: "CPU core ratio reported by diagnostic liveness warnings",

921+

},

922+

);

891923

const telemetryExporterCounter = meter.createCounter("openclaw.telemetry.exporter.events", {

892924

unit: "1",

893925

description: "Diagnostic telemetry exporter lifecycle and failure events",

@@ -2058,6 +2090,68 @@ export function createDiagnosticsOtelService(): OpenClawPluginService {

20582090

queueDepthHistogram.record(evt.queued, { "openclaw.channel": "heartbeat" });

20592091

};

206020922093+

const recordLivenessWarning = (

2094+

evt: Extract<DiagnosticEventPayload, { type: "diagnostic.liveness.warning" }>,

2095+

) => {

2096+

const reason = evt.reasons.join(":");

2097+

const attrs = {

2098+

"openclaw.liveness.reason": lowCardinalityAttr(reason, "unknown"),

2099+

};

2100+

livenessWarningCounter.add(1, attrs);

2101+

queueDepthHistogram.record(evt.queued, { "openclaw.channel": "liveness" });

2102+

if (evt.eventLoopDelayP99Ms !== undefined) {

2103+

livenessEventLoopDelayP99Histogram.record(evt.eventLoopDelayP99Ms, attrs);

2104+

}

2105+

if (evt.eventLoopDelayMaxMs !== undefined) {

2106+

livenessEventLoopDelayMaxHistogram.record(evt.eventLoopDelayMaxMs, attrs);

2107+

}

2108+

if (evt.eventLoopUtilization !== undefined) {

2109+

livenessEventLoopUtilizationHistogram.record(evt.eventLoopUtilization, attrs);

2110+

}

2111+

if (evt.cpuCoreRatio !== undefined) {

2112+

livenessCpuCoreRatioHistogram.record(evt.cpuCoreRatio, attrs);

2113+

}

2114+

if (!tracesEnabled) {

2115+

return;

2116+

}

2117+

const spanAttrs: Record<string, string | number> = {

2118+

...attrs,

2119+

"openclaw.liveness.active": evt.active,

2120+

"openclaw.liveness.waiting": evt.waiting,

2121+

"openclaw.liveness.queued": evt.queued,

2122+

"openclaw.liveness.interval_ms": evt.intervalMs,

2123+

...(evt.eventLoopDelayP99Ms !== undefined

2124+

? { "openclaw.liveness.event_loop_delay_p99_ms": evt.eventLoopDelayP99Ms }

2125+

: {}),

2126+

...(evt.eventLoopDelayMaxMs !== undefined

2127+

? { "openclaw.liveness.event_loop_delay_max_ms": evt.eventLoopDelayMaxMs }

2128+

: {}),

2129+

...(evt.eventLoopUtilization !== undefined

2130+

? { "openclaw.liveness.event_loop_utilization": evt.eventLoopUtilization }

2131+

: {}),

2132+

...(evt.cpuUserMs !== undefined

2133+

? { "openclaw.liveness.cpu_user_ms": evt.cpuUserMs }

2134+

: {}),

2135+

...(evt.cpuSystemMs !== undefined

2136+

? { "openclaw.liveness.cpu_system_ms": evt.cpuSystemMs }

2137+

: {}),

2138+

...(evt.cpuTotalMs !== undefined

2139+

? { "openclaw.liveness.cpu_total_ms": evt.cpuTotalMs }

2140+

: {}),

2141+

...(evt.cpuCoreRatio !== undefined

2142+

? { "openclaw.liveness.cpu_core_ratio": evt.cpuCoreRatio }

2143+

: {}),

2144+

};

2145+

const span = spanWithDuration("openclaw.liveness.warning", spanAttrs, 0, {

2146+

endTimeMs: evt.ts,

2147+

});

2148+

span.setStatus({

2149+

code: SpanStatusCode.ERROR,

2150+

message: reason,

2151+

});

2152+

span.end(evt.ts);

2153+

};

2154+20612155

const recordTelemetryExporter = (

20622156

evt: TelemetryExporterDiagnosticEvent,

20632157

metadata: DiagnosticEventMetadata,

@@ -2130,6 +2224,9 @@ export function createDiagnosticsOtelService(): OpenClawPluginService {

21302224

case "diagnostic.heartbeat":

21312225

recordHeartbeat(evt);

21322226

return;

2227+

case "diagnostic.liveness.warning":

2228+

recordLivenessWarning(evt);

2229+

return;

21332230

case "run.started":

21342231

recordRunStarted(evt, metadata);

21352232

return;