Triage Core v1.0 Active
GO CRASH ISOLATION & GEMINI AI DIAGNOSTICS

Zero-Latency Go Crash Isolation. Instant Gemini AI Diagnosis.

Intercepts Go HTTP server panics non-blockingly using defer + recover. Automatically isolates the enclosing *ast.FuncDecl code block, queries Gemini AI for root causes, and files GitHub issues with drop-in patches.

$go get github.com/algotyrnt/triage/sdk/go
Overhead
< 0.02 ms
Async bounded worker pool
AST Isolation
94% Savings
Exact *ast.FuncDecl node
AI Inference
Gemini AI
Structured JSON root-cause
Self-Hosting
1 Container
Single Docker container
INTERACTIVE CRASH & AST INSPECTOR

See How Triage Isolates Crashes in Real Time

Select a real Go panic scenario below and see how the engine extracts the enclosing AST node, sends it to Gemini AI, and generates actionable fixes.

test-service/handlers/payment.go:28(ProcessTransaction)
PANIC INTERCEPTED:runtime error: invalid memory address or nil pointer dereference
Isolated *ast.FuncDecl (Go AST Subtree):
Zero pre-indexing • On-demand AST slice
func ProcessTransaction(w http.ResponseWriter, r *http.Request) {
    var req *PaymentPayload
    // Attempting to access struct field without initialization:
    if req.Amount <= 0 {  // <--- PANIC TRIGGER [LINE 28]
        http.Error(w, "invalid amount", http.StatusBadRequest)
        return
    }
    executeTransfer(req)
}
AST Node Isolation: The Go engine only sent the 8 lines enclosing ProcessTransaction instead of all 450 lines in the source file. This saves 94% in LLM token cost while preserving complete semantic context.
ZERO-OVERHEAD ARCHITECTURE

How Triage Delivers Sub-Millisecond Panic Isolation

Designed from the ground up for high-throughput production Go microservices without background database pre-indexing.

01< 0.02ms

Panic Interception

Standard Go defer + recover() hooks intercept HTTP panics. Captures debug.Stack() and immediately releases the client response.

02Non-blocking

Async Bounded Queue

Telemetry is dispatched to an asynchronous 4-worker pool backed by a 1,000-job buffer. Zero impact on server throughput.

03< 14ms

On-Demand AST Slicing

The engine retrieves the exact commit file and parses the AST to isolate only the enclosing *ast.FuncDecl code node.

0494% Token Savings

Gemini AI Diagnostics

AST code snippet + sanitized panic metadata are sent to Gemini AI for deterministic root-cause analysis and patch generation.

05Automated

GitHub Issue & Studio

Persists to PostgreSQL, streams live to Studio Dashboard, and optionally files a GitHub issue with formatted stack traces and diffs.

3-TIER AST CACHE

Multi-Layered AST Resolution

Triage avoids heavy full-codebase pre-indexing by resolving AST nodes on demand using a layered caching architecture.

Tier 1: In-Memory KV
< 1.5 ms

Hot AST cache storing parsed FuncDecl trees in engine memory.

Tier 2: PostgreSQL
< 5 ms

Pre-indexed ast_nodes table lookup by repository and commit SHA.

Tier 3: GitHub On-Demand
< 25 ms

Fetches raw source via GitHub Contents API and parses on the fly.

ENGINE CAPABILITIES

Engineered for High-Reliability Go Systems

Everything you need to intercept, symbolicate, diagnose, and resolve Go panics without adding latency or managing heavyweight agent sidecars.

go/ast & go/parser

AST Node Isolation

Extracts only the surrounding *ast.FuncDecl code block enclosing the panicking line using Go’s standard go/parser. Eliminates 94% of irrelevant source code.

< 0.02ms Overhead

Non-Blocking Async Dispatch

Middleware captures panics with defer + recover and dispatches telemetry across a bounded 4-goroutine worker pool. Zero latency added to HTTP client responses.

google.golang.org/genai

Gemini AI Diagnostics

Leverages Google Gemini AI with deterministic structured JSON schemas to deliver precise root-cause analysis and drop-in Git patches using your configured model.

GitHub App & OAuth

Automated GitHub Issue Filing

Seamlessly creates GitHub issues in your repository containing formatted AST code blocks, raw stack traces, Gemini diagnostic summaries, and triage labels.

Docker & Kubernetes

Single-Container Self-Hosting

Deploy the full platform with 1 single Docker container (triage/engine:latest). The engine serves REST APIs, telemetry receivers, and the Studio Dashboard UI.

Enterprise Security

Zero-Trust Secret Scrubbing

Sanitizes HTTP headers, query parameters, Authorization tokens, cookies, and database connection strings before sending panic telemetry payloads.

GO SDK INTEGRATION

Integrate with Any Go Router in Under 60 Seconds

Triage works as standard Go http.Handler middleware. Drop it into your existing HTTP routers without refactoring.

package main

import (
    "net/http"
    triage "github.com/algotyrnt/triage/sdk/go"
)

func main() {
    mux := http.NewServeMux()
    mux.HandleFunc("/api/process", func(w http.ResponseWriter, r *http.Request) {
        w.Write([]byte("Process completed successfully"))
    })

    // Wrap your mux with triage panic isolation middleware
    handler := triage.Middleware(
        "tr_live_key_9042",
        triage.WithRepo("myorg/myrepo"),
        triage.WithGatewayURL("https://triage.yourcompany.com/api/v1/telemetry"),
    )(mux)

    http.ListenAndServe(":8080", handler)
}
Available Configuration Options:Full SDK Reference
triage.WithRepo("org/repo")

GitHub repository for on-demand AST fetching.

triage.WithGatewayURL(url)

Custom engine endpoint for self-hosted instances.

triage.WithCommit(sha)

Explicit Git commit SHA override for AST matching.

PERFORMANCE & COST BENCHMARKS

Engineered for Extreme Efficiency

Triage isolates crashes with negligible server overhead while reducing LLM diagnostic token consumption by over 93%.

Latency Overhead47x Faster
0.018 ms

Average HTTP handler latency overhead per request

triage SDK0.018 ms
Traditional APM A0.840 ms
Traditional APM B1.220 ms
LLM Token Efficiency93.6% Saved
180 Tokens

Tokens sent per incident with AST FuncDecl isolation

Triage AST Node180 tokens
Full Source File Ingest2,800 tokens
AST slicing cuts noise and prevents prompt saturation while reducing Gemini API costs to < $0.0001 per incident.
Client SDK MemoryZero Allocation
< 1.2 MB

Peak resident set size for 10,000 requests/sec

Bounded 1,000-job channel queue
No background daemon subprocesses
Garbage collection neutral payload recycling
Native Go net/http connection reuse
FREQUENTLY ASKED QUESTIONS

Everything You Need to Know

Common architectural and operational questions regarding Triage panic isolation.

When an HTTP handler panics, Triage catches the exception using defer + recover, writes the raw stack trace to an internal buffered ring buffer (1000 jobs), and immediately sends a sanitized 500 error response to the client. The telemetry payload is then dispatched asynchronously by a background 4-goroutine worker pool.