{"repo":"ubermorgenland/LogCost","free":true,"listed":false,"github":"https://github.com/ubermorgenland/LogCost","clone":"git clone https://github.com/ubermorgenland/LogCost.git","description":"Find and fix expensive log statements to reduce cloud logging costs","language":"Python","stars":12,"topics":["cost-analysis","logging","monitoring","observability","python"],"license":"MIT","category":"analytics","readme_excerpt":"LogCost Your cloud logging bill is $2,000/month. One debug statement in a hot path is responsible for $800 of it. LogCost finds expensive log statements by tracking and aggregating logs at the source code level. Drop-in instrumentation (just import logcost ) pinpoints which lines generate the most data, helping you cut cloud logging costs by 40-60% without guessing. See exactly what's costing you: Instead of wondering where your logging costs go, LogCost shows the exact file:line, bytes logged, cost, and call count. Fix the top offenders and save hundreds monthly. Features - Zero-config tracking - Monkey-patches logging and print to measure file/line, level, message template, call count, and bytes - Aggregation by location - Logs from the same file:line:level are aggregated together, regardless of message content. This means a loop logging 1000 times shows as one entry with count=1000, not 1000 separate entries - Thread-safe - Lock-protected tracking works across concurrent requests - Framework support - Examples for Flask, FastAPI, Django, Kubernetes - Export options - JSON, CSV, Prometheus, HTML reports - Cost analysis - Compute GCP/AWS/Azure cost estimates and identify anti-patterns - Performance - Low overhead design for production use - GCloud source attribution - Preserves actual source file:line in logs, not wrapper attribution Quick Start Analyze the results: Example Output: Real-world example: A typical service logging 900 GB/month (30 GB/day average) would see costs","default_branch":null,"files":null,"tree":[],"storefront":"/r/ubermorgenland","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ubermorgenland/LogCost/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}