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

推荐订阅源

T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Register - Security
The Register - Security
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LangChain Blog
N
Netflix TechBlog - Medium
量子位
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
H
Help Net Security
D
Docker
D
DataBreaches.Net
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
B
Blog
博客园 - 聂微东
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
F
Full Disclosure
GbyAI
GbyAI
F
Fortinet All Blogs
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
人人都是产品经理
人人都是产品经理
Recent Announcements
Recent Announcements
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
有赞技术团队
有赞技术团队
博客园 - 叶小钗
小众软件
小众软件
V
Visual Studio Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
Recorded Future
Recorded Future
J
Java Code Geeks
雷峰网
雷峰网
P
Privacy & Cybersecurity Law Blog
C
Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
AWS News Blog
AWS News Blog
Webroot Blog
Webroot Blog
美团技术团队
N
News | PayPal Newsroom
G
Google Developers Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园_首页
V
Vulnerabilities – Threatpost

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
docs: split OpenTelemetry export into its own page under gateway · openclaw/openclaw@7741dbb
vincentkoc · 2026-04-26 · via Recent Commits to openclaw:main

@@ -0,0 +1,304 @@

1+

---

2+

summary: "Export OpenClaw diagnostics to any OpenTelemetry collector via the diagnostics-otel plugin (OTLP/HTTP)"

3+

title: "OpenTelemetry export"

4+

read_when:

5+

- You want to send OpenClaw model usage, message flow, or session metrics to an OpenTelemetry collector

6+

- You are wiring traces, metrics, or logs into Grafana, Datadog, Honeycomb, New Relic, Tempo, or another OTLP backend

7+

- You need the exact metric names, span names, or attribute shapes to build dashboards or alerts

8+

---

9+10+

OpenClaw exports diagnostics through the bundled `diagnostics-otel` plugin

11+

using **OTLP/HTTP (protobuf)**. Any collector or backend that accepts OTLP/HTTP

12+

works without code changes. For local file logs and how to read them, see

13+

[Logging](/logging).

14+15+

## How it fits together

16+17+

- **Diagnostics events** are structured, in-process records emitted by the

18+

Gateway and bundled plugins for model runs, message flow, sessions, queues,

19+

and exec.

20+

- **`diagnostics-otel` plugin** subscribes to those events and exports them as

21+

OpenTelemetry **metrics**, **traces**, and **logs** over OTLP/HTTP.

22+

- Exporters only attach when both the diagnostics surface and the plugin are

23+

enabled, so the in-process cost stays near zero by default.

24+25+

## Quick start

26+27+

```json5

28+

{

29+

plugins: {

30+

allow: ["diagnostics-otel"],

31+

entries: {

32+

"diagnostics-otel": { enabled: true },

33+

},

34+

},

35+

diagnostics: {

36+

enabled: true,

37+

otel: {

38+

enabled: true,

39+

endpoint: "http://otel-collector:4318",

40+

protocol: "http/protobuf",

41+

serviceName: "openclaw-gateway",

42+

traces: true,

43+

metrics: true,

44+

logs: true,

45+

sampleRate: 0.2,

46+

flushIntervalMs: 60000,

47+

},

48+

},

49+

}

50+

```

51+52+

You can also enable the plugin from the CLI:

53+54+

```bash

55+

openclaw plugins enable diagnostics-otel

56+

```

57+58+

<Note>

59+

`protocol` currently supports `http/protobuf` only. `grpc` is ignored.

60+

</Note>

61+62+

## Signals exported

63+64+

| Signal | What goes in it |

65+

| ----------- | --------------------------------------------------------------------------------------------------------------------------------- |

66+

| **Metrics** | Counters and histograms for token usage, cost, run duration, message flow, queue lanes, session state, exec, and memory pressure. |

67+

| **Traces** | Spans for model usage, model calls, tool execution, exec, webhook/message processing, context assembly, and tool loops. |

68+

| **Logs** | Structured `logging.file` records exported over OTLP when `diagnostics.otel.logs` is enabled. |

69+70+

Toggle `traces`, `metrics`, and `logs` independently. All three default to on

71+

when `diagnostics.otel.enabled` is true.

72+73+

## Configuration reference

74+75+

