OpenClaw
Send OpenClaw Gateway traces to the Judgment platform via OpenTelemetry.
OpenClaw integration sends traces from your OpenClaw Gateway to Judgment. OpenClaw's diagnostics-otel plugin exports traces over OTLP/HTTP, which Judgment ingests natively — no SDK code required.
How It Works
OpenClaw emits structured diagnostics events for model runs, tool execution, message flow, and more. The diagnostics-otel plugin converts those events into OpenTelemetry spans and exports them over OTLP/HTTP (protobuf) to any compatible backend, including Judgment.
Quickstart
Install the Plugin
openclaw plugins install clawhub:@openclaw/diagnostics-otelSet Judgment Credentials
export JUDGMENT_API_KEY="<JUDGMENT_API_KEY>"
export JUDGMENT_ORG_ID="<JUDGMENT_ORG_ID>"
export JUDGMENT_PROJECT_ID="<JUDGMENT_PROJECT_ID>"Configure the Gateway
Point the diagnostics-otel plugin at Judgment's OTLP endpoint in your OpenClaw config:
{
plugins: {
allow: ["diagnostics-otel"],
entries: {
"diagnostics-otel": { enabled: true },
},
},
diagnostics: {
enabled: true,
otel: {
enabled: true,
endpoint: "https://api.judgmentlabs.ai/otel",
protocol: "http/protobuf",
serviceName: "openclaw-gateway",
headers: {
"Authorization": "Bearer <JUDGMENT_API_KEY>",
"X-Organization-Id": "<JUDGMENT_ORG_ID>",
"X-Project-Id": "<JUDGMENT_PROJECT_ID>",
},
traces: true,
metrics: false,
logs: false,
},
},
}Verify
Make a chat completion call through the gateway and open your project in the Judgment app. Traces for model calls, tool execution, and harness lifecycle will appear within a few seconds.
Environment Variable Override
Instead of hard-coding the endpoint in your config file, you can set these environment variables. OpenClaw reads them at startup:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.judgmentlabs.ai/otel"
export OTEL_SERVICE_NAME="openclaw-gateway"Config-file values take precedence over environment variables when both are set.
Content Capture
By default, OpenClaw exports only structural span metadata (model, provider,
token counts, duration) — no prompt or response text. To include content in
your Judgment traces, enable the relevant captureContent subkeys:
{
diagnostics: {
otel: {
captureContent: {
inputMessages: true,
outputMessages: true,
toolInputs: true,
toolOutputs: true,
},
},
},
}What's Captured
| Signal | Details |
|---|---|
| Model calls | Spans for every provider call with model name, token usage, cost, and duration. |
| Tool execution | Spans for tool invocations with tool name and source. |
| Harness lifecycle | Spans for agent run orchestration, context assembly, and skill usage. |
| Failover | Spans and attributes when the gateway fails over between providers. |
Next Steps
- Tracing - Learn more about Judgment's tracing capabilities and advanced configuration.
- Agent Behavior Monitoring - Monitor your AI applications in production with behavioral scoring.
- Dual Export - Send traces to Judgment alongside your existing observability provider.
- OpenClaw OpenTelemetry Docs - Full reference for OpenClaw's
diagnostics-otelplugin.