Gateway 导读
OpenTelemetry export:总控室这一层在盯什么
OpenTelemetry export 属于网关总控室里的一角。先看它卡在哪个位置、会拨动哪些客户端和工具、旋钮一拧会影响哪片区域,然后再看命令细节。原文最响的一记鼓点,其实是:OpenClaw exports diagnostics through the official diagnostics-otel 新本领插件 using **OTLP/H…。
先听这页的人话版
OpenTelemetry export
这一页不是在堆术语,它像把“OpenTelemetry export”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:OpenClaw exports diagnostics through the official diagnostics-otel 新本领插件 using **OTLP/HTTP (pro…。
如果把这页当成“给普通人看的版本”,你最应该带走的是:它到底在教你一件什么事、什么时候要这样做、以及哪里最容易踩坑。
第 1 站
Start Here
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw exports diagnostics through the official diagnostics-otel 新本领插件 using **OTLP/HTTP (protobuf)**. Any collector…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw exports diagnostics through the official diagnostics-otel 新本领插件 using **OTLP/HTTP (protobuf)**. Any collector…。
OpenClaw exports diagnostics through the official diagnostics-otel plugin using **OTLP/HTTP (protobuf)**. Any collector or backend that accepts OTLP/HTTP works without code changes. For local file logs and how to read them, see Logging.
第 2 站
How it fits together
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:门口的小门卫 and bundled 新本领插件s for 聪明脑袋模型 runs, 小纸条消息 flow, sessions, queues, and exec. OpenTelemetry **metrics**, **traces*…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:门口的小门卫 and bundled 新本领插件s for 聪明脑袋模型 runs, 小纸条消息 flow, sessions, queues, and exec.
Gateway and bundled plugins for model runs, message flow, sessions, queues, and exec.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenTelemetry **metrics**, **traces**, and **logs** over OTLP/HTTP.
OpenTelemetry **metrics**, **traces**, and **logs** over OTLP/HTTP.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:trusted 聪明脑袋模型-call span context when the provider transport accepts custom headers. 新本领插件-emitted trace context is not…。
trusted model-call span context when the provider transport accepts custom headers. Plugin-emitted trace context is not propagated.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:enabled, so the in-process cost stays near zero by default.
enabled, so the in-process cost stays near zero by default.
这一串条目别硬背,把它当成“How it fits together”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:**Diagnostics events** are structured, in…、**diagnostics-otel 新本领插件** subscribes to…、**Provider calls** receive a W3C tracepar…、Exporters only attach when both the diagn…。
- **Diagnostics events** are structured, in-process records emitted by the
- **
diagnostics-otelplugin** subscribes to those events and exports them as - **Provider calls** receive a W3C
traceparentheader from OpenClaw's - Exporters only attach when both the diagnostics surface and the plugin are
第 3 站
Quick start
这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。
这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。
很多文档看起来长,其实是在防你漏掉前置条件。
真正照做时,先找前置条件,再找必填项,最后看验证方法。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For packaged installs, install the 新本领插件 first: You can also enable the 新本领插件 from the CLI: Note protocol currently sup…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For packaged installs, install the 新本领插件 first:。
For packaged installs, install the plugin first:
这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。
- 这里在给“openclaw plugins install clawhub”挂牌子,告诉系统它该指向“@openclaw/diagnostics-otel”。
openclaw plugins install clawhub:@openclaw/diagnostics-otel
这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
- 这里在给“plugins”挂牌子,告诉系统它该指向“{”。
- 这里在给“allow”挂牌子,告诉系统它该指向“[diagnostics-otel]”。
{
plugins: {
allow: ["diagnostics-otel"],
entries: {
"diagnostics-otel": { enabled: true },
},
},
diagnostics: {
enabled: true,
otel: {
enabled: true,
endpoint: "http://otel-collector:4318",
protocol: "http/protobuf",
serviceName: "openclaw-gateway",
traces: true,
metrics: true,
logs: true,
sampleRate: 0.2,
flushIntervalMs: 60000,
},
},
}
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:You can also enable the 新本领插件 from the CLI:。
You can also enable the plugin from the CLI:
这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。
- 这一句是在直接叫 OpenClaw 动起来:“openclaw plugins enable diagnostics-otel”。你可以把它想成一句说出口就要执行的差事。
openclaw plugins enable diagnostics-otel
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Note。
Note
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:protocol currently supports http/protobuf only. grpc is ignored.
protocol currently supports http/protobuf only. grpc is ignored.
第 4 站
Signals exported
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Toggle traces, metrics, and logs independently. All three default to on when diagnostics.otel.enabled is true.
这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。
| Signal | What goes in it |
|---|---|
| **Metrics** | Counters and histograms for token usage, cost, run duration, skill usage, message flow, Talk events, queue lanes, session state/recovery, tool execution, exec, and memory pressure. |
| **Traces** | Spans for model usage, model calls, harness lifecycle, skill usage, tool execution, exec, webhook/message processing, context assembly, and tool loops. |
| **Logs** | Structured logging.file records exported over OTLP when diagnostics.otel.logs is enabled; log bodies are withheld unless content capture is explicitly enabled. |
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Toggle traces, metrics, and logs independently. All three default to on when diagnostics.otel.enabled is true.
Toggle traces, metrics, and logs independently. All three default to on when diagnostics.otel.enabled is true.
第 5 站
设置说明书uration reference
这一节主要在解释“设置说明书uration reference”到底是干什么的,以及你什么时候会遇到它。
这一节主要在解释“设置说明书uration reference”到底是干什么的,以及你什么时候会遇到它。
如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。
真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
- 这里在给“diagnostics”挂牌子,告诉系统它该指向“{”。
- 这里在给“enabled”挂牌子,告诉系统它该指向“true”。
{
diagnostics: {
enabled: true,
otel: {
enabled: true,
endpoint: "http://otel-collector:4318",
tracesEndpoint: "http://otel-collector:4318/v1/traces",
metricsEndpoint: "http://otel-collector:4318/v1/metrics",
logsEndpoint: "http://otel-collector:4318/v1/logs",
protocol: "http/protobuf", // grpc is ignored
serviceName: "openclaw-gateway",
headers: { "x-collector-token": "..." },
traces: true,
metrics: true,
logs: true,
sampleRate: 0.2, // root-span sampler, 0.0..1.0
flushIntervalMs: 60000, // metric export interval (min 1000ms)
captureContent: {
enabled: false,
inputMessages: false,
outputMessages: false,
toolInputs: false,
toolOutputs: false,
systemPrompt: false,
},
},
},
}
第 6 站
Environment variables
这一节主要在解释“Environment variables”到底是干什么的,以及你什么时候会遇到它。
这一节主要在解释“Environment variables”到底是干什么的,以及你什么时候会遇到它。
如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。
真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。
| Variable | Purpose |
|---|---|
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. |
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT / OTEL_EXPORTER_OTLP_METRICS_ENDPOINT / OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Signal-specific endpoint overrides used when the matching diagnostics.otel.*Endpoint config key is unset. Signal-specific config wins over signal-specific env, which wins over the shared endpoint. |
OTEL_SERVICE_NAME | Override diagnostics.otel.serviceName. |
OTEL_EXPORTER_OTLP_PROTOCOL | Override the wire protocol (only http/protobuf is honored today). |
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. |
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. |
第 7 站
Privacy and content capture
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Raw 聪明脑袋模型/工具小帮手 content is **not** exported by default. Spans carry bounded identifiers (消息通道, provider, 聪明脑袋模型, error…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Raw 聪明脑袋模型/工具小帮手 content is **not** exported by default. Spans carry bounded identifiers (消息通道, provider, 聪明脑袋模型, error…。
Raw model/tool content is **not** exported by default. Spans carry bounded identifiers (channel, provider, model, error category, hash-only request ids, tool source, tool owner, and skill name/source) and never include prompt text, response text, tool inputs, tool outputs, skill file paths, or session keys. OTLP log records keep severity, logger, code location, trusted trace context, and sanitized attributes by default, but the raw log message body is exported only when diagnostics.otel.captureContent is set to boolean true. Granular captureContent.* subkeys do not enable log bodies. Labels that look like scoped agent session keys are replaced with unknown. Talk metrics export only bounded event metadata such as mode, transport, provider, and event type. They do not include transcripts, audio payloads, session ids, turn ids, call ids, room ids, or handoff tokens.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Outbound 聪明脑袋模型 requests may include a W3C traceparent header. That header is generated only from OpenClaw-owned diagno…。
Outbound model requests may include a W3C traceparent header. That header is generated only from OpenClaw-owned diagnostic trace context for the active model call. Existing caller-supplied traceparent headers are replaced, so plugins or custom provider options cannot spoof cross-service trace ancestry.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Set diagnostics.otel.captureContent.* to true only when your collector and retention policy are approved for prompt, re…。
Set diagnostics.otel.captureContent.* to true only when your collector and retention policy are approved for prompt, response, tool, or system-prompt text. Each subkey is opt-in independently:
这一串条目别硬背,把它当成“Privacy and content capture”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:input小纸条消息s - user prompt content.、output小纸条消息s - 聪明脑袋模型 response content.、工具小帮手Inputs - 工具小帮手 argument payloads.、工具小帮手Outputs - 工具小帮手 result payloads.
inputMessages- user prompt content.outputMessages- model response content.toolInputs- tool argument payloads.toolOutputs- tool result payloads.systemPrompt- assembled system/developer prompt.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:When any subkey is enabled, 聪明脑袋模型 and 工具小帮手 spans get bounded, redacted openclaw.content.* attributes for that class o…。
When any subkey is enabled, model and tool spans get bounded, redacted openclaw.content.* attributes for that class only. Use boolean captureContent: true only for broad diagnostics captures where OTLP log message bodies are also approved for export.
第 8 站
Sampling and flushing
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1.0 keeps all). diagnostic log-record redaction path, not console formatting. High-volume installs should prefer OTLP c…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1.0 keeps all).
1.0 keeps all).
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:diagnostic log-record redaction path, not console formatting. High-volume installs should prefer OTLP collector samplin…。
diagnostic log-record redaction path, not console formatting. High-volume installs should prefer OTLP collector sampling/filtering over local sampling.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:spanId, parentSpanId, and traceFlags when the log call carries a valid diagnostic trace context, which lets log process…。
spanId, parentSpanId, and traceFlags when the log call carries a valid diagnostic trace context, which lets log processors join local log lines with exported spans.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:internal request trace scope. Logs and diagnostic events inside that scope inherit the request trace by default, while…。
internal request trace scope. Logs and diagnostic events inside that scope inherit the request trace by default, while agent run and model-call spans are created as children so provider traceparent headers stay on the same trace.
这一串条目别硬背,把它当成“Sampling and flushing”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:**Traces:** diagnostics.otel.sampleRate (…、**Metrics:** diagnostics.otel.flushInterv…、**Logs:** OTLP logs respect logging.level…、**File-log correlation:** JSONL file logs…。
- **Traces:**
diagnostics.otel.sampleRate(root-span only,0.0drops all, - **Metrics:**
diagnostics.otel.flushIntervalMs(minimum1000). - **Logs:** OTLP logs respect
logging.level(file log level). They use the - **File-log correlation:** JSONL file logs include top-level
traceId, - **Request correlation:** Gateway HTTP requests and WebSocket frames create an
第 9 站
聪明脑袋模型 usage
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这一串条目别硬背,把它当成“Model usage”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.tokens (counter, attrs: openclaw…、openclaw.cost.usd (counter, attrs: opencl…、openclaw.run.duration_ms (histogram, attr…、openclaw.context.tokens (histogram, attrs…。
openclaw.tokens(counter, attrs:openclaw.token,openclaw.channel,openclaw.provider,openclaw.model,openclaw.agent)openclaw.cost.usd(counter, attrs:openclaw.channel,openclaw.provider,openclaw.model)openclaw.run.duration_ms(histogram, attrs:openclaw.channel,openclaw.provider,openclaw.model)openclaw.context.tokens(histogram, attrs:openclaw.context,openclaw.channel,openclaw.provider,openclaw.model)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)gen_ai.client.operation.duration(histogram, seconds, GenAI semantic-conventions metric, attrs:gen_ai.provider.name,gen_ai.operation.name,gen_ai.request.model, optionalerror.type)openclaw.model_call.duration_ms(histogram, attrs:openclaw.provider,openclaw.model,openclaw.api,openclaw.transport, plusopenclaw.errorCategoryandopenclaw.failureKindon classified errors)openclaw.model_call.request_bytes(histogram, UTF-8 byte size of the final model request payload; no raw payload content)openclaw.model_call.response_bytes(histogram, UTF-8 byte size of streamed model response events; no raw response content)openclaw.model_call.time_to_first_byte_ms(histogram, elapsed time before the first streamed response event)openclaw.skill.used(counter, attrs:openclaw.skill.name,openclaw.skill.source,openclaw.skill.activation, optionalopenclaw.agent, optionalopenclaw.toolName)
第 10 站
小纸条消息 flow
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这一串条目别硬背,把它当成“Message flow”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.小铃铛通知.received (counter, attrs:…、openclaw.小铃铛通知.error (counter, attrs: ope…、openclaw.小铃铛通知.duration_ms (histogram, at…、openclaw.小纸条消息.queued (counter, attrs: op…。
openclaw.webhook.received(counter, attrs:openclaw.channel,openclaw.webhook)openclaw.webhook.error(counter, attrs:openclaw.channel,openclaw.webhook)openclaw.webhook.duration_ms(histogram, attrs:openclaw.channel,openclaw.webhook)openclaw.message.queued(counter, attrs:openclaw.channel,openclaw.source)openclaw.message.received(counter, attrs:openclaw.channel,openclaw.source)openclaw.message.dispatch.started(counter, attrs:openclaw.channel,openclaw.source)openclaw.message.dispatch.completed(counter, attrs:openclaw.channel,openclaw.outcome,openclaw.reason,openclaw.source)openclaw.message.dispatch.duration_ms(histogram, attrs:openclaw.channel,openclaw.outcome,openclaw.reason,openclaw.source)openclaw.message.processed(counter, attrs:openclaw.channel,openclaw.outcome)openclaw.message.duration_ms(histogram, attrs:openclaw.channel,openclaw.outcome)openclaw.message.delivery.started(counter, attrs:openclaw.channel,openclaw.delivery.kind)openclaw.message.delivery.duration_ms(histogram, attrs:openclaw.channel,openclaw.delivery.kind,openclaw.outcome,openclaw.errorCategory)
第 11 站
Talk
这一节主要在解释“Talk”到底是干什么的,以及你什么时候会遇到它。
这一节主要在解释“Talk”到底是干什么的,以及你什么时候会遇到它。
如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。
真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这一串条目别硬背,把它当成“Talk”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.talk.event (counter, attrs: open…、openclaw.talk.event.duration_ms (histogra…、openclaw.talk.audio.bytes (histogram, att…。
openclaw.talk.event(counter, attrs:openclaw.talk.event_type,openclaw.talk.mode,openclaw.talk.transport,openclaw.talk.brain,openclaw.talk.provider)openclaw.talk.event.duration_ms(histogram, attrs: same asopenclaw.talk.event; emitted when a Talk event reports duration)openclaw.talk.audio.bytes(histogram, attrs: same asopenclaw.talk.event; emitted for Talk audio frame events that report byte length)
第 12 站
Queues and sessions
这一节主要在解释“Queues and sessions”到底是干什么的,以及你什么时候会遇到它。
这一节主要在解释“Queues and sessions”到底是干什么的,以及你什么时候会遇到它。
如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。
真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这一串条目别硬背,把它当成“Queues and sessions”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.queue.lane.enqueue (counter, att…、openclaw.queue.lane.dequeue (counter, att…、openclaw.queue.depth (histogram, attrs: o…、openclaw.queue.wait_ms (histogram, attrs:…。
openclaw.queue.lane.enqueue(counter, attrs:openclaw.lane)openclaw.queue.lane.dequeue(counter, attrs:openclaw.lane)openclaw.queue.depth(histogram, attrs:openclaw.laneoropenclaw.channel=heartbeat)openclaw.queue.wait_ms(histogram, attrs:openclaw.lane)openclaw.session.state(counter, attrs:openclaw.state,openclaw.reason)openclaw.session.stuck(counter, attrs:openclaw.state; emitted only for stale session bookkeeping with no active work)openclaw.session.stuck_age_ms(histogram, attrs:openclaw.state; emitted only for stale session bookkeeping with no active work)openclaw.session.turn.created(counter, attrs:openclaw.agent,openclaw.channel,openclaw.trigger)openclaw.session.recovery.requested(counter, attrs:openclaw.state,openclaw.action,openclaw.active_work_kind,openclaw.reason)openclaw.session.recovery.completed(counter, attrs:openclaw.state,openclaw.action,openclaw.status,openclaw.active_work_kind,openclaw.reason)openclaw.session.recovery.age_ms(histogram, attrs: same as the matching recovery counter)openclaw.run.attempt(counter, attrs:openclaw.attempt)
第 13 站
Session liveness telemetry
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:diagnostics.stuckSessionWarnMs is the no-progress age threshold for session liveness diagnostics. A processing session…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:diagnostics.stuckSessionWarnMs is the no-progress age threshold for session liveness diagnostics. A processing session…。
diagnostics.stuckSessionWarnMs is the no-progress age threshold for session liveness diagnostics. A processing session does not age toward this threshold while OpenClaw observes reply, tool, status, block, or ACP runtime progress. Typing keepalives are not counted as progress, so a silent model or harness can still be detected.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw classifies sessions by the work it can still observe:。
OpenClaw classifies sessions by the work it can still observe:
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:still making progress.
still making progress.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:recent progress. Stalled embedded runs stay observe-only at first, then abort-drain after diagnostics.stuckSessionAbort…。
recent progress. Stalled embedded runs stay observe-only at first, then abort-drain after diagnostics.stuckSessionAbortMs with no progress so queued turns behind the lane can resume. When unset, the abort threshold defaults to the safer extended window of at least 5 minutes and 3x diagnostics.stuckSessionWarnMs.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:the affected session lane immediately.
the affected session lane immediately.
这一串条目别硬背,把它当成“Session liveness telemetry”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:session.long_running: active embedded wor…、session.stalled: active work exists, but…、session.stuck: stale session bookkeeping…。
session.long_running: active embedded work, model calls, or tool calls aresession.stalled: active work exists, but the active run has not reportedsession.stuck: stale session bookkeeping with no active work. This releases
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recovery emits structured session.recovery.requested and session.recovery.completed events. Diagnostic session state is…。
Recovery emits structured session.recovery.requested and session.recovery.completed events. Diagnostic session state is marked idle only after a mutating recovery outcome (aborted or released) and only if the same processing generation is still current.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Only session.stuck emits the openclaw.session.stuck counter, the openclaw.session.stuck_age_ms histogram, and the openc…。
Only session.stuck emits the openclaw.session.stuck counter, the openclaw.session.stuck_age_ms histogram, and the openclaw.session.stuck span. Repeated session.stuck diagnostics back off while the session remains unchanged, so dashboards should alert on sustained increases rather than every heartbeat tick. For the config knob and defaults, see Configuration reference.
第 14 站
Harness lifecycle
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这一串条目别硬背,把它当成“Harness lifecycle”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.harness.duration_ms (histogram,…。
openclaw.harness.duration_ms(histogram, attrs:openclaw.harness.id,openclaw.harness.plugin,openclaw.outcome,openclaw.harness.phaseon errors)
第 15 站
Exec
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这一串条目别硬背,把它当成“Exec”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.exec.duration_ms (histogram, att…。
openclaw.exec.duration_ms(histogram, attrs:openclaw.exec.target,openclaw.exec.mode,openclaw.outcome,openclaw.failureKind)
第 16 站
Diagnostics internals (memory and 工具小帮手 loop)
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
这一小段像旁白,在提醒我们镜头已经切到下一站。
这一串条目别硬背,把它当成“Diagnostics internals (memory and tool loop)”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.memory.heap_used_bytes (histogra…、openclaw.memory.rss_bytes (histogram)、openclaw.memory.pressure (counter, attrs:…、openclaw.工具小帮手.loop.iterations (counter,…。
openclaw.memory.heap_used_bytes(histogram, attrs:openclaw.memory.kind)openclaw.memory.rss_bytes(histogram)openclaw.memory.pressure(counter, attrs:openclaw.memory.level)openclaw.tool.loop.iterations(counter, attrs:openclaw.toolName,openclaw.outcome)openclaw.tool.loop.duration_ms(histogram, attrs:openclaw.toolName,openclaw.outcome)
第 17 站
Exported spans
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:When content capture is explicitly enabled, 聪明脑袋模型 and 工具小帮手 spans can also include bounded, redacted openclaw.content.…。
这一串条目别硬背,把它当成“Exported spans”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:openclaw.聪明脑袋模型.usage、openclaw.消息通道, openclaw.provider, opencla…、openclaw.tokens.* (input/output/cache_rea…、gen_ai.system by default, or gen_ai.provi…。
openclaw.model.usageopenclaw.channel,openclaw.provider,openclaw.modelopenclaw.tokens.*(input/output/cache_read/cache_write/total)gen_ai.systemby default, orgen_ai.provider.namewhen the latest GenAI semantic conventions are opted ingen_ai.request.model,gen_ai.operation.name,gen_ai.usage.*openclaw.runopenclaw.outcome,openclaw.channel,openclaw.provider,openclaw.model,openclaw.errorCategoryopenclaw.model.callgen_ai.systemby default, orgen_ai.provider.namewhen the latest GenAI semantic conventions are opted ingen_ai.request.model,gen_ai.operation.name,openclaw.provider,openclaw.model,openclaw.api,openclaw.transportopenclaw.errorCategoryand optionalopenclaw.failureKindon errorsopenclaw.model_call.request_bytes,openclaw.model_call.response_bytes,openclaw.model_call.time_to_first_byte_msopenclaw.provider.request_id_hash(bounded SHA-based hash of the upstream provider request id; raw ids are not exported)openclaw.harness.runopenclaw.harness.id,openclaw.harness.plugin,openclaw.outcome,openclaw.provider,openclaw.model,openclaw.channel- On completion:
openclaw.harness.result_classification,openclaw.harness.yield_detected,openclaw.harness.items.started,openclaw.harness.items.completed,openclaw.harness.items.active - On error:
openclaw.harness.phase,openclaw.errorCategory, optionalopenclaw.harness.cleanup_failed openclaw.tool.executiongen_ai.tool.name,openclaw.toolName,openclaw.errorCategory,openclaw.tool.params.*openclaw.execopenclaw.exec.target,openclaw.exec.mode,openclaw.outcome,openclaw.failureKind,openclaw.exec.command_length,openclaw.exec.exit_code,openclaw.exec.timed_outopenclaw.webhook.processedopenclaw.channel,openclaw.webhookopenclaw.webhook.erroropenclaw.channel,openclaw.webhook,openclaw.erroropenclaw.message.processedopenclaw.channel,openclaw.outcome,openclaw.reasonopenclaw.message.deliveryopenclaw.channel,openclaw.delivery.kind,openclaw.outcome,openclaw.errorCategory,openclaw.delivery.result_countopenclaw.session.stuckopenclaw.state,openclaw.ageMs,openclaw.queueDepthopenclaw.context.assembledopenclaw.prompt.size,openclaw.history.size,openclaw.context.tokens,openclaw.errorCategory(no prompt, history, response, or session-key content)openclaw.tool.loopopenclaw.toolName,openclaw.outcome,openclaw.iterations,openclaw.errorCategory(no loop messages, params, or tool output)openclaw.memory.pressureopenclaw.memory.level,openclaw.memory.heap_used_bytes,openclaw.memory.rss_bytes
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:When content capture is explicitly enabled, 聪明脑袋模型 and 工具小帮手 spans can also include bounded, redacted openclaw.content.…。
When content capture is explicitly enabled, model and tool spans can also include bounded, redacted openclaw.content.* attributes for the specific content classes you opted into.
第 18 站
Diagnostic event catalog
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The events below back the metrics and spans above. 新本领插件s can also subscribe to them directly without OTLP export. **聪明…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The events below back the metrics and spans above. 新本领插件s can also subscribe to them directly without OTLP export.
The events below back the metrics and spans above. Plugins can also subscribe to them directly without OTLP export.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:**聪明脑袋模型 usage**。
**Model usage**
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:session ids. usage is provider/turn accounting for cost and telemetry; context.used is the current prompt/context snaps…。
session ids. usage is provider/turn accounting for cost and telemetry; context.used is the current prompt/context snapshot and can be lower than provider usage.total when cached input or tool-loop calls are involved.
这一串条目别硬背,把它当成“Diagnostic event catalog”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:聪明脑袋模型.usage - tokens, cost, duration, co…。
model.usage- tokens, cost, duration, context, provider/model/channel,
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:**小纸条消息 flow**。
**Message flow**
这一串条目别硬背,把它当成“Diagnostic event catalog”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:小铃铛通知.received / 小铃铛通知.processed / 小铃铛通知.…、小纸条消息.queued / 小纸条消息.processed、小纸条消息.delivery.started / 小纸条消息.delivery.c…。
webhook.received/webhook.processed/webhook.errormessage.queued/message.processedmessage.delivery.started/message.delivery.completed/message.delivery.error
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:**Queue and session**。
**Queue and session**
这一串条目别硬背,把它当成“Diagnostic event catalog”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:queue.lane.enqueue / queue.lane.dequeue、session.state / session.long_running / se…、run.attempt / run.progress、diagnostic.heartbeat (aggregate counters:…。
queue.lane.enqueue/queue.lane.dequeuesession.state/session.long_running/session.stalled/session.stuckrun.attempt/run.progressdiagnostic.heartbeat(aggregate counters: webhooks/queue/session)
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:**Harness lifecycle**。
**Harness lifecycle**
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:per-run lifecycle for the 机器人朋友 harness. Includes harnessId, optional 新本领插件Id, provider/聪明脑袋模型/消息通道, and run id. Comple…。
per-run lifecycle for the agent harness. Includes harnessId, optional pluginId, provider/model/channel, and run id. Completion adds durationMs, outcome, optional resultClassification, yieldDetected, and itemLifecycle counts. Errors add phase (prepare/start/send/resolve/cleanup), errorCategory, and optional cleanupFailed.
这一串条目别硬背,把它当成“Diagnostic event catalog”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:harness.run.started / harness.run.complet…。
harness.run.started/harness.run.completed/harness.run.error-
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:**Exec**。
**Exec**
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:code, and failure kind. 魔法口令 text and working directories are not included.
code, and failure kind. Command text and working directories are not included.
这一串条目别硬背,把它当成“Diagnostic event catalog”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:exec.process.completed - terminal outcome…。
exec.process.completed- terminal outcome, duration, target, mode, exit
第 19 站
Without an exporter
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:You can keep diagnostics events available to 新本领插件s or custom sinks without running diagnostics-otel: For targeted debu…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:You can keep diagnostics events available to 新本领插件s or custom sinks without running diagnostics-otel:。
You can keep diagnostics events available to plugins or custom sinks without running diagnostics-otel:
这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
- 这里在给“diagnostics”挂牌子,告诉系统它该指向“{ enabled: true }”。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
{
diagnostics: { enabled: true },
}
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For targeted debug output without raising logging.level, use diagnostics flags. Flags are case-insensitive and support…。
For targeted debug output without raising logging.level, use diagnostics flags. Flags are case-insensitive and support wildcards (e.g. telegram.* or *):
这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
- 这里在给“diagnostics”挂牌子,告诉系统它该指向“{ flags: [telegram.http] }”。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
{
diagnostics: { flags: ["telegram.http"] },
}
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Or as a one-off env override:。
Or as a one-off env override:
这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。
- 这一行“OPENCLAW_DIAGNOSTICS=telegram.http,telegram.payload openclaw gateway”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
OPENCLAW_DIAGNOSTICS=telegram.http,telegram.payload openclaw gateway
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Flag output goes to the standard log file (logging.file) and is still redacted by logging.redactSensitive. Full guide:…。
Flag output goes to the standard log file (logging.file) and is still redacted by logging.redactSensitive. Full guide: Diagnostics flags.
第 20 站
Disable
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:You can also leave diagnostics-otel out of 新本领插件s.allow, or run openclaw 新本领插件s disable diagnostics-otel.
这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
- 这里在给“diagnostics”挂牌子,告诉系统它该指向“{ otel: { enabled: false } }”。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
{
diagnostics: { otel: { enabled: false } },
}
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:You can also leave diagnostics-otel out of 新本领插件s.allow, or run openclaw 新本领插件s disable diagnostics-otel.
You can also leave diagnostics-otel out of plugins.allow, or run openclaw plugins disable diagnostics-otel.
第 21 站
Related
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。
这一串条目别硬背,把它当成“Related”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Logging - file logs, console output, CLI…、门口的小门卫 logging internals - WS log styles,…、Diagnostics flags - targeted debug-log fl…、Diagnostics export - operator support-bun…。
- Logging - file logs, console output, CLI tailing, and the Control UI Logs tab
- Gateway logging internals - WS log styles, subsystem prefixes, and console capture
- Diagnostics flags - targeted debug-log flags
- Diagnostics export - operator support-bundle tool (separate from OTEL export)
- Configuration reference - full
diagnostics.*field reference
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。
---
AdSense 连接验证已经放在页面头部;广告单元等站点审批通过后再启用。
google-adsense-account: ca-pub-3833673520933536