Judgment Labs Logo
Agent Frameworks

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-otel

Set Judgment Credentials

export JUDGMENT_API_KEY="<JUDGMENT_API_KEY>"
export JUDGMENT_ORG_ID="<JUDGMENT_ORG_ID>"
export JUDGMENT_PROJECT_ID="<JUDGMENT_PROJECT_ID>"

To find JUDGMENT_PROJECT_ID, open the project in the Judgment app and copy the project ID from the URL, or press Ctrl-K and search for the project ID shortcut.

Configure the Gateway

Point the diagnostics-otel plugin at Judgment's OTLP endpoint in your OpenClaw config:

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

Judgment ingests traces from the OTLP endpoint. Set metrics and logs to false unless you are also routing them to a separate collector.

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:

openclaw.config.json5
{
  diagnostics: {
    otel: {
      captureContent: {
        inputMessages: true,
        outputMessages: true,
        toolInputs: true,
        toolOutputs: true,
      },
    },
  },
}

Enabling content capture sends prompt and response text to the OTLP endpoint. Only enable this when your data retention policy permits it.

What's Captured

SignalDetails
Model callsSpans for every provider call with model name, token usage, cost, and duration.
Tool executionSpans for tool invocations with tool name and source.
Harness lifecycleSpans for agent run orchestration, context assembly, and skill usage.
FailoverSpans 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-otel plugin.