--- summary: "Index of the OpenClaw OpenTelemetry export documentation, one page per reader job" title: "OpenTelemetry export" sidebarTitle: "OpenTelemetry export" read_when: - You want to send OpenClaw model usage, message flow, or session metrics to an OpenTelemetry collector - You are wiring traces, metrics, or logs into Grafana, Datadog, Honeycomb, New Relic, Tempo, or another OTLP backend - You need the exact metric names, span names, or attribute shapes to build dashboards or alerts --- OpenClaw exports diagnostics through the official `diagnostics-otel` plugin using **OTLP/HTTP (protobuf)**. Logs can also be written as stdout JSONL for container and sandbox log pipelines. Any collector or backend that accepts OTLP/HTTP works without code changes. For local file logs, see [Logging](/logging). - **Diagnostics events** are structured, in-process records emitted by the Gateway and bundled plugins for model runs, message flow, sessions, queues, and exec. - **`diagnostics-otel`** subscribes to those events and exports them as OpenTelemetry **metrics**, **traces**, and **logs** over OTLP/HTTP, and can mirror log records to stdout JSONL. - **Provider calls** receive a W3C `traceparent` header from the actual current OpenTelemetry model-call span when the provider transport accepts custom headers. Diagnostic IDs remain local correlation keys, and plugin-emitted trace context is not propagated. - Exporters attach only when both the diagnostics surface and the plugin are enabled, so in-process cost stays near zero by default. This page is an index. OpenTelemetry export is documented on five pages, one per reader job. Open the page that matches your task. | Page | Read it when | | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | [Set up OpenTelemetry export](/gateway/opentelemetry/setup) | You want to install the plugin, turn export on, check exporter health, or turn it off. | | [OpenTelemetry configuration](/gateway/opentelemetry/configuration) | You need the `diagnostics.otel` fields, the `OTEL_*` variables, or sampling and flush settings. | | [Privacy and trace context](/gateway/opentelemetry/privacy-and-trace-context) | You need to know what content leaves the process, or want to continue an upstream trace. | | [Model calls and exported metrics](/gateway/opentelemetry/model-calls-and-metrics) | You are building dashboards or alerts and need exact metric names and attributes. | | [Exported spans and diagnostic events](/gateway/opentelemetry/spans-and-events) | You are reading traces or subscribing a plugin to diagnostic events. | ## Where each section moved Every section heading from the previous single-page version keeps its anchor here, so an existing link such as `/gateway/opentelemetry#gateway-rpc` still resolves. Each entry points at the page that now holds the content. - [Quick start](/gateway/opentelemetry/setup#quick-start) - [Signals exported](/gateway/opentelemetry/configuration#signals-exported) - [Which processes export](/gateway/opentelemetry/setup#which-processes-export) - [Exporter health](/gateway/opentelemetry/setup#exporter-health) - [Configuration reference](/gateway/opentelemetry/configuration#configuration-reference) - [Environment variables](/gateway/opentelemetry/configuration#environment-variables) - [Continue an upstream WebSocket trace](/gateway/opentelemetry/privacy-and-trace-context#continue-an-upstream-websocket-trace) - [Privacy and content capture](/gateway/opentelemetry/privacy-and-trace-context#privacy-and-content-capture) - [Sampling and flushing](/gateway/opentelemetry/configuration#sampling-and-flushing) - [Model-call observation units](/gateway/opentelemetry/model-calls-and-metrics#model-call-observation-units) - [Claude Code CLI model-call fidelity](/gateway/opentelemetry/model-calls-and-metrics#claude-code-cli-model-call-fidelity) - [Exported metrics](/gateway/opentelemetry/model-calls-and-metrics#exported-metrics) - [Gateway RPC](/gateway/opentelemetry/model-calls-and-metrics#gateway-rpc) - [Model usage](/gateway/opentelemetry/model-calls-and-metrics#model-usage) - [Message flow](/gateway/opentelemetry/model-calls-and-metrics#message-flow) - [Talk](/gateway/opentelemetry/model-calls-and-metrics#talk) - [Queues and sessions](/gateway/opentelemetry/model-calls-and-metrics#queues-and-sessions) - [Session liveness telemetry](/gateway/opentelemetry/model-calls-and-metrics#session-liveness-telemetry) - [Gateway event-loop observation windows](/gateway/opentelemetry/model-calls-and-metrics#gateway-event-loop-observation-windows) - [Harness lifecycle](/gateway/opentelemetry/model-calls-and-metrics#harness-lifecycle) - [Tool execution and loop detection](/gateway/opentelemetry/model-calls-and-metrics#tool-execution-and-loop-detection) - [Exec](/gateway/opentelemetry/model-calls-and-metrics#exec) - [Diagnostics internals (memory, payloads, exporter health)](/gateway/opentelemetry/model-calls-and-metrics#diagnostics-internals-memory-payloads-exporter-health) - [Exported spans](/gateway/opentelemetry/spans-and-events#exported-spans) - [Diagnostic event catalog](/gateway/opentelemetry/spans-and-events#diagnostic-event-catalog) - [Without an exporter](/gateway/opentelemetry/setup#without-an-exporter) - [Disable](/gateway/opentelemetry/setup#disable) ## Related - [Logging](/logging) - file logs, console output, CLI tailing, and the Control UI Logs tab - [Gateway logging internals](/gateway/logging) - WS log styles, subsystem prefixes, and console capture - [Diagnostics flags](/diagnostics/flags) - targeted debug-log flags - [Diagnostics export](/gateway/diagnostics) - operator support-bundle tool (separate from OTEL export) - [Configuration reference](/gateway/config-observability#diagnostics) - full `diagnostics.*` field reference - [Prometheus metrics](/gateway/prometheus) - expose diagnostics as Prometheus text metrics through the diagnostics-prometheus plugin - [Audit history](/gateway/audit) - the audit ledger alongside these traces