Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenClaw exports diagnostics through the bundled
diagnostics-oteldiagnostics-oteltraceparentjson5{ 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 plugin from the CLI:
bashopenclaw plugins enable diagnostics-otel
| Signal | What goes in it |
|---|---|
| Metrics | Counters and histograms for token usage, cost, run duration, message flow, queue lanes, session state, exec, and memory pressure. |
| Traces | Spans for model usage, model calls, harness lifecycle, tool execution, exec, webhook/message processing, context assembly, and tool loops. |
| Logs | Structured text logging.filetext diagnostics.otel.logs |
Toggle
tracesmetricslogsdiagnostics.otel.enabledjson5{ 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, }, }, }, }
| Variable | Purpose |
|---|---|
text OTEL_EXPORTER_OTLP_ENDPOINT | Override text diagnostics.otel.endpointtext /v1/tracestext /v1/metricstext /v1/logs |
text OTEL_EXPORTER_OTLP_TRACES_ENDPOINTtext OTEL_EXPORTER_OTLP_METRICS_ENDPOINTtext OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Signal-specific endpoint overrides used when the matching text diagnostics.otel.*Endpoint |
text OTEL_SERVICE_NAME | Override text diagnostics.otel.serviceName |
text OTEL_EXPORTER_OTLP_PROTOCOL | Override the wire protocol (only text http/protobuf |
text OTEL_SEMCONV_STABILITY_OPT_IN | Set to text gen_ai_latest_experimentaltext gen_ai.provider.nametext gen_ai.system |
text OPENCLAW_OTEL_PRELOADED | Set to text 1text tracestext metricstext logs |
Raw model/tool content is not exported by default. Spans carry bounded identifiers (channel, provider, model, error category, hash-only request ids) and never include prompt text, response text, tool inputs, tool outputs, or session keys.
Outbound model requests may include a W3C
traceparenttraceparentSet
diagnostics.otel.captureContent.*trueinputMessagesoutputMessagestoolInputstoolOutputssystemPromptWhen any subkey is enabled, model and tool spans get bounded, redacted
openclaw.content.*diagnostics.otel.sampleRate0.01.0diagnostics.otel.flushIntervalMs1000logging.leveltraceIdspanIdparentSpanIdtraceFlagstraceparentopenclaw.tokensopenclaw.tokenopenclaw.channelopenclaw.provideropenclaw.modelopenclaw.agentopenclaw.cost.usdopenclaw.channelopenclaw.provideropenclaw.modelopenclaw.run.duration_msopenclaw.channelopenclaw.provideropenclaw.modelopenclaw.context.tokensopenclaw.contextopenclaw.channelopenclaw.provideropenclaw.modelgen_ai.client.token.usagegen_ai.token.typeinputoutputgen_ai.provider.namegen_ai.operation.namegen_ai.request.modelgen_ai.client.operation.durationgen_ai.provider.namegen_ai.operation.namegen_ai.request.modelerror.typeopenclaw.model_call.duration_msopenclaw.provideropenclaw.modelopenclaw.apiopenclaw.transportopenclaw.errorCategoryopenclaw.failureKindopenclaw.model_call.request_bytesopenclaw.model_call.response_bytesopenclaw.model_call.time_to_first_byte_msopenclaw.webhook.receivedopenclaw.channelopenclaw.webhookopenclaw.webhook.erroropenclaw.channelopenclaw.webhookopenclaw.webhook.duration_msopenclaw.channelopenclaw.webhookopenclaw.message.queuedopenclaw.channelopenclaw.sourceopenclaw.message.processedopenclaw.channelopenclaw.outcomeopenclaw.message.duration_msopenclaw.channelopenclaw.outcomeopenclaw.message.delivery.startedopenclaw.channelopenclaw.delivery.kindopenclaw.message.delivery.duration_msopenclaw.channelopenclaw.delivery.kindopenclaw.outcomeopenclaw.errorCategoryopenclaw.queue.lane.enqueueopenclaw.laneopenclaw.queue.lane.dequeueopenclaw.laneopenclaw.queue.depthopenclaw.laneopenclaw.channel=heartbeatopenclaw.queue.wait_msopenclaw.laneopenclaw.session.stateopenclaw.stateopenclaw.reasonopenclaw.session.stuckopenclaw.stateopenclaw.session.stuck_age_msopenclaw.stateopenclaw.run.attemptopenclaw.attemptopenclaw.harness.duration_msopenclaw.harness.idopenclaw.harness.pluginopenclaw.outcomeopenclaw.harness.phaseopenclaw.exec.duration_msopenclaw.exec.targetopenclaw.exec.modeopenclaw.outcomeopenclaw.failureKindopenclaw.memory.heap_used_bytesopenclaw.memory.kindopenclaw.memory.rss_bytesopenclaw.memory.pressureopenclaw.memory.levelopenclaw.tool.loop.iterationsopenclaw.toolNameopenclaw.outcomeopenclaw.tool.loop.duration_msopenclaw.toolNameopenclaw.outcomeopenclaw.model.usageopenclaw.channelopenclaw.provideropenclaw.modelopenclaw.tokens.*gen_ai.systemgen_ai.provider.namegen_ai.request.modelgen_ai.operation.namegen_ai.usage.*openclaw.runopenclaw.outcomeopenclaw.channelopenclaw.provideropenclaw.modelopenclaw.errorCategoryopenclaw.model.callgen_ai.systemgen_ai.provider.namegen_ai.request.modelgen_ai.operation.nameopenclaw.provideropenclaw.modelopenclaw.apiopenclaw.transportopenclaw.errorCategoryopenclaw.failureKindopenclaw.model_call.request_bytesopenclaw.model_call.response_bytesopenclaw.model_call.time_to_first_byte_msopenclaw.provider.request_id_hashopenclaw.harness.runopenclaw.harness.idopenclaw.harness.pluginopenclaw.outcomeopenclaw.provideropenclaw.modelopenclaw.channelopenclaw.harness.result_classificationopenclaw.harness.yield_detectedopenclaw.harness.items.startedopenclaw.harness.items.completedopenclaw.harness.items.activeopenclaw.harness.phaseopenclaw.errorCategoryopenclaw.harness.cleanup_failedopenclaw.tool.executiongen_ai.tool.nameopenclaw.toolNameopenclaw.errorCategoryopenclaw.tool.params.*openclaw.execopenclaw.exec.targetopenclaw.exec.modeopenclaw.outcomeopenclaw.failureKindopenclaw.exec.command_lengthopenclaw.exec.exit_codeopenclaw.exec.timed_outopenclaw.webhook.processedopenclaw.channelopenclaw.webhookopenclaw.chatIdopenclaw.webhook.erroropenclaw.channelopenclaw.webhookopenclaw.chatIdopenclaw.erroropenclaw.message.processedopenclaw.channelopenclaw.outcomeopenclaw.chatIdopenclaw.messageIdopenclaw.reasonopenclaw.message.deliveryopenclaw.channelopenclaw.delivery.kindopenclaw.outcomeopenclaw.errorCategoryopenclaw.delivery.result_countopenclaw.session.stuckopenclaw.stateopenclaw.ageMsopenclaw.queueDepthopenclaw.context.assembledopenclaw.prompt.sizeopenclaw.history.sizeopenclaw.context.tokensopenclaw.errorCategoryopenclaw.tool.loopopenclaw.toolNameopenclaw.outcomeopenclaw.iterationsopenclaw.errorCategoryopenclaw.memory.pressureopenclaw.memory.levelopenclaw.memory.heap_used_bytesopenclaw.memory.rss_bytesWhen content capture is explicitly enabled, model and tool spans can also include bounded, redacted
openclaw.content.*The events below back the metrics and spans above. Plugins can also subscribe to them directly without OTLP export.
Model usage
model.usageusagecontext.usedusage.totalMessage flow
webhook.receivedwebhook.processedwebhook.errormessage.queuedmessage.processedmessage.delivery.startedmessage.delivery.completedmessage.delivery.errorQueue and session
queue.lane.enqueuequeue.lane.dequeuesession.statesession.stuckrun.attemptdiagnostic.heartbeatHarness lifecycle
harness.run.startedharness.run.completedharness.run.errorharnessIdpluginIddurationMsoutcomeresultClassificationyieldDetecteditemLifecyclephasepreparestartsendresolvecleanuperrorCategorycleanupFailedExec
exec.process.completedYou can keep diagnostics events available to plugins or custom sinks without running
diagnostics-oteljson5{ diagnostics: { enabled: true }, }
For targeted debug output without raising
logging.leveltelegram.**json5{ diagnostics: { flags: ["telegram.http"] }, }
Or as a one-off env override:
bashOPENCLAW_DIAGNOSTICS=telegram.http,telegram.payload openclaw gateway
Flag output goes to the standard log file (
logging.filelogging.redactSensitivejson5{ diagnostics: { otel: { enabled: false } }, }
You can also leave
diagnostics-otelplugins.allowopenclaw plugins disable diagnostics-oteldiagnostics.*© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine