Overview
OpenClaw is a self-hosted AI messaging gateway that bridges chat platforms (WhatsApp, Telegram, Discord, Slack, iMessage, etc.) to AI agents. OpenClaw natively exports OpenTelemetry traces — no TraceCtrl SDK needed. You just point its OTEL export at your TraceCtrl collector and spans flow automatically.What Gets Traced
| Span | Type | What It Captures |
|---|---|---|
openclaw.model.usage | LLM | Model, provider, token counts (input/output/cache), session ID |
openclaw.message.processed | Agent | Channel, outcome, chat ID, message ID, session ID |
openclaw.webhook.processed | Tool | Channel, webhook handler, chat ID |
openclaw.webhook.error | Tool (Error) | Channel, webhook, error details |
openclaw.session.stuck | Alert | Session state, age, queue depth |
Setup
Configure OTEL export
Add to
~/.openclaw/openclaw.json:OpenClaw exports via OTLP/HTTP (port 4318), not gRPC (4317). TraceCtrl’s OTel Collector accepts both protocols.
Recommended Settings
| Setting | Dev | Production | Why |
|---|---|---|---|
sampleRate | 1.0 | 0.2 | Full tracing during setup, sample at scale |
flushIntervalMs | 5000 | 60000 | 5s for near-real-time debugging, 60s to reduce overhead |
traces | true | true | Required for all TraceCtrl views |
metrics | false | false | Not processed by TraceCtrl yet (silently dropped) |
logs | false | false | High volume, not processed yet |
What You’ll See
Topology
Each chat channel becomes an agent node connected to the LLM models it uses:Sessions
Eachopenclaw.message.processed span appears as a session row showing channel, outcome, duration, and nested LLM calls.
Risk
openclaw.session.stuckspans trigger risk alertsopenclaw.webhook.errorspans tracked as error rates- Webhook error patterns surface in attack path analysis
Protocol Notes
- OpenClaw supports OTLP/HTTP (protobuf) only — gRPC is not supported
- The endpoint should be the HTTP port (
:4318), not gRPC (:4317) - Metrics and logs are also exported if enabled, but TraceCtrl only processes traces currently — other signals are silently dropped with no errors

