OpenClaw operations guide

Set up OpenTelemetry metrics for OpenClaw

Short answer. Connect the OpenClaw Gateway to an OTLP/HTTP collector and confirm that a test turn produces a model token metric. Use an existing private collector that accepts OTLP over HTTP with protobuf. Note its base URL as seen by the Gateway.

Last updated · Published

By CWYN · Reviewed November 19, 2026 against OpenClaw 2026.11.6

1. Choose a collector reachable from the Gateway

Use an existing private collector that accepts OTLP over HTTP with protobuf. Note its base URL as seen by the Gateway. The export configuration reference explains how OpenClaw appends the metrics path to that URL.

2. Install the diagnostics exporter

Run the install command on the Gateway host. If you maintain a plugin allowlist, add diagnostics-otel to the existing list. Keep the other plugin entries. The exporter setup reference shows the required plugin settings.

openclaw plugins install @openclaw/diagnostics-otel

3. Enable metrics for the test

Use openclaw config file to locate the active config. Merge in these settings and replace the example collector address. This test enables metrics and leaves trace and log export off. Run openclaw config validate after saving.

{
  plugins: { entries: { "diagnostics-otel": { enabled: true } } },
  diagnostics: {
    enabled: true,
    otel: {
      enabled: true,
      endpoint: "http://otel-collector:4318",
      protocol: "http/protobuf",
      serviceName: "openclaw-gateway",
      metrics: true,
      traces: false,
      logs: false,
    },
  },
}

4. Run one Gateway-backed model turn

With the Gateway running, replace <agent-id> with your test agent’s ID and run the agent command. Use an agent and model that report token usage.

openclaw agent --agent <agent-id> --message "Reply with metrics test"

5. Verify the metric at the receiver

Allow the exporter to flush, then look in your collector or its backend for the openclaw.tokens counter under the configured service. Check the provider and model attributes against the test agent. If nothing arrives, run openclaw status --all to inspect the Gateway’s redacted exporter health and confirm the collector accepts OTLP/HTTP.

Get your free CWYN Score

Next steps

Review the model behind the test turn

Once the test metric arrives, use the cost checklist in the OpenClaw Complete Setup Pack ($14.95), an optional paid kit, to review the model and scheduled jobs.
Kit details as of Nov 18, 2026