AgentSkillsCN

logfire-observability

为用户撰写通俗易懂的金融类书籍摘要,并根据主题、阅读水平及学习目标,为其推荐后续阅读书目。适用于以下场景:用户请求“推荐图书”、“总结书籍”、“制定阅读清单”,或希望将网站现有200倍的目录内容转化为图书馆馆藏或图书页面内容。

SKILL.md
--- frontmatter
name: logfire-observability
description: Full OpenClaw observability in Pydantic Logfire — agent traces, tool calls, metrics, and logs via OpenTelemetry
homepage: https://github.com/rita-aga/openclaw-logfire-observability
metadata:
  openclaw:
    emoji: "🔥"
    requires:
      env:
        - LOGFIRE_TOKEN
    os:
      - darwin
      - linux
      - win32
    primaryEnv: LOGFIRE_TOKEN

Logfire Observability

Sends OpenClaw agent traces, tool calls, and messages to Pydantic Logfire via OpenTelemetry.

Install the plugin

bash
openclaw plugins install openclaw-logfire-observability

Configure

Add to your openclaw.json:

json
{
  "diagnostics": {
    "enabled": true,
    "otel": {
      "enabled": true,
      "endpoint": "https://logfire-us.pydantic.dev",
      "headers": {
        "Authorization": "Bearer pylf_v1_us_YOUR_TOKEN_HERE"
      },
      "serviceName": "openclaw",
      "traces": true,
      "metrics": true,
      "logs": true
    }
  },
  "plugins": {
    "entries": {
      "openclaw-logfire-observability": {
        "enabled": true,
        "config": {
          "logfireToken": "pylf_v1_us_YOUR_TOKEN_HERE"
        }
      },
      "diagnostics-otel": {
        "enabled": true
      }
    }
  }
}

Replace YOUR_TOKEN_HERE with your Logfire write token (from Settings > Write Tokens in your Logfire project).

Then restart OpenClaw.

What you get

  • Agent traces with parent-child nesting (agent.run → tool.* spans)
  • Metrics: token usage, cost, duration, queue health, session state
  • Logs: full OpenClaw log forwarding
  • Diagnostic traces: model usage, webhooks, message processing

See the full README for architecture details, config options, and Logfire query examples.