5-Minute Quickstart
Follow this guide to spin up a local Triage stack and capture your first Go crash with AI diagnostics.
Prerequisites
Section titled “Prerequisites”- Go 1.22+
- Docker & Docker Compose
- A Google AI Studio API key (aistudio.google.com)
1. Start the Triage Stack
Section titled “1. Start the Triage Stack”Clone the repository and start the Docker Compose cluster:
git clone https://github.com/algotyrnt/triage.gitcd triagedocker compose up --build -dThis starts:
triage-db(:5432): PostgreSQL 16 database.triage-engine(:8080): Core engine serving telemetry and REST APIs.triage-dashboard(:3000): Studio Dashboard UI.
2. Run the Setup Wizard
Section titled “2. Run the Setup Wizard”Open http://localhost:3000 in your browser. The initial setup wizard will guide you through:
- GitHub App Manifest Creation (One-click app registration).
- Repository Installation (Grant access to your Go repositories).
- OAuth Linking (Configure GitHub login).
- Gemini AI API Key (Enter your Google AI Studio API key).
- Verification (Engine self-test).
Once configured, copy your project API key (e.g. tr_live_...).
3. Add Triage SDK to Your Go App
Section titled “3. Add Triage SDK to Your Go App”Install the official Go SDK:
go get github.com/algotyrnt/triage/sdk/goWrap your HTTP handler:
package main
import ( "net/http" triage "github.com/algotyrnt/triage/sdk/go")
func main() { mux := http.NewServeMux()
// An example endpoint that panics: mux.HandleFunc("/crash", func(w http.ResponseWriter, r *http.Request) { var ptr *int *ptr = 42 // Nil pointer dereference panic! })
// Wrap mux with Triage middleware: handler := triage.Middleware( "tr_live_your_api_key", triage.WithGatewayURL("http://localhost:8080/api/v1/telemetry"), triage.WithRepo("myorg/myrepo"), )(mux)
http.ListenAndServe(":8081", handler)}4. Trigger a Panic & View Diagnostics
Section titled “4. Trigger a Panic & View Diagnostics”Run your Go application and trigger the crash:
curl http://localhost:8081/crashYour HTTP client will receive a generic 500 Internal Server Error without any sensitive internals exposed.
Now switch back to your Studio Dashboard at http://localhost:3000:
- You will see a new CRITICAL incident.
- The isolated
*ast.FuncDeclcode block will be highlighted. - Gemini AI will display the exact root cause and suggested drop-in git patch.