TaskFlow
DashboardFreewriteWhiteboardsProjectsCRMTasksNotificationsSettingsAgent TowerAPI Docs
OpenClaw Docs
?

User

Member

Caricamento in corso...

Home
Progetti
Task
Notifiche
CRM

    OpenClaw

    Documentation Mirror

    Documentation Overview

    Docs

    Auth credential semantics
    Scheduled tasks
    Hooks
    Automation & tasks
    Standing orders
    Task flow
    Background tasks
    BlueBubbles
    Broadcast groups
    Channel routing
    Discord
    Feishu
    Google Chat
    Group messages
    Groups
    iMessage
    Chat channels
    IRC
    LINE
    Channel location parsing
    Matrix
    Matrix migration
    Matrix push rules for quiet previews
    Mattermost
    Microsoft Teams
    Nextcloud Talk
    Nostr
    Pairing
    QA channel
    QQ bot
    Signal
    Slack
    Synology Chat
    Telegram
    Tlon
    Channel troubleshooting
    Twitch
    WeChat
    WhatsApp
    Yuanbao
    Zalo
    Zalo personal
    CI pipeline
    ACP
    Agent
    Agents
    Approvals
    Backup
    Browser
    Channels
    Clawbot
    `openclaw commitments`
    Completion
    Config
    Configure
    Cron
    Daemon
    Dashboard
    Devices
    Directory
    DNS
    Docs
    Doctor
    Flows (redirect)
    Gateway
    Health
    Hooks
    CLI reference
    Inference CLI
    Logs
    MCP
    Memory
    Message
    Migrate
    Models
    Node
    Nodes
    Onboard
    Pairing
    Plugins
    Proxy
    QR
    Reset
    Sandbox CLI
    Secrets
    Security
    Sessions
    Setup
    Skills
    Status
    System
    `openclaw tasks`
    TUI
    Uninstall
    Update
    Voicecall
    Webhooks
    Wiki
    Active memory
    Agent runtime
    Agent loop
    Agent runtimes
    Agent workspace
    Gateway architecture
    Channel docking
    Inferred commitments
    Compaction
    Context
    Context engine
    Delegate architecture
    Dreaming
    Experimental features
    Features
    Markdown formatting
    Memory overview
    Builtin memory engine
    Honcho memory
    QMD memory engine
    Memory search
    Messages
    Model failover
    Model providers
    Models CLI
    Multi-agent routing
    OAuth
    OpenClaw App SDK
    Presence
    QA overview
    Matrix QA
    Command queue
    Steering queue
    Retry policy
    Session management
    Session pruning
    Session tools
    SOUL.md personality guide
    Streaming and chunking
    System prompt
    Timezones
    TypeBox
    Typing indicators
    Usage tracking
    Date and time
    Node + tsx crash
    Diagnostics flags
    Authentication
    Background exec and process tool
    Bonjour discovery
    Bridge protocol
    CLI backends
    Configuration — agents
    Configuration — channels
    Configuration — tools and custom providers
    Configuration
    Configuration examples
    Configuration reference
    Diagnostics export
    Discovery and transports
    Doctor
    Gateway lock
    Health checks
    Heartbeat
    Gateway runbook
    Local models
    Gateway logging
    Multiple gateways
    Network model
    OpenAI chat completions
    OpenResponses API
    OpenShell
    OpenTelemetry export
    Gateway-owned pairing
    Prometheus metrics
    Gateway protocol
    Remote access
    Remote gateway setup
    Sandbox vs tool policy vs elevated
    Sandboxing
    Secrets management
    Secrets apply plan contract
    Security audit checks
    Security
    Tailscale
    Tools invoke API
    Troubleshooting
    Trusted proxy auth
    Debugging
    Environment variables
    FAQ
    FAQ: first-run setup
    FAQ: models and auth
    GPT-5.5 / Codex agentic parity
    GPT-5.5 / Codex parity maintainer notes
    Help
    Scripts
    Testing
    Testing: live suites
    General troubleshooting
    OpenClaw
    Ansible
    Azure
    Bun (experimental)
    ClawDock
    Release channels
    DigitalOcean
    Docker
    Docker VM runtime
    exe.dev
    Fly.io
    GCP
    Hetzner
    Hostinger
    Install
    Installer internals
    Kubernetes
    macOS VMs
    Migration guide
    Migrating from Claude
    Migrating from Hermes
    Nix
    Node.js
    Northflank
    Oracle Cloud
    Podman
    Railway
    Raspberry Pi
    Render
    Uninstall
    Updating
    Logging
    Network
    Audio and voice notes
    Camera capture
    Image and media support
    Nodes
    Location command
    Media understanding
    Talk mode
    Node troubleshooting
    Voice wake
    Pi integration architecture
    Pi development workflow
    Android app
    Platforms
    iOS app
    Linux app
    Gateway on macOS
    Canvas
    Gateway lifecycle
    macOS dev setup
    Health checks (macOS)
    Menu bar icon
    macOS logging
    Menu bar
    Peekaboo bridge
    macOS permissions
    Remote control
    macOS signing
    Skills (macOS)
    Voice overlay
    Voice wake (macOS)
    WebChat (macOS)
    macOS IPC
    macOS app
    Windows
    Plugin internals
    Plugin architecture internals
    Building plugins
    Plugin bundles
    Codex Computer Use
    Codex harness
    Community plugins
    Plugin compatibility
    Google Meet plugin
    Plugin hooks
    Plugin manifest
    Memory LanceDB
    Memory wiki
    Message presentation
    Agent harness plugins
    Building channel plugins
    Channel turn kernel
    Plugin entry points
    Plugin SDK migration
    Plugin SDK overview
    Building provider plugins
    Plugin runtime helpers
    Plugin setup and config
    Plugin SDK subpaths
    Plugin testing
    Skill workshop plugin
    Voice call plugin
    Webhooks plugin
    Zalo personal plugin
    OpenProse
    Alibaba Model Studio
    Anthropic
    Arcee AI
    Azure Speech
    Amazon Bedrock
    Amazon Bedrock Mantle
    Chutes
    Claude Max API proxy
    Cloudflare AI gateway
    ComfyUI
    Deepgram
    Deepinfra
    DeepSeek
    ElevenLabs
    Fal
    Fireworks
    GitHub Copilot
    GLM (Zhipu)
    Google (Gemini)
    Gradium
    Groq
    Hugging Face (inference)
    Provider directory
    Inferrs
    Inworld
    Kilocode
    LiteLLM
    LM Studio
    MiniMax
    Mistral
    Model provider quickstart
    Moonshot AI
    NVIDIA
    Ollama
    OpenAI
    OpenCode
    OpenCode Go
    OpenRouter
    Perplexity
    Qianfan
    Qwen
    Runway
    SGLang
    StepFun
    Synthetic
    Tencent Cloud (TokenHub)
    Together AI
    Venice AI
    Vercel AI gateway
    vLLM
    Volcengine (Doubao)
    Vydra
    xAI
    Xiaomi MiMo
    Z.AI
    Default AGENTS.md
    Release policy
    API usage and costs
    Credits
    Device model database
    Full release validation
    Memory configuration reference
    OpenClaw App SDK API design
    Prompt caching
    Rich output protocol
    RPC adapters
    SecretRef credential surface
    Session management deep dive
    AGENTS.md template
    BOOT.md template
    BOOTSTRAP.md template
    HEARTBEAT.md template
    IDENTITY template
    SOUL.md template
    TOOLS.md template
    USER template
    Tests
    Token use and costs
    Transcript hygiene
    Onboarding reference
    Contributing to the threat model
    Threat model (MITRE ATLAS)
    Formal verification (security models)
    Network proxy
    Agent bootstrapping
    Docs directory
    Getting started
    Docs hubs
    OpenClaw lore
    Onboarding (macOS app)
    Onboarding overview
    Personal assistant setup
    Setup
    Showcase
    Onboarding (CLI)
    CLI automation
    CLI setup reference
    ACP agents
    ACP agents — setup
    Agent send
    apply_patch tool
    Brave search
    Browser (OpenClaw-managed)
    Browser control API
    Browser troubleshooting
    Browser login
    WSL2 + Windows + remote Chrome CDP troubleshooting
    BTW side questions
    ClawHub
    Code execution
    Creating skills
    Diffs
    DuckDuckGo search
    Elevated mode
    Exa search
    Exec tool
    Exec approvals
    Exec approvals — advanced
    Firecrawl
    Gemini search
    Grok search
    Image generation
    Tools and plugins
    Kimi search
    LLM task
    Lobster
    Tool-loop detection
    Media overview
    MiniMax search
    Multi-agent sandbox and tools
    Music generation
    Ollama web search
    PDF tool
    Perplexity search
    Plugins
    Reactions
    SearXNG search
    Skills
    Skills config
    Slash commands
    Sub-agents
    Tavily
    Thinking levels
    Tokenjuice
    Trajectory bundles
    Text-to-speech
    Video generation
    Web search
    Web fetch
    Linux server
    Control UI
    Dashboard
    Web
    TUI
    WebChat

    OpenAPI Specs

    openapi
    TaskFlow
    docs/openclaw
    Original Docs

    Real-time Synchronized Documentation

    Last sync: 01/05/2026 07:04:25

    Note: This content is mirrored from docs.openclaw.ai and is subject to their terms and conditions.

    OpenClaw Docs

    v2.4.0 Production

    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.

    OpenTelemetry export

    OpenClaw exports diagnostics through the bundled

    text
    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.

    How it fits together

    • Diagnostics events are structured, in-process records emitted by the Gateway and bundled plugins for model runs, message flow, sessions, queues, and exec.
    • text
      diagnostics-otel
      plugin
      subscribes to those events and exports them as OpenTelemetry metrics, traces, and logs over OTLP/HTTP.
    • Provider calls receive a W3C
      text
      traceparent
      header from OpenClaw's trusted model-call span context when the provider transport accepts custom headers. Plugin-emitted trace context is not propagated.
    • Exporters only attach when both the diagnostics surface and the plugin are enabled, so the in-process cost stays near zero by default.

    Quick start

    json5
    { 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:

    bash
    openclaw plugins enable diagnostics-otel

    note

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

    Signals exported

    SignalWhat goes in it
    MetricsCounters and histograms for token usage, cost, run duration, message flow, queue lanes, session state, exec, and memory pressure.
    TracesSpans for model usage, model calls, harness lifecycle, tool execution, exec, webhook/message processing, context assembly, and tool loops.
    LogsStructured
    text
    logging.file
    records exported over OTLP when
    text
    diagnostics.otel.logs
    is enabled.

    Toggle

    text
    traces
    ,
    text
    metrics
    , and
    text
    logs
    independently. All three default to on when
    text
    diagnostics.otel.enabled
    is true.

    Configuration reference

    json5
    { 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, }, }, }, }

    Environment variables

    VariablePurpose
    text
    OTEL_EXPORTER_OTLP_ENDPOINT
    Override
    text
    diagnostics.otel.endpoint
    . If the value already contains
    text
    /v1/traces
    ,
    text
    /v1/metrics
    , or
    text
    /v1/logs
    , it is used as-is.
    text
    OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
    /
    text
    OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
    /
    text
    OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
    Signal-specific endpoint overrides used when the matching
    text
    diagnostics.otel.*Endpoint
    config key is unset. Signal-specific config wins over signal-specific env, which wins over the shared endpoint.
    text
    OTEL_SERVICE_NAME
    Override
    text
    diagnostics.otel.serviceName
    .
    text
    OTEL_EXPORTER_OTLP_PROTOCOL
    Override the wire protocol (only
    text
    http/protobuf
    is honored today).
    text
    OTEL_SEMCONV_STABILITY_OPT_IN
    Set to
    text
    gen_ai_latest_experimental
    to emit the latest experimental GenAI span attribute (
    text
    gen_ai.provider.name
    ) instead of the legacy
    text
    gen_ai.system
    . GenAI metrics always use bounded, low-cardinality semantic attributes regardless.
    text
    OPENCLAW_OTEL_PRELOADED
    Set to
    text
    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
    text
    traces
    /
    text
    metrics
    /
    text
    logs
    .

    Privacy and content capture

    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

    text
    traceparent
    header. That header is generated only from OpenClaw-owned diagnostic trace context for the active model call. Existing caller-supplied
    text
    traceparent
    headers are replaced, so plugins or custom provider options cannot spoof cross-service trace ancestry.

    Set

    text
    diagnostics.otel.captureContent.*
    to
    text
    true
    only when your collector and retention policy are approved for prompt, response, tool, or system-prompt text. Each subkey is opt-in independently:

    • text
      inputMessages
      — user prompt content.
    • text
      outputMessages
      — model response content.
    • text
      toolInputs
      — tool argument payloads.
    • text
      toolOutputs
      — tool result payloads.
    • text
      systemPrompt
      — assembled system/developer prompt.

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

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

    Sampling and flushing

    • Traces:
      text
      diagnostics.otel.sampleRate
      (root-span only,
      text
      0.0
      drops all,
      text
      1.0
      keeps all).
    • Metrics:
      text
      diagnostics.otel.flushIntervalMs
      (minimum
      text
      1000
      ).
    • Logs: OTLP logs respect
      text
      logging.level
      (file log level). They use the diagnostic log-record redaction path, not console formatting. High-volume installs should prefer OTLP collector sampling/filtering over local sampling.
    • File-log correlation: JSONL file logs include top-level
      text
      traceId
      ,
      text
      spanId
      ,
      text
      parentSpanId
      , and
      text
      traceFlags
      when the log call carries a valid diagnostic trace context, which lets log processors join local log lines with exported spans.
    • Request correlation: Gateway HTTP requests and WebSocket frames create an 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
      text
      traceparent
      headers stay on the same trace.

    Exported metrics

    Model usage

    • text
      openclaw.tokens
      (counter, attrs:
      text
      openclaw.token
      ,
      text
      openclaw.channel
      ,
      text
      openclaw.provider
      ,
      text
      openclaw.model
      ,
      text
      openclaw.agent
      )
    • text
      openclaw.cost.usd
      (counter, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.provider
      ,
      text
      openclaw.model
      )
    • text
      openclaw.run.duration_ms
      (histogram, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.provider
      ,
      text
      openclaw.model
      )
    • text
      openclaw.context.tokens
      (histogram, attrs:
      text
      openclaw.context
      ,
      text
      openclaw.channel
      ,
      text
      openclaw.provider
      ,
      text
      openclaw.model
      )
    • text
      gen_ai.client.token.usage
      (histogram, GenAI semantic-conventions metric, attrs:
      text
      gen_ai.token.type
      =
      text
      input
      /
      text
      output
      ,
      text
      gen_ai.provider.name
      ,
      text
      gen_ai.operation.name
      ,
      text
      gen_ai.request.model
      )
    • text
      gen_ai.client.operation.duration
      (histogram, seconds, GenAI semantic-conventions metric, attrs:
      text
      gen_ai.provider.name
      ,
      text
      gen_ai.operation.name
      ,
      text
      gen_ai.request.model
      , optional
      text
      error.type
      )
    • text
      openclaw.model_call.duration_ms
      (histogram, attrs:
      text
      openclaw.provider
      ,
      text
      openclaw.model
      ,
      text
      openclaw.api
      ,
      text
      openclaw.transport
      , plus
      text
      openclaw.errorCategory
      and
      text
      openclaw.failureKind
      on classified errors)
    • text
      openclaw.model_call.request_bytes
      (histogram, UTF-8 byte size of the final model request payload; no raw payload content)
    • text
      openclaw.model_call.response_bytes
      (histogram, UTF-8 byte size of streamed model response events; no raw response content)
    • text
      openclaw.model_call.time_to_first_byte_ms
      (histogram, elapsed time before the first streamed response event)

    Message flow

    • text
      openclaw.webhook.received
      (counter, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.webhook
      )
    • text
      openclaw.webhook.error
      (counter, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.webhook
      )
    • text
      openclaw.webhook.duration_ms
      (histogram, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.webhook
      )
    • text
      openclaw.message.queued
      (counter, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.source
      )
    • text
      openclaw.message.processed
      (counter, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.outcome
      )
    • text
      openclaw.message.duration_ms
      (histogram, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.outcome
      )
    • text
      openclaw.message.delivery.started
      (counter, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.delivery.kind
      )
    • text
      openclaw.message.delivery.duration_ms
      (histogram, attrs:
      text
      openclaw.channel
      ,
      text
      openclaw.delivery.kind
      ,
      text
      openclaw.outcome
      ,
      text
      openclaw.errorCategory
      )

    Queues and sessions

    • text
      openclaw.queue.lane.enqueue
      (counter, attrs:
      text
      openclaw.lane
      )
    • text
      openclaw.queue.lane.dequeue
      (counter, attrs:
      text
      openclaw.lane
      )
    • text
      openclaw.queue.depth
      (histogram, attrs:
      text
      openclaw.lane
      or
      text
      openclaw.channel=heartbeat
      )
    • text
      openclaw.queue.wait_ms
      (histogram, attrs:
      text
      openclaw.lane
      )
    • text
      openclaw.session.state
      (counter, attrs:
      text
      openclaw.state
      ,
      text
      openclaw.reason
      )
    • text
      openclaw.session.stuck
      (counter, attrs:
      text
      openclaw.state
      )
    • text
      openclaw.session.stuck_age_ms
      (histogram, attrs:
      text
      openclaw.state
      )
    • text
      openclaw.run.attempt
      (counter, attrs:
      text
      openclaw.attempt
      )

    Harness lifecycle

    • text
      openclaw.harness.duration_ms
      (histogram, attrs:
      text
      openclaw.harness.id
      ,
      text
      openclaw.harness.plugin
      ,
      text
      openclaw.outcome
      ,
      text
      openclaw.harness.phase
      on errors)

    Exec

    • text
      openclaw.exec.duration_ms
      (histogram, attrs:
      text
      openclaw.exec.target
      ,
      text
      openclaw.exec.mode
      ,
      text
      openclaw.outcome
      ,
      text
      openclaw.failureKind
      )

    Diagnostics internals (memory and tool loop)

    • text
      openclaw.memory.heap_used_bytes
      (histogram, attrs:
      text
      openclaw.memory.kind
      )
    • text
      openclaw.memory.rss_bytes
      (histogram)
    • text
      openclaw.memory.pressure
      (counter, attrs:
      text
      openclaw.memory.level
      )
    • text
      openclaw.tool.loop.iterations
      (counter, attrs:
      text
      openclaw.toolName
      ,
      text
      openclaw.outcome
      )
    • text
      openclaw.tool.loop.duration_ms
      (histogram, attrs:
      text
      openclaw.toolName
      ,
      text
      openclaw.outcome
      )

    Exported spans

    • text
      openclaw.model.usage
      • text
        openclaw.channel
        ,
        text
        openclaw.provider
        ,
        text
        openclaw.model
      • text
        openclaw.tokens.*
        (input/output/cache_read/cache_write/total)
      • text
        gen_ai.system
        by default, or
        text
        gen_ai.provider.name
        when the latest GenAI semantic conventions are opted in
      • text
        gen_ai.request.model
        ,
        text
        gen_ai.operation.name
        ,
        text
        gen_ai.usage.*
    • text
      openclaw.run
      • text
        openclaw.outcome
        ,
        text
        openclaw.channel
        ,
        text
        openclaw.provider
        ,
        text
        openclaw.model
        ,
        text
        openclaw.errorCategory
    • text
      openclaw.model.call
      • text
        gen_ai.system
        by default, or
        text
        gen_ai.provider.name
        when the latest GenAI semantic conventions are opted in
      • text
        gen_ai.request.model
        ,
        text
        gen_ai.operation.name
        ,
        text
        openclaw.provider
        ,
        text
        openclaw.model
        ,
        text
        openclaw.api
        ,
        text
        openclaw.transport
      • text
        openclaw.errorCategory
        and optional
        text
        openclaw.failureKind
        on errors
      • text
        openclaw.model_call.request_bytes
        ,
        text
        openclaw.model_call.response_bytes
        ,
        text
        openclaw.model_call.time_to_first_byte_ms
      • text
        openclaw.provider.request_id_hash
        (bounded SHA-based hash of the upstream provider request id; raw ids are not exported)
    • text
      openclaw.harness.run
      • text
        openclaw.harness.id
        ,
        text
        openclaw.harness.plugin
        ,
        text
        openclaw.outcome
        ,
        text
        openclaw.provider
        ,
        text
        openclaw.model
        ,
        text
        openclaw.channel
      • On completion:
        text
        openclaw.harness.result_classification
        ,
        text
        openclaw.harness.yield_detected
        ,
        text
        openclaw.harness.items.started
        ,
        text
        openclaw.harness.items.completed
        ,
        text
        openclaw.harness.items.active
      • On error:
        text
        openclaw.harness.phase
        ,
        text
        openclaw.errorCategory
        , optional
        text
        openclaw.harness.cleanup_failed
    • text
      openclaw.tool.execution
      • text
        gen_ai.tool.name
        ,
        text
        openclaw.toolName
        ,
        text
        openclaw.errorCategory
        ,
        text
        openclaw.tool.params.*
    • text
      openclaw.exec
      • text
        openclaw.exec.target
        ,
        text
        openclaw.exec.mode
        ,
        text
        openclaw.outcome
        ,
        text
        openclaw.failureKind
        ,
        text
        openclaw.exec.command_length
        ,
        text
        openclaw.exec.exit_code
        ,
        text
        openclaw.exec.timed_out
    • text
      openclaw.webhook.processed
      • text
        openclaw.channel
        ,
        text
        openclaw.webhook
        ,
        text
        openclaw.chatId
    • text
      openclaw.webhook.error
      • text
        openclaw.channel
        ,
        text
        openclaw.webhook
        ,
        text
        openclaw.chatId
        ,
        text
        openclaw.error
    • text
      openclaw.message.processed
      • text
        openclaw.channel
        ,
        text
        openclaw.outcome
        ,
        text
        openclaw.chatId
        ,
        text
        openclaw.messageId
        ,
        text
        openclaw.reason
    • text
      openclaw.message.delivery
      • text
        openclaw.channel
        ,
        text
        openclaw.delivery.kind
        ,
        text
        openclaw.outcome
        ,
        text
        openclaw.errorCategory
        ,
        text
        openclaw.delivery.result_count
    • text
      openclaw.session.stuck
      • text
        openclaw.state
        ,
        text
        openclaw.ageMs
        ,
        text
        openclaw.queueDepth
    • text
      openclaw.context.assembled
      • text
        openclaw.prompt.size
        ,
        text
        openclaw.history.size
        ,
        text
        openclaw.context.tokens
        ,
        text
        openclaw.errorCategory
        (no prompt, history, response, or session-key content)
    • text
      openclaw.tool.loop
      • text
        openclaw.toolName
        ,
        text
        openclaw.outcome
        ,
        text
        openclaw.iterations
        ,
        text
        openclaw.errorCategory
        (no loop messages, params, or tool output)
    • text
      openclaw.memory.pressure
      • text
        openclaw.memory.level
        ,
        text
        openclaw.memory.heap_used_bytes
        ,
        text
        openclaw.memory.rss_bytes

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

    text
    openclaw.content.*
    attributes for the specific content classes you opted into.

    Diagnostic event catalog

    The events below back the metrics and spans above. Plugins can also subscribe to them directly without OTLP export.

    Model usage

    • text
      model.usage
      — tokens, cost, duration, context, provider/model/channel, session ids.
      text
      usage
      is provider/turn accounting for cost and telemetry;
      text
      context.used
      is the current prompt/context snapshot and can be lower than provider
      text
      usage.total
      when cached input or tool-loop calls are involved.

    Message flow

    • text
      webhook.received
      /
      text
      webhook.processed
      /
      text
      webhook.error
    • text
      message.queued
      /
      text
      message.processed
    • text
      message.delivery.started
      /
      text
      message.delivery.completed
      /
      text
      message.delivery.error

    Queue and session

    • text
      queue.lane.enqueue
      /
      text
      queue.lane.dequeue
    • text
      session.state
      /
      text
      session.stuck
    • text
      run.attempt
    • text
      diagnostic.heartbeat
      (aggregate counters: webhooks/queue/session)

    Harness lifecycle

    • text
      harness.run.started
      /
      text
      harness.run.completed
      /
      text
      harness.run.error
      — per-run lifecycle for the agent harness. Includes
      text
      harnessId
      , optional
      text
      pluginId
      , provider/model/channel, and run id. Completion adds
      text
      durationMs
      ,
      text
      outcome
      , optional
      text
      resultClassification
      ,
      text
      yieldDetected
      , and
      text
      itemLifecycle
      counts. Errors add
      text
      phase
      (
      text
      prepare
      /
      text
      start
      /
      text
      send
      /
      text
      resolve
      /
      text
      cleanup
      ),
      text
      errorCategory
      , and optional
      text
      cleanupFailed
      .

    Exec

    • text
      exec.process.completed
      — terminal outcome, duration, target, mode, exit code, and failure kind. Command text and working directories are not included.

    Without an exporter

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

    text
    diagnostics-otel
    :

    json5
    { diagnostics: { enabled: true }, }

    For targeted debug output without raising

    text
    logging.level
    , use diagnostics flags. Flags are case-insensitive and support wildcards (e.g.
    text
    telegram.*
    or
    text
    *
    ):

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

    Or as a one-off env override:

    bash
    OPENCLAW_DIAGNOSTICS=telegram.http,telegram.payload openclaw gateway

    Flag output goes to the standard log file (

    text
    logging.file
    ) and is still redacted by
    text
    logging.redactSensitive
    . Full guide: Diagnostics flags.

    Disable

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

    You can also leave

    text
    diagnostics-otel
    out of
    text
    plugins.allow
    , or run
    text
    openclaw plugins disable diagnostics-otel
    .

    Related

    • 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
      text
      diagnostics.*
      field reference

    © 2024 TaskFlow Mirror

    Powered by TaskFlow Sync Engine