OpenClaw Logfire Plugin for Openclaw

A production-grade observability plugin providing OTEL GenAI traces and token metrics for Openclaw Skills via Pydantic Logfire.

namabile
v0.1.2
Feb 16, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openclaw-logfire

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openclaw-logfire using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenClaw Logfire Plugin?

The OpenClaw Logfire Plugin is a specialized observability tool designed for developers who need deep visibility into their Openclaw Skills. By integrating with Pydantic Logfire, it provides granular tracing of the entire agent lifecycle, adhering to OpenTelemetry GenAI semantic conventions. This allows teams to monitor the performance of their agents, analyze tool execution paths, and manage token consumption in real-time, ensuring that AI-driven applications are reliable and cost-effective.

This plugin bridges the gap between raw agent execution and actionable insights. Whether you are running complex multi-agent workflows or simple automated tasks, this integration ensures that every step of the process is recorded, from initial invocation to final output, with professional-grade monitoring and distributed tracing capabilities.

OpenClaw Logfire Plugin Use Cases

  • Tracking token consumption and input/output costs for various Openclaw Skills.
  • Debugging agent logic by visualizing tool call spans and execution sequences.
  • Profiling agent invocation latency to identify performance bottlenecks.
  • Implementing distributed tracing for AI agents operating across multiple microservices.
  • Ensuring data privacy by auditing agent behavior with automated secret redaction.

How OpenClaw Logfire Plugin Works

  1. The plugin establishes a secure connection to Pydantic Logfire using the LOGFIRE_TOKEN environment variable.
  2. Upon invocation of an agent, the plugin generates a root span to track the complete lifecycle of the task.
  3. As the agent executes tools (such as file operations or shell commands), child spans are automatically nested within the trace.
  4. Real-time metrics, including GenAI token usage and operation duration, are collected and categorized using standard OTEL conventions.
  5. All trace data and metrics are streamed via OTLP to the Logfire dashboard for immediate visualization and analysis.

OpenClaw Logfire Plugin Setup

Install the plugin using the CLI:

openclaw plugins install @ultrathink-solutions/openclaw-logfire

Configure your Logfire write token in your environment:

export LOGFIRE_TOKEN="your-token"

Enable the plugin in your openclaw.json file:

{
  "plugins": {
    "entries": {
      "openclaw-logfire": {
        "enabled": true,
        "config": {}
      }
    }
  }
}

OpenClaw Logfire Plugin Data Schema & Taxonomy

The plugin maps agent activities to the following OTEL GenAI semantic conventions:

Metadata Field Description
gen_ai.agent.name The specific name of the agent invoked.
gen_ai.tool.name The name of the tool executed during the span.
gen_ai.usage.input_tokens The number of input tokens processed.
gen_ai.usage.output_tokens The number of output tokens generated.
gen_ai.client.operation.duration Total time taken for the agent invocation.
environment Deployment label (e.g., development, production).

OpenClaw Logfire Plugin Advanced Features

  • Automatic secret redaction: Strips API keys, JWTs, and platform tokens from recorded tool arguments by default.
  • Distributed tracing support: Enables W3C traceparent propagation for end-to-end observability across service boundaries.
  • Custom service naming: Define specific OTEL service names for better organization within the Logfire dashboard.
  • Configurable data capture: Fine-grained control over whether tool inputs, outputs, or message content are recorded.
  • Seamless production readiness: Works with existing Openclaw Skills to provide immediate insights without changing agent logic.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*