> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wednesdayai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Observability

> Export traces, metrics, and logs from WednesdayAI using OpenTelemetry.

WednesdayAI exports observability data via OpenTelemetry (OTel). Route this to Langfuse, Grafana Tempo, Jaeger, or any OTel-compatible backend.

## Quick start with Langfuse

**1. Create a Langfuse project**

Sign up at langfuse.com and create a project. Note the public key, secret key, and host URL.

**2. Configure the OTel exporter**

```yaml theme={"dark"}
diagnostics:
  otel:
    enabled: true
    endpoint: "https://cloud.langfuse.com/api/public/otel/v1/traces"
    headers:
      Authorization: "Basic <base64(public_key:secret_key)>"
```

**3. Verify**

```bash theme={"dark"}
openclaw restart && openclaw doctor --check otel
```

## Quick start with Grafana / Tempo

```yaml theme={"dark"}
diagnostics:
  otel:
    enabled: true
    endpoint: "http://your-grafana-agent:4318/v1/traces"
    headers: {}
```

## What is traced

| Span | Description |
| - | - |
| `openclaw.run` / `openclaw.model.call` | Agent turn and LLM calls (Langfuse nested tree) |
| `openclaw.task.*` | Gateway task-pipeline lifecycle (`started`, `completed`, `failed`, …) |
| `openclaw.task.recovery_exhausted` | Boot recovery moved a stuck run to `dlq` (error status) |
| `openclaw.dream.*` | Dream Cycle lifecycle (`cycle_started`, `pass_completed`, …) |
| `tool.call` / channel delivery | Agent tools and outbound sends |

Full attribute tables and Langfuse setup live in the core docs page
[OTel & Langfuse Diagnostics](https://docs.wednesdayai.dev/diagnostics/otel-langfuse)
(or the core repo path `docs/diagnostics/otel-langfuse.md`).

## Task recovery (operator)

On gateway boot, recoverable task runs are classified. Runs that hit the default retry budget
(`maxAttempts: 5`) or stay in `retrying` longer than **25 minutes** (`maxAttempts * maxMs`)
are moved to `dlq` and emit `task.recovery_exhausted`. This stops orphaned runs from looping
forever across restarts.

Inspect with:

```bash theme={"dark"}
wednesdayai task status --json
```

Look for `status: "dlq"` and reasons `retry exhausted` or `stalled beyond age threshold`.
Re-enqueue work only if it is still needed. Details: core docs
[Task operations](https://docs.wednesdayai.dev/gateway/tasks#shutdown-and-recovery).

## Prometheus metrics

When `diagnostics.enabled: true`, a `/metrics` endpoint is exposed in Prometheus format.

| Metric | Description |
| - | - |
| `wednesdayai_requests_total` | Total requests by channel and status |
| `wednesdayai_llm_tokens_total` | LLM tokens consumed by model |
| `wednesdayai_llm_latency_ms` | LLM request latency histogram |
| `wednesdayai_active_sessions` | Currently active sessions |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.