Back to browse
Costrace – Open-source LLM cost and latency tracking across providers

Costrace – Open-source LLM cost and latency tracking across providers

by Ikotun·Mar 5, 2026·1 point·0 comments

AI Analysis

●●●BangerSlickSolve My ProblemBig Brain

One-line LLM cost tracking via monkey-patching; integrates without touching existing code.

Strengths
  • Monkey-patching approach is genuinely clever: zero code changes to existing OpenAI/Anthropic/Gemini client calls
  • Solves real multi-provider pain: checking three separate dashboards for spend visibility and cost control
  • Self-hosted or SaaS options, free tier is generous (50k traces), clear pricing ladder for teams
Weaknesses
  • LLM cost tracking is a growing category (Anthropic Console, OpenAI dashboard both improving; Helicone, LangSmith exist)
  • Lacks integrations with broader observability: no tracing correlation, error tracking, or LLM-specific analytics beyond cost+latency
Target Audience

AI/ML engineers, startup founders, teams shipping LLM products

Similar To

Helicone · LangSmith · Anthropic Console

Post Description

I built Costrace because I was tired of checking three different dashboards to understand my LLM spend.

It's an open-source tool that tracks cost, token usage,latency, geographic distribution across OpenAI, Anthropic, and Google Gemini in one place. The SDKs work by monkey-patching the official client libraries, so you don't change any of your existing code — just init and go.

You can self-host the whole thing or use the hosted version at costrace.dev.

GitHub: github.com/ikotun-dev/costrace

Happy to answer any questions about the architecture or monkey-patching approach.

Similar Projects

Developer Tools●●●Banger

AgentBudget – Real-time dollar budgets for AI agents

Real-time dollar limits on AI agents, monkey-patched into OpenAI/Anthropic SDKs.

Solve My ProblemDark HorseShip It
sahiljagtapyc
783mo ago