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

推荐订阅源

MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
小众软件
小众软件
F
Fortinet All Blogs
爱范儿
爱范儿
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
C
Check Point Blog
博客园 - 聂微东
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
Vercel News
Vercel News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
宝玉的分享
宝玉的分享
Jina AI
Jina AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More

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
docs: add gateway diagnostics guide · openclaw/openclaw@4...
steipete · 2026-04-23 · via Recent Commits to openclaw:main

@@ -0,0 +1,139 @@

1+

---

2+

title: "Diagnostics Export"

3+

summary: "Create shareable Gateway diagnostics bundles for bug reports"

4+

read_when:

5+

- Preparing a bug report or support request

6+

- Debugging Gateway crashes, restarts, memory pressure, or oversized payloads

7+

- Reviewing what diagnostics data is recorded or redacted

8+

---

9+10+

# Diagnostics Export

11+12+

OpenClaw can create a local diagnostics zip that is safe to attach to bug

13+

reports. It combines sanitized Gateway status, health, logs, config shape, and

14+

recent payload-free stability events.

15+16+

## Quick start

17+18+

```bash

19+

openclaw gateway diagnostics export

20+

```

21+22+

The command prints the written zip path. To choose a path:

23+24+

```bash

25+

openclaw gateway diagnostics export --output openclaw-diagnostics.zip

26+

```

27+28+

For automation:

29+30+

```bash

31+

openclaw gateway diagnostics export --json

32+

```

33+34+

## What the export contains

35+36+

The zip includes:

37+38+

- `summary.md`: human-readable overview for support.

39+

- `diagnostics.json`: machine-readable summary of config, logs, status, health,

40+

and stability data.

41+

- `manifest.json`: export metadata and file list.

42+

- Sanitized config shape and non-secret config details.

43+

- Sanitized log summaries and recent redacted log lines.

44+

- Best-effort Gateway status and health snapshots.

45+

- `stability/latest.json`: newest persisted stability bundle, when available.

46+47+

The export is useful even when the Gateway is unhealthy. If the Gateway cannot

48+

answer status or health requests, the local logs, config shape, and latest

49+

stability bundle are still collected when available.

50+51+

## Privacy model

52+53+

Diagnostics are designed to be shareable. The export keeps operational data

54+

that helps debugging, such as:

55+56+

- subsystem names, plugin ids, provider ids, channel ids, and configured modes

57+

- status codes, durations, byte counts, queue state, and memory readings

58+

- sanitized log metadata and redacted operational messages

59+

- config shape and non-secret feature settings

60+61+

The export omits or redacts:

62+63+

- chat text, prompts, instructions, webhook bodies, and tool outputs

64+

- credentials, API keys, tokens, cookies, and secret values

65+

- raw request or response bodies

66+

- account ids, message ids, raw session ids, hostnames, and local usernames

67+68+

When a log message looks like user, chat, prompt, or tool payload text, the

69+

export keeps only that a message was omitted and the byte count.

70+71+

## Stability recorder

72+73+

The Gateway records a bounded, payload-free stability stream by default when

74+

diagnostics are enabled. It is for operational facts, not content.

75+76+

Inspect the live recorder:

77+78+

```bash

79+

openclaw gateway stability

80+

openclaw gateway stability --type payload.large

81+

openclaw gateway stability --json

82+

```

83+84+

Inspect the newest persisted stability bundle after a fatal exit, shutdown

85+

timeout, or restart startup failure:

86+87+

```bash

88+

openclaw gateway stability --bundle latest

89+

```

90+91+

Create a diagnostics zip from the newest persisted bundle:

92+93+

```bash

94+

openclaw gateway stability --bundle latest --export

95+

```

96+97+

Persisted bundles live under `~/.openclaw/logs/stability/` when events exist.

98+99+

## Useful options

100+101+

```bash

102+

openclaw gateway diagnostics export \

103+

--output openclaw-diagnostics.zip \

104+

--log-lines 5000 \

105+

--log-bytes 1000000

106+

```

107+108+

- `--output <path>`: write to a specific zip path.

109+

- `--log-lines <count>`: maximum sanitized log lines to include.

110+

- `--log-bytes <bytes>`: maximum log bytes to inspect.

111+

- `--url <url>`: Gateway WebSocket URL for status and health snapshots.

112+

- `--token <token>`: Gateway token for status and health snapshots.

113+

- `--password <password>`: Gateway password for status and health snapshots.

114+

- `--timeout <ms>`: status and health snapshot timeout.

115+

- `--no-stability-bundle`: skip persisted stability bundle lookup.

116+

- `--json`: print machine-readable export metadata.

117+118+

## Disable diagnostics

119+120+

Diagnostics are enabled by default. To disable the stability recorder and

121+

diagnostic event collection:

122+123+

```json5

124+

{

125+

diagnostics: {

126+

enabled: false,

127+

},

128+

}

129+

```

130+131+

Disabling diagnostics reduces bug-report detail. It does not affect normal

132+

Gateway logging.

133+134+

## Related docs

135+136+

- [Health Checks](/gateway/health)

137+

- [Gateway CLI](/cli/gateway#gateway-diagnostics-export)

138+

- [Gateway Protocol](/gateway/protocol#system-and-identity)

139+

- [Logging](/logging)