Overview
OpenClaw is a self-hosted AI messaging gateway that bridges chat platforms (WhatsApp, Telegram, Discord, Slack, iMessage, etc.) to AI agents. There are two ways to get OpenClaw traces into TraceCtrl. Pick one:Recommended: TraceCtrl plugin
Thetracectrl CLI installs and configures the plugin into your local OpenClaw install.
1
Install the plugin
~/.openclaw/extensions/tracectrl, runs npm install and npm run build, then enables it in ~/.openclaw/openclaw.json. Pass --path /custom/openclaw if your OpenClaw root is elsewhere, and --endpoint http://host:4318 to override the collector URL.2
Restart the gateway
3
Verify
openclaw.json.openclaw.json block looks like this:
Plugin config options
What the plugin captures
The plugin also flags dangerous tools (bash/shell/exec), dangerous commands (
rm -rf, sudo, reverse shells, piped curl), sensitive file access (.env, private keys, /etc/passwd), and prompt-injection patterns. Findings are recorded under tracectrl.security.* span attributes and counted by the tracectrl.security.events metric.
Alternative: built-in diagnostics-otel
If you can’t install the TraceCtrl plugin, OpenClaw ships its own OTLP exporter. Spans are shallower but the wiring is the same.
1
Enable the diagnostics-otel plugin
2
Configure OTEL export
Add to
~/.openclaw/openclaw.json:OpenClaw exports via OTLP/HTTP (port 4318), not gRPC (4317).
3
Restart and verify
What diagnostics-otel captures
Recommended settings
Protocol notes
- OpenClaw’s built-in exporter supports OTLP/HTTP (protobuf) only — gRPC is not supported.
- The TraceCtrl plugin supports both
httpandgrpcvia itsprotocolconfig option. - The endpoint should be the HTTP port (
:4318), not gRPC (:4317), unless you’ve explicitly enabled gRPC ingest. - TraceCtrl’s engine currently consumes traces only. Metrics and logs sent to the collector are accepted but not surfaced in the dashboard.