```json5

76+

{

77+

diagnostics: {

78+

enabled: true,

79+

otel: {

80+

enabled: true,

81+

endpoint: "http://otel-collector:4318",

82+

protocol: "http/protobuf", // grpc is ignored

83+

serviceName: "openclaw-gateway",

84+

headers: { "x-collector-token": "..." },

85+

traces: true,

86+

metrics: true,

87+

logs: true,

88+

sampleRate: 0.2, // root-span sampler, 0.0..1.0

89+

flushIntervalMs: 60000, // metric export interval (min 1000ms)

90+

captureContent: {

91+

enabled: false,

92+

inputMessages: false,

93+

outputMessages: false,

94+

toolInputs: false,

95+

toolOutputs: false,

96+

systemPrompt: false,

97+

},

98+

},

99+

},

100+

}

101+

```

102+103+

### Environment variables

104+105+

| Variable | Purpose |

106+

| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

107+

| `OTEL_EXPORTER_OTLP_ENDPOINT` | Override `diagnostics.otel.endpoint`. If the value already contains `/v1/traces`, `/v1/metrics`, or `/v1/logs`, it is used as-is. |

108+

| `OTEL_SERVICE_NAME` | Override `diagnostics.otel.serviceName`. |

109+

| `OTEL_EXPORTER_OTLP_PROTOCOL` | Override the wire protocol (only `http/protobuf` is honored today). |

110+

| `OTEL_SEMCONV_STABILITY_OPT_IN` | Set to `gen_ai_latest_experimental` to emit the latest experimental GenAI span attribute (`gen_ai.provider.name`) instead of the legacy `gen_ai.system`. GenAI metrics always use bounded, low-cardinality semantic attributes regardless. |

111+

| `OPENCLAW_OTEL_PRELOADED` | Set to `1` when another preload or host process already registered the global OpenTelemetry SDK. The plugin then skips its own NodeSDK lifecycle but still wires diagnostic listeners and honors `traces`/`metrics`/`logs`. |

112+113+

## Privacy and content capture

114+115+

Raw model/tool content is **not** exported by default. Spans carry bounded

116+

identifiers (channel, provider, model, error category, hash-only request ids)

117+

and never include prompt text, response text, tool inputs, tool outputs, or

118+

session keys.

119+120+

Set `diagnostics.otel.captureContent.*` to `true` only when your collector and

121+

retention policy are approved for prompt, response, tool, or system-prompt

122+

text. Each subkey is opt-in independently:

123+124+

- `inputMessages` — user prompt content.

125+

- `outputMessages` — model response content.

126+

- `toolInputs` — tool argument payloads.

127+

- `toolOutputs` — tool result payloads.

128+

- `systemPrompt` — assembled system/developer prompt.

129+130+

When any subkey is enabled, model and tool spans get bounded, redacted

131+

`openclaw.content.*` attributes for that class only.

132+133+

## Sampling and flushing

134+135+

- **Traces:** `diagnostics.otel.sampleRate` (root-span only, `0.0` drops all,

136+

`1.0` keeps all).

137+

- **Metrics:** `diagnostics.otel.flushIntervalMs` (minimum `1000`).

138+

- **Logs:** OTLP logs respect `logging.level` (file log level). Console

139+

redaction does **not** apply to OTLP logs. High-volume installs should

140+

prefer OTLP collector sampling/filtering over local sampling.

141+142+

## Exported metrics

143+144+

### Model usage

145+146+

- `openclaw.tokens` (counter, attrs: `openclaw.token`, `openclaw.channel`, `openclaw.provider`, `openclaw.model`)

147+

- `openclaw.cost.usd` (counter, attrs: `openclaw.channel`, `openclaw.provider`, `openclaw.model`)

148+

- `openclaw.run.duration_ms` (histogram, attrs: `openclaw.channel`, `openclaw.provider`, `openclaw.model`)

149+

- `openclaw.context.tokens` (histogram, attrs: `openclaw.context`, `openclaw.channel`, `openclaw.provider`, `openclaw.model`)

150+

- `gen_ai.client.token.usage` (histogram, GenAI semantic-conventions metric, attrs: `gen_ai.token.type` = `input`/`output`, `gen_ai.provider.name`, `gen_ai.operation.name`, `gen_ai.request.model`)

151+

- `gen_ai.client.operation.duration` (histogram, seconds, GenAI semantic-conventions metric, attrs: `gen_ai.provider.name`, `gen_ai.operation.name`, `gen_ai.request.model`, optional `error.type`)

152+153+

### Message flow

154+155+

