Demo
Text version of the video
The video has background music and no narration. This is what it shows on screen.
- The problem, from the TraceLite README.
- TraceLite: a lightweight application error-monitoring platform.
- 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.
- 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.
- 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.
- Every accepted event goes through one service method, and one transaction commits both the issue and the event.
- Group: repeated failures become a single issue. The fingerprint uses the exception type and normalised stack frames, never the message.
- Same failure, same fingerprint: frames stop at "Caused by:" and are capped at 30.
- PostgreSQL does the grouping safely under concurrency, with INSERT ... ON CONFLICT DO UPDATE counting repeats of the same application, environment and fingerprint.
- Triage: one issue per fingerprint, environment and application, filtered in the dashboard.
- Resolve: read the stack trace and event history, then resolve the issue.
- Secure: API-key authentication with least privilege. Keys are held as SHA-256 hashes and compared in constant time.
- Test: concurrency is covered by integration tests against a real PostgreSQL 17 in Testcontainers.
- 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.
- 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
- Fingerprint the stack, never the message: messages often contain IDs and timestamps.
- Store API keys only as SHA-256 hashes and compare them in constant time.
- Return every error as RFC 9457 problem details and never leak internals in a 500.
- Enforce the 256 KiB body limit while streaming, so chunked requests can’t get around it.
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.