A developer known online as gg_0080 has open sourced LogSense, an AI-powered log triage system built in Go that dramatically reduces LLM costs by eliminating duplicate error processing at scale. The project tackles one of the most annoying problems plaguing modern observability: paying premium prices for tools that still treat identical stack traces as unique incidents requiring separate analysis.
The Problem With Naive AI Log Analysis
Most log analysis pipelines ingest every incoming event and fire off individual LLM calls—or small batches—treating each line as independent work. When a bug causes an outage, teams often see thousands of near-identical stack traces flooding their systems simultaneously. A naive approach processes all of them separately, racking up token costs for what is essentially one underlying defect repeated across user sessions. The economics break down fast: if your error rate spikes from 10 events per minute to 10,000 during an incident, your AI bill scales with that chaos rather than the actual number of unique failures. Beyond cost, signal quality suffers because you're summarizing noise instead of grouping related incidents together for coherent root-cause analysis.
How LogSense Works
LogSense is built on a Go stack using Gin for HTTP routing, RabbitMQ for message queuing, and Kubernetes for orchestration. The architecture follows a straightforward pipeline: ingest logs via API → fingerprint error signatures by normalizing stable patterns → deduplicate repeated errors within configurable windows → analyze once per unique fingerprint → fan out results to all grouped events. The critical insight is that volume spikes no longer translate directly into AI costs. Whether you receive 10 identical panics or 10,000, LogSense generates exactly one LLM call for that specific error signature. The system groups related incidents together and attaches root-cause analysis plus remediation hints to every event sharing the same fingerprint.
Fingerprinting: Where the Real Innovation Lives
The fingerprinting layer does the heavy lifting by normalizing unstable fields from each error event before hashing. Timestamps, UUIDs, request IDs, dynamic numbers, and environment-specific noise get stripped out, leaving only the stable structural elements: message content, stack trace shape, and service context. Consider two panics with different user IDs: "panic: nil pointer at user_id=12345" and "panic: nil pointer at user_id=67890." These collapse into identical canonical signatures if they stem from the same underlying defect. The result is one root-cause analysis per unique failure type, regardless of whether it occurred once or ten thousand times during an incident window.
Example Code Flow
The core processing logic in Go demonstrates how simple this approach is in practice: normalize incoming events, compute their fingerprint, check the cache for existing analyses, and only invoke the LLM for genuinely new error signatures. For cached fingerprints, LogSense increments a counter and returns immediately—no wasted API calls.
Key Takeaways
- Duplicate error suppression means AI costs scale with unique failures, not total event volume
- Normalizing out dynamic fields (timestamps, UUIDs) before hashing preserves signal while eliminating noise
- Incident grouping improves triage speed by consolidating related events around their root cause
- Predictable AI spend becomes possible even during chaotic production outages
The Bottom Line
LogSense proves that the real moat in AI observability isn't the analysis itself—it's intelligent deduplication before you ever hit an API endpoint. This is the kind of systems thinking that separates expensive demos from deployable production tools. Early access is open for developers tired of bleeding money on duplicate LLM calls during their worst incidents.