AI Briefing
KO

Solomon, an Automated Error Analysis System Built with Gemini and Slack

·2025.10.29 00:00

Key point

Gemini automatically analyzes Slack logs to instantly show the cause and location of errors.

1 / 2

Details

Solomon AI Assistant is an automated analysis system based on error logs collected via Heimdall and OpenTelemetry(sigNoz), designed to be read directly in Slack. Previously, long Stack Traces caused messages to be truncated or made it hard to find the core cause, and to solve this, a flow that summarizes errors before displaying them was designed.

The basic structure combines Spring Boot 3.x (JDK 21), Gemini API, Slack Bolt for Java, and Kubernetes. When Heimdall detects an error, it's delivered to the server via Webhook, and the server first responds with OK before performing asynchronous processing in the background.

The processing order is as follows.

  • Send the received error to the Slack channel
  • Pass that message to Gemini to generate the cause and a direction for resolution
  • Post the generated answer back as a thread on the original message

In the implementation, Gradle dependencies and application.yml configuration for Gemini API integration were added first, and StacktraceTrimmer logic was used to trim unnecessary lines and extract only the core exception and relevant frames. Slack sending was built around chat.postMessage, and Gemini responses were generated using a prompt tailored to the error message, then formatted to fit Slack's style.

As an interim result, instead of the old messages where the entire stack trace ran on for a long time, the format changed to a summarized error message + file/line info + AI answer organized into a single thread. As a result, developers can now check the cause of an error and the direction for handling it much faster within Slack.

After about a month of operation, a limitation emerged: follow-up questions couldn't continue. To address this, Slack Event Subscription and Socket Mode were used to enable interaction with the bot, and a Caffeine cache was used to maintain chat sessions, improving the system so that previous conversation context could be carried forward.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.