Official
Analytics & Monitoring
Monitors and analyzes LLM expenditures within PostHog by tracking model usage, token consumption, and cost regressions.
The PostHog LLM Cost Analytics skill enables developers to gain deep visibility into AI spending by aggregating and analyzing cost metadata from $ai_generation and $ai_embedding events. It provides specialized tools for performing granular breakdowns by model, provider, or user, debugging unexpected cost spikes, and evaluating cache-hit economics. By leveraging HogQL and specialized PostHog tools, users can transition from ad-hoc cost queries to permanent observability through automated dashboards and budget alerts.
Key Features
01Token economics analysis including input, output, and cache-hit math
02Automated creation of cost-tracking insights, dashboards, and alerts
03Support for custom pricing models and automated provider cost lookups
04Granular cost breakdowns by model, provider, user, and custom dimensions
05Real-time regression debugging to identify the cause of cost spikes
0659 GitHub stars
Use Cases
01Debugging sudden LLM bill increases through automated 5-step regression playbooks
02Materializing cost data into production-ready observability dashboards and alerts
03Identifying which specific AI features or users are driving the highest costs