Back to all projects

TraceLite

Error monitoring that groups repeated exceptions into issues, with a React dashboard to triage them.

Status
v0.1.0 released
Tests
337 backend and 74 frontend tests passing at the last full run; the build fails under 90% line coverage
Stack
Java 21, Spring Boot 3.5, PostgreSQL 17, Flyway, React 19, TypeScript, Docker
Code on GitHub
NullPointerExceptionTimeoutExceptionSQLException

Demo

Text version of the video

The video has background music and no narration. This is what it shows on screen.

  1. The problem, from the TraceLite README.
  2. TraceLite: a lightweight application error-monitoring platform.
  3. From a production failure to a resolved issue in four steps: send, group, triage, resolve. Shown next to the real dashboard running against a local backend.
  4. Architecture: a modular monolith with one application and one database. Controllers translate HTTP, services own transactions, domain classes enforce rules, and repositories never decide status codes.
  5. Send: applications post structured error events to a REST API and get 201 Created. A missing or unknown key gets 401, and invalid fields get a 400 problem details body.
  6. Every accepted event goes through one service method, and one transaction commits both the issue and the event.
  7. Group: repeated failures become a single issue. The fingerprint uses the exception type and normalised stack frames, never the message.
  8. Same failure, same fingerprint: frames stop at "Caused by:" and are capped at 30.
  9. PostgreSQL does the grouping safely under concurrency, with INSERT ... ON CONFLICT DO UPDATE counting repeats of the same application, environment and fingerprint.
  10. Triage: one issue per fingerprint, environment and application, filtered in the dashboard.
  11. Resolve: read the stack trace and event history, then resolve the issue.
  12. Secure: API-key authentication with least privilege. Keys are held as SHA-256 hashes and compared in constant time.
  13. Test: concurrency is covered by integration tests against a real PostgreSQL 17 in Testcontainers.
  14. Covered by automated tests and checked in CI: no non-201 responses in any benchmark run, about 8.5 ms per ingestion request, a 90% line and 85% branch coverage gate, and 4 parallel CI jobs.
  15. TraceLite: triage application errors.

What it does

Applications send structured error events to a REST API. TraceLite stores them in PostgreSQL and groups exceptions that come from the same place into one issue, so a crash that happens a thousand times shows up as one row with a count, not a thousand rows. A React dashboard lists issues, shows their event history and stack traces, and lets you resolve or reopen them. Every request needs an API key, and a key can only send events for its own application.

Architecture

A Spring Boot API split by feature (event, issue, security), each with its own api, application, domain and persistence layers. PostgreSQL holds two tables, issues and events, created by Flyway migrations with CHECK constraints and trigram indexes for text search. The React and TypeScript dashboard talks to the same API with a management key. Docker Compose runs the database and the backend locally.

The hard part

Two events with the same fingerprint can arrive at the same moment. If both check “does this issue exist?” and both see no, you get two issues for the same bug. I solved it with one native INSERT ... ON CONFLICT DO UPDATE that creates the issue or bumps its count and last-seen time in a single statement, inside the same transaction as the event insert. ConcurrentIngestionTests fires parallel requests at it to prove there are no duplicates.

The fingerprint itself is a SHA-256 over the exception type and normalised stack frames. Normalising means stripping line numbers and generated names such as lambda numbers and proxy classes, so a redeploy doesn’t split one bug into many issues.

Decisions

Testing

About 230 backend test methods, which run as 337 tests once parameterised cases expand, across unit, @WebMvcTest, repository and full integration tests on Testcontainers PostgreSQL, plus 74 Vitest tests for the dashboard. CI runs four jobs: static checks, backend build and tests with the coverage gate, the frontend, and a Docker stack test that checks the image runs as a non-root user with no secrets inside. A benchmark on a 4-vCPU container measured 512 requests per second at concurrency 16 with a p95 of 61 ms.

Next

There’s no public deployment yet, and no TLS or rate limiting. The companion project TraceLite Insights already reads its data to look for error spikes.