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

推荐订阅源

J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
C
Check Point Blog
G
Google Developers Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
D
Docker
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News

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: gate diagnostics timeline by flag · openclaw/opencla...
shakkernerd · 2026-04-30 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -112,7 +112,7 @@ Inline `--password` can be exposed in local process listings. Prefer `--password

112112

### Startup profiling

113113
114114

- Set `OPENCLAW_GATEWAY_STARTUP_TRACE=1` to log phase timings during Gateway startup, including per-phase `eventLoopMax` delay and plugin lookup-table timings for installed-index, manifest registry, startup planning, and owner-map work.

115-

- Set `OPENCLAW_DIAGNOSTICS=1` with `OPENCLAW_DIAGNOSTICS_TIMELINE_PATH=<path>` to write a best-effort JSONL startup diagnostics timeline for external QA harnesses. Add `OPENCLAW_DIAGNOSTICS_EVENT_LOOP=1` to include event-loop samples.

115+

- Set `OPENCLAW_DIAGNOSTICS=timeline` with `OPENCLAW_DIAGNOSTICS_TIMELINE_PATH=<path>` to write a best-effort JSONL startup diagnostics timeline for external QA harnesses. Add `OPENCLAW_DIAGNOSTICS_EVENT_LOOP=1` to include event-loop samples.

116116

- Run `pnpm test:startup:gateway -- --runs 5 --warmup 1` to benchmark Gateway startup. The benchmark records first process output, `/healthz`, `/readyz`, startup trace timings, event-loop delay, and plugin lookup-table timing details.

117117
118118

## Query a running Gateway

Original file line numberDiff line numberDiff line change

@@ -50,6 +50,28 @@ Disable all flags:

5050

OPENCLAW_DIAGNOSTICS=0

5151

```

5252
53+

## Timeline artifacts

54+
55+

The `timeline` flag writes structured startup and runtime timing events for

56+

external QA harnesses:

57+
58+

```bash

59+

OPENCLAW_DIAGNOSTICS=timeline \

60+

OPENCLAW_DIAGNOSTICS_TIMELINE_PATH=/tmp/openclaw-timeline.jsonl \

61+

openclaw gateway run

62+

```

63+
64+

`OPENCLAW_DIAGNOSTICS=1`, `OPENCLAW_DIAGNOSTICS=all`, and

65+

`OPENCLAW_DIAGNOSTICS=*` also enable the timeline because they enable every

66+

diagnostics flag. Prefer `timeline` when you only want the JSONL timing

67+

artifact.

68+
69+

Timeline records use the `openclaw.diagnostics.v1` envelope. Events can include

70+

process ids, phase names, span names, durations, plugin ids, dependency counts,

71+

event-loop delay samples, provider operation names, child-process exit state,

72+

and startup error names/messages. Treat timeline files as local diagnostics

73+

artifacts; review them before sharing outside your machine.

74+
5375

## Where logs go

5476
5577

Flags emit logs into the standard diagnostics log file. By default:

Original file line numberDiff line numberDiff line change

@@ -17,7 +17,7 @@ async function createTimelineEnv() {

1717

tempDirs.push(dir);

1818

return {

1919

env: {

20-

OPENCLAW_DIAGNOSTICS: "1",

20+

OPENCLAW_DIAGNOSTICS: "timeline",

2121

OPENCLAW_DIAGNOSTICS_RUN_ID: "run-1",

2222

OPENCLAW_DIAGNOSTICS_ENV: "env-1",

2323

OPENCLAW_DIAGNOSTICS_TIMELINE_PATH: join(dir, "nested", "timeline.jsonl"),

@@ -43,6 +43,15 @@ describe("diagnostics timeline", () => {

4343

const { env } = await createTimelineEnv();

4444
4545

expect(isDiagnosticsTimelineEnabled(env)).toBe(true);

46+

expect(isDiagnosticsTimelineEnabled({ ...env, OPENCLAW_DIAGNOSTICS: "1" })).toBe(true);

47+

expect(isDiagnosticsTimelineEnabled({ ...env, OPENCLAW_DIAGNOSTICS: "all" })).toBe(true);

48+

expect(isDiagnosticsTimelineEnabled({ ...env, OPENCLAW_DIAGNOSTICS: "*" })).toBe(true);

49+

expect(

50+

isDiagnosticsTimelineEnabled({ ...env, OPENCLAW_DIAGNOSTICS: "diagnostics.timeline" }),

51+

).toBe(true);

52+

expect(isDiagnosticsTimelineEnabled({ ...env, OPENCLAW_DIAGNOSTICS: "telegram.http" })).toBe(

53+

false,

54+

);

4655

expect(isDiagnosticsTimelineEnabled({ ...env, OPENCLAW_DIAGNOSTICS: "0" })).toBe(false);

4756

expect(isDiagnosticsTimelineEnabled({ ...env, OPENCLAW_DIAGNOSTICS_TIMELINE_PATH: "" })).toBe(

4857

false,

Original file line numberDiff line numberDiff line change

@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";

22

import { appendFileSync, mkdirSync } from "node:fs";

33

import { dirname } from "node:path";

44

import { performance } from "node:perf_hooks";

5-

import { isTruthyEnvValue } from "./env.js";

5+

import { isDiagnosticFlagEnabled } from "./diagnostic-flags.js";

66
77

export const OPENCLAW_DIAGNOSTICS_TIMELINE_SCHEMA_VERSION = "openclaw.diagnostics.v1";

88

@@ -56,7 +56,8 @@ const createdTimelineDirs = new Set<string>();

5656
5757

export function isDiagnosticsTimelineEnabled(env: NodeJS.ProcessEnv = process.env): boolean {

5858

return (

59-

isTruthyEnvValue(env.OPENCLAW_DIAGNOSTICS) &&

59+

(isDiagnosticFlagEnabled("timeline", undefined, env) ||

60+

isDiagnosticFlagEnabled("diagnostics.timeline", undefined, env)) &&

6061

typeof env.OPENCLAW_DIAGNOSTICS_TIMELINE_PATH === "string" &&

6162

env.OPENCLAW_DIAGNOSTICS_TIMELINE_PATH.trim().length > 0

6263

);