OpenClaw
OpenClaw is an open-source, self-hosted AI assistant: a gateway that connects chat apps to AI agents. Its diagnostics-otel plugin exports the agent's traces, metrics, and logs over OpenTelemetry (OTLP/HTTP). Casdoor can receive that data, store each payload as an Entry, and show OpenClaw sessions as a graph, so you can see what your agents did next to who they act for.
How it works
OpenClaw sends OTLP payloads to Casdoor's ingest endpoints:
| Signal | Endpoint |
|---|---|
| Traces | POST /api/v1/traces |
| Metrics | POST /api/v1/metrics |
| Logs | POST /api/v1/logs |
All three expect Content-Type: application/x-protobuf. Casdoor stores each payload as an Entry and tags it with the sender's IP and User-Agent.
Setting up in Casdoor
1. Create a Log provider
- Go to Providers → Add.
- Set Category to
Logand Type toAgent (OpenClaw). - In the Host field, enter the IP address of the machine running OpenClaw. Leave it empty to accept data from any IP.
- (Optional) Agent ID and Path tell Casdoor where to find the agent's session transcripts; see Raw session transcripts.
- (Optional) In the Storage provider field, pick which Storage provider should hold the raw session transcripts. Leave it empty to let Casdoor choose automatically.
- Save. Casdoor is now ready to receive data.
The Host field is an IP allowlist for this provider. Requests from any other address are rejected with 403 Forbidden, which prevents unauthorized agents from writing entries into your organization.
2. Configure OpenClaw
Install and enable OpenClaw's diagnostics-otel plugin, then point its OTLP exporter at Casdoor. OpenClaw appends /v1/traces, /v1/metrics, and /v1/logs to the endpoint, so the endpoint is Casdoor's URL followed by /api:
openclaw plugins install clawhub:@openclaw/diagnostics-otel
{
plugins: {
allow: ["diagnostics-otel"],
entries: {
"diagnostics-otel": { enabled: true },
},
},
diagnostics: {
enabled: true,
otel: {
enabled: true,
endpoint: "https://your-casdoor.com/api",
protocol: "http/protobuf",
traces: true,
metrics: true,
logs: true,
},
},
}
See OpenTelemetry export in the OpenClaw documentation for sampling, flush intervals, and what content is captured.
Viewing collected data
Once data is flowing, navigate to Entries in the Casdoor sidebar. Each incoming OTLP payload produces one Entry.
- Trace entries render as a span tree in the built-in EntryMessageViewer, showing timing, attributes, and status for each span.
- Metrics and log entries store the raw OTLP JSON in the
Messagefield, which you can inspect directly or export for use in other tools.
Entries are scoped to an organization, so data from different teams or environments can be separated by placing them under different organizations with their own Log providers.
Raw session transcripts
Beyond the parsed trace view, Casdoor can keep the raw JSONL transcript of each OpenClaw session—the exact line-delimited log the agent produced. This is useful when you need the unmodified record for debugging, auditing, or replay.