- `openclaw.webhook.received` (counter, attrs: `openclaw.channel`, `openclaw.webhook`)

156+

- `openclaw.webhook.error` (counter, attrs: `openclaw.channel`, `openclaw.webhook`)

157+

- `openclaw.webhook.duration_ms` (histogram, attrs: `openclaw.channel`, `openclaw.webhook`)

158+

- `openclaw.message.queued` (counter, attrs: `openclaw.channel`, `openclaw.source`)

159+

- `openclaw.message.processed` (counter, attrs: `openclaw.channel`, `openclaw.outcome`)

160+

- `openclaw.message.duration_ms` (histogram, attrs: `openclaw.channel`, `openclaw.outcome`)

161+

- `openclaw.message.delivery.started` (counter, attrs: `openclaw.channel`, `openclaw.delivery.kind`)

162+

- `openclaw.message.delivery.duration_ms` (histogram, attrs: `openclaw.channel`, `openclaw.delivery.kind`, `openclaw.outcome`, `openclaw.errorCategory`)

163+164+

### Queues and sessions

165+166+

- `openclaw.queue.lane.enqueue` (counter, attrs: `openclaw.lane`)

167+

- `openclaw.queue.lane.dequeue` (counter, attrs: `openclaw.lane`)

168+

- `openclaw.queue.depth` (histogram, attrs: `openclaw.lane` or `openclaw.channel=heartbeat`)

169+

- `openclaw.queue.wait_ms` (histogram, attrs: `openclaw.lane`)

170+

- `openclaw.session.state` (counter, attrs: `openclaw.state`, `openclaw.reason`)

171+

- `openclaw.session.stuck` (counter, attrs: `openclaw.state`)

172+

- `openclaw.session.stuck_age_ms` (histogram, attrs: `openclaw.state`)

173+

- `openclaw.run.attempt` (counter, attrs: `openclaw.attempt`)

174+175+

### Exec

176+177+

- `openclaw.exec.duration_ms` (histogram, attrs: `openclaw.exec.target`, `openclaw.exec.mode`, `openclaw.outcome`, `openclaw.failureKind`)

178+179+

### Diagnostics internals (memory and tool loop)

180+181+

- `openclaw.memory.heap_used_bytes` (histogram, attrs: `openclaw.memory.kind`)

182+

- `openclaw.memory.rss_bytes` (histogram)

183+

- `openclaw.memory.pressure` (counter, attrs: `openclaw.memory.level`)

184+

- `openclaw.tool.loop.iterations` (counter, attrs: `openclaw.toolName`, `openclaw.outcome`)

185+

- `openclaw.tool.loop.duration_ms` (histogram, attrs: `openclaw.toolName`, `openclaw.outcome`)

186+187+

## Exported spans

188+189+

- `openclaw.model.usage`

190+

- `openclaw.channel`, `openclaw.provider`, `openclaw.model`

191+

- `openclaw.tokens.*` (input/output/cache_read/cache_write/total)

192+

- `gen_ai.system` by default, or `gen_ai.provider.name` when the latest GenAI semantic conventions are opted in

193+

- `gen_ai.request.model`, `gen_ai.operation.name`, `gen_ai.usage.*`

194+

- `openclaw.run`

195+

- `openclaw.outcome`, `openclaw.channel`, `openclaw.provider`, `openclaw.model`, `openclaw.errorCategory`

196+

- `openclaw.model.call`

197+

- `gen_ai.system` by default, or `gen_ai.provider.name` when the latest GenAI semantic conventions are opted in

198+

- `gen_ai.request.model`, `gen_ai.operation.name`, `openclaw.provider`, `openclaw.model`, `openclaw.api`, `openclaw.transport`

199+

- `openclaw.provider.request_id_hash` (bounded SHA-based hash of the upstream provider request id; raw ids are not exported)

200+

- `openclaw.tool.execution`

201+

- `gen_ai.tool.name`, `openclaw.toolName`, `openclaw.errorCategory`, `openclaw.tool.params.*`

202+

- `openclaw.exec`

203+

- `openclaw.exec.target`, `openclaw.exec.mode`, `openclaw.outcome`, `openclaw.failureKind`, `openclaw.exec.command_length`, `openclaw.exec.exit_code`, `openclaw.exec.timed_out`

204+

- `openclaw.webhook.processed`

205+

- `openclaw.channel`, `openclaw.webhook`, `openclaw.chatId`

206+

- `openclaw.webhook.error`

207+

- `openclaw.channel`, `openclaw.webhook`, `openclaw.chatId`, `openclaw.error`

208+

- `openclaw.message.processed`

209+

- `openclaw.channel`, `openclaw.outcome`, `openclaw.chatId`, `openclaw.messageId`, `openclaw.reason`

210+

- `openclaw.message.delivery`

211+

- `openclaw.channel`, `openclaw.delivery.kind`, `openclaw.outcome`, `openclaw.errorCategory`, `openclaw.delivery.result_count`

212+

- `openclaw.session.stuck`

213+

- `openclaw.state`, `openclaw.ageMs`, `openclaw.queueDepth`

214+

- `openclaw.context.assembled`

215+

- `openclaw.prompt.size`, `openclaw.history.size`, `openclaw.context.tokens`, `openclaw.errorCategory` (no prompt, history, response, or session-key content)

216+

- `openclaw.tool.loop`

217+

- `openclaw.toolName`, `openclaw.outcome`, `openclaw.iterations`, `openclaw.errorCategory` (no loop messages, params, or tool output)

218+

- `openclaw.memory.pressure`

219+

- `openclaw.memory.level`, `openclaw.memory.heap_used_bytes`, `openclaw.memory.rss_bytes`

220+221+

When content capture is explicitly enabled, model and tool spans can also

222+

include bounded, redacted `openclaw.content.*` attributes for the specific

223+

content classes you opted into.

224+225+

## Diagnostic event catalog

226+227+

The events below back the metrics and spans above. Plugins can also subscribe

228+

to them directly without OTLP export.

229+230+

**Model usage**

231+232+

- `model.usage` — tokens, cost, duration, context, provider/model/channel,

233+

session ids. `usage` is provider/turn accounting for cost and telemetry;

234+

`context.used` is the current prompt/context snapshot and can be lower than

235+

provider `usage.total` when cached input or tool-loop calls are involved.

236+237+

**Message flow**

238+239+

- `webhook.received` / `webhook.processed` / `webhook.error`

240+

- `message.queued` / `message.processed`

241+

- `message.delivery.started` / `message.delivery.completed` / `message.delivery.error`

242+243+

**Queue and session**

244+245+

- `queue.lane.enqueue` / `queue.lane.dequeue`

246+

- `session.state` / `session.stuck`

247+

- `run.attempt`

248+

- `diagnostic.heartbeat` (aggregate counters: webhooks/queue/session)

249+250+

**Exec**

251+252+

- `exec.process.completed` — terminal outcome, duration, target, mode, exit

253+

code, and failure kind. Command text and working directories are not

254+

included.

255+256+

## Without an exporter

257+258+

You can keep diagnostics events available to plugins or custom sinks without

259+

running `diagnostics-otel`:

260+261+

```json5

262+

{

263+

diagnostics: { enabled: true },

264+

}

265+

```

266+267+

For targeted debug output without raising `logging.level`, use diagnostics

268+

flags. Flags are case-insensitive and support wildcards (e.g. `telegram.*` or

269+

`*`):

270+271+

```json5

272+

{

273+

diagnostics: { flags: ["telegram.http"] },

274+

}

275+

```

276+277+

Or as a one-off env override:

278+279+

```bash

280+

OPENCLAW_DIAGNOSTICS=telegram.http,telegram.payload openclaw gateway

281+

```

282+283+

Flag output goes to the standard log file (`logging.file`) and is still

284+

redacted by `logging.redactSensitive`. Full guide:

285+

[Diagnostics flags](/diagnostics/flags).

286+287+

## Disable

288+289+

```json5

290+

{

291+

diagnostics: { otel: { enabled: false } },

292+

}

293+

```

294+295+

You can also leave `diagnostics-otel` out of `plugins.allow`, or run

296+

`openclaw plugins disable diagnostics-otel`.

297+298+

## Related

299+300+

- [Logging](/logging) — file logs, console output, CLI tailing, and the Control UI Logs tab

301+

- [Gateway logging internals](/gateway/logging) — WS log styles, subsystem prefixes, and console capture

302+

- [Diagnostics flags](/diagnostics/flags) — targeted debug-log flags

303+

- [Diagnostics export](/gateway/diagnostics) — operator support-bundle tool (separate from OTEL export)

304+

- [Configuration reference](/gateway/configuration-reference#diagnostics) — full `diagnostics.*` field reference