Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank
No. 1585Tools index

Previous survey · No. 1590 ·

Pricing
Open Source
Type
TOOL
Builder
PostHog
GitHub
8 stars
Latest release
0.2.5
Date

About

PostHog LLM analytics plugin for OpenClaw.

What it does

It observes OpenClaw model runs and tool activity, then sends structured generation, span, and trace events to PostHog. It correlates inputs with outputs, records tokens, latency, costs, errors, models, providers, sessions, channels, and agents.

Why it's ranked here

This is a focused observability bridge with unusually clear event coverage. Message and session trace grouping, tool parenting, content redaction, and session windows make the captured data useful beyond raw logs. Its value depends entirely on running OpenClaw and using PostHog.

What's good

Privacy mode removes prompts, responses, and tool parameters while preserving operational metrics. Input normalization converts several OpenClaw and Anthropic message shapes into PostHog-compatible chat records, strips reasoning blocks, and preserves tool-call relationships. Tests cover configuration precedence, redaction, trace reuse, event fields, and lifecycle behavior.

Tradeoffs

Trace-level events require OpenClaw diagnostics to be enabled. Privacy mode still sends token counts, latency, model information, and error status. The plugin needs a PostHog project key, Node 20 or newer, and a compatible OpenClaw installation. Its OpenClaw type definitions are copied from upstream pending stable exports.

How to use it well

Use it when an OpenClaw deployment needs generation costs, latency, failures, tool timing, and conversation traces inside PostHog. Choose message grouping for per-request analysis or session grouping for longer journeys. Enable privacy mode for content-sensitive workloads. It does not replace logging, alerting, or general infrastructure monitoring.

Technical notes+

package.json defines an ESM npm package named @posthog/openclaw, requires Node >=20.0.0, depends on posthog-node, and lists OpenClaw as an optional peer. index.ts resolves configuration and environment fallbacks before registering hooks. src/plugin.ts lazily creates the PostHog client, subscribes to message.processed diagnostics, tracks runs and session windows in Maps, captures lifecycle hooks, and flushes on service shutdown or process exit. src/events.ts builds $ai_generation, $ai_span, and $ai_trace payloads. src/utils.ts normalizes message formats, removes thinking and reasoning blocks, and applies content redaction. Tests are co-located under src, while scripts/verify-package.mjs checks the packed artifact and excludes test files.

Observed

License
MIT
Primary language
TypeScript
Packaging
ES module published to npm as @posthog/openclaw
Install surface
Installed through the OpenClaw plugin installer
Interface
OpenClaw plugin using model input, model output, tool completion, and diagnostic event hooks
Runtime support
Node.js 20 or newer
Dependency surface
Uses posthog-node and declares OpenClaw as an optional peer dependency
Test structure
Vitest tests are co-located with source files under src

Read from README.md, package.json, index.ts, src/types.ts, src/utils.ts, src/events.ts, src/plugin.ts, src/version.ts, src/index.test.ts, src/events.test.ts, src/plugin.test.ts, src/openclaw-types.ts, src/openclaw-plugin-sdk.d.ts, vitest.config.ts, scripts/verify-package.mjs.

What it can do

  • Track LLM API calls and usage

    LLM API requests and responsesAnalytics data on API usage patterns

  • Monitor LLM model performance metrics

    LLM model execution dataPerformance metrics and statistics

  • Analyze LLM token consumption

    LLM token usage dataToken consumption reports and trends

  • Generate LLM cost analytics

    LLM usage and pricing dataCost breakdowns and billing insights

  • Track user interactions with LLM features

    User session and interaction dataUser behavior analytics for LLM usage

Tags

posthogopenclawllm-analyticsplugin

Tech Stack

Node.jsTypeScript

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.