DEV Community

Luke Xue
Luke Xue

Posted on

I Built an AI Tool That Analyzes Production Logs and Generates Incident Reports

In many production incidents, the first thing engineers do is open logs and start searching for errors.

But in reality:

  • Logs are huge
  • Error chains are messy
  • Root causes are often hidden
  • And writing incident reports takes time

So I built a small tool to experiment with a simple idea:

What if logs could automatically turn into incident analysis reports?


The Idea

During incident response, engineers usually try to answer questions like:

  • What is the root cause?
  • When did the errors start?
  • How severe is the incident?
  • Which services are affected?
  • What should we do next?

All of these answers already exist inside the logs.

The problem is that extracting them takes time.

So I built an open-source project that:

Turns raw logs into a structured incident report.

Paste logs → get analysis.


Live Demo

You can try it here:

👉 Live Demo

http://116.233.96.74:8025
Enter fullscreen mode Exit fullscreen mode

Just paste logs and click Analyze.

Example log:

2026-03-08 15:05:09 ERROR OrderService
java.lang.NullPointerException

2026-03-08 15:05:10 ERROR PaymentService
Timeout while calling downstream service

2026-03-08 15:05:11 ERROR OrderController
BusinessException: order not found
Enter fullscreen mode Exit fullscreen mode

The system automatically generates an incident report.


What the Tool Generates

Instead of raw logs, the system produces structured insights.

Example output:

Incident Severity

P3
Enter fullscreen mode Exit fullscreen mode

Recommended Action

Observe system metrics
Enter fullscreen mode Exit fullscreen mode

Root Cause Signals

Possible downstream timeout
Possible null pointer issue
Enter fullscreen mode Exit fullscreen mode

Incident Timeline

15:05:09 ERROR OrderService
15:05:10 ERROR PaymentService
15:05:11 ERROR OrderController
Enter fullscreen mode Exit fullscreen mode

Error Trend

Shows how errors increase over time.

Service Impact

Identifies which service is affected.


Why I Built This

Most incident analysis tools focus on:

  • monitoring
  • alerts
  • dashboards

But the actual debugging still happens in logs.

So I wanted to experiment with a system that focuses on:

logs → insights → incident report
Enter fullscreen mode Exit fullscreen mode

Instead of just storing logs.


Architecture

The demo is intentionally simple.

Browser
   ↓
Nginx (static demo page)
   ↓
Spring Boot API
   ↓
Log Analyzer
   ↓
Incident Insight
Enter fullscreen mode Exit fullscreen mode

The backend performs several steps:

  1. Log preprocessing
  2. Root cause signal extraction
  3. Error pattern detection
  4. Timeline generation
  5. Incident report assembly

Key Features

Current open-source version includes:

  • Root cause signal detection
  • Incident timeline generation
  • Error trend analysis
  • Service impact estimation
  • Incident report generation
  • Markdown / HTML / PDF export

Example Incident Report

Instead of manually writing a post-mortem, the system generates:

Executive Summary
Root Cause Analysis
Incident Timeline
Error Trend
Service Impact
Short-term Improvements
Long-term Improvements
Enter fullscreen mode Exit fullscreen mode

GitHub Repository

The project is open source.

👉 GitHub

https://github.com/YOUR_REPO
Enter fullscreen mode Exit fullscreen mode

If you're interested in DevOps / SRE tooling, feel free to check it out.


What I'm Exploring Next

Some ideas I'm experimenting with:

  • AI-powered root cause analysis
  • cross-service incident correlation
  • automatic incident report generation
  • integration with observability systems

Feedback Welcome

This is still an early experiment.

If you work with logs, SRE, or incident response, I would love to hear your feedback.

⭐ If you like the idea, consider starring the project on GitHub.

And if you'd like to try it:

👉 Live Demo

http://116.233.96.74:8025
Enter fullscreen mode Exit fullscreen mode

Paste logs.
Get an incident report in seconds.

Top comments (0)