v0.6.0Go Crash Isolation & Multi-Provider AI Diagnostics

Zero-Latency Go Crash Isolation. Instant AI Diagnosis.

Intercepts Go HTTP server panics non-blockingly using defer + recover. Automatically isolates the crash site and surrounding multi-file package context (struct definitions, constructors, helpers), queries AI models for root causes, and opens automated bugfix Pull Requests 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
Pluggable AI
Gemini, OpenAI, Claude, Ollama
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 the AI diagnostics engine, 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

Multi-File AST Slicing

The engine parses the package AST on the fly to isolate the crash site alongside cross-file receiver structs, constructors, and package helpers.

0494% Token Savings

AI Incident Diagnostics

AST code snippet + sanitized panic metadata are sent to the configured AI engine (Gemini, OpenAI, Claude, Ollama) for deterministic root-cause analysis and patch generation.

05Automated PRs

GitHub Issues & PRs

Persists to embedded SQLite (WAL mode), streams live to Studio Dashboard, and automatically files GitHub issues or opens bugfix Pull Requests with verified patches.

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 Range
< 1.0 ms

Boundary-aware cache storing full [start..end] function spans in memory.

Tier 2: Embedded SQLite
< 2.0 ms

Persisted ast_nodes table lookup by repository, commit SHA, and line.

Tier 3: GitHub On-Demand
< 25 ms

Fetches raw source via GitHub App 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

Multi-File Package AST Slicing

Extracts the crashing function alongside cross-file receiver structs, referenced types, constructors, and package helpers using Go’s standard go/parser. Eliminates >90% of irrelevant code while preserving full type context.

< 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.

Multi-Provider LLM

Pluggable AI Diagnostics & Patches

Leverages multi-provider AI (Google Gemini, OpenAI, Anthropic Claude, and local Ollama/vLLM) with deterministic structured JSON schemas to deliver precise root causes and git diff patches.

GitHub App & PRs

Automated Fix PRs & Issue Filing

Generates GitHub issues with AST snippets and opens automated bugfix Pull Requests by creating dedicated fix branches and applying AI patches cleanly.

Monorepo Discovery

Multi-Project & Monorepo Support

Manage all your Go microservices from a single dashboard with an instant project switcher, automatic go.mod submodule discovery, and project-scoped API keys.

Enterprise Security

Zero-Trust Secret Scrubbing

Sanitizes HTTP headers, query parameters, Authorization tokens, cookies, and sensitive connection strings before transmitting 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(
        "your_sample_api_key",
        "https://triage.yourcompany.com/api/v1/telemetry",
    )(mux)

    http.ListenAndServe(":8080", handler)
}
SDK Runtime Architecture & Guarantees:Full SDK Documentation
Zero-Boilerplate Config

Local VCS commit detection with API-key-based repository and root-path resolution.

Non-Blocking Dispatch

Bounded 4-worker pool with 1,000-job buffer protects memory.

OpenTelemetry Native

Auto-injects W3C traceparent and X-Triage-Trace-ID headers.

Panic Crash Isolation

Standard library defer and recover boundary for non-blocking crash recovery.

PERFORMANCE & BENCHMARKS

Engineered for Extreme Efficiency

Triage isolates crashes with negligible server overhead while reducing LLM diagnostic token consumption by over 93% compared to industry-standard APM and error tracking platforms.

Interception Overhead< 0.02 ms
< 0.02 ms

Non-blocking defer/recover with async worker queue

Immediate Client Return: HTTP client responses finish without waiting for telemetry transmission.
Bounded 1,000-Job Queue: Asynchronous 4-worker goroutine pool prevents memory growth during traffic surges.
Zero Pipeline Lockup: Eliminates synchronous stack walks on active request handling threads.
Sub-millisecond panic capture with zero blocking on active request goroutines.
AST Code Isolation93.8% Saved
~240 Tokens

Exact function and receiver type context extracted on the fly

Enclosing AST Node: Extracts the exact *ast.FuncDecl subtree containing the panic site.
Cross-File Slicing: Pulls receiver struct definitions, constructors, and package helper declarations.
93.8% Token Savings: Replaces 4,800-token whole-file dumps with a concise ~240-token semantic context.
Eliminates prompt noise while giving AI models exact semantic type context.
SDK Dependencies0 Dependencies
0 Third-Party

Pure Go standard library implementation with zero external bloat

0 External Dependencies: Pure Go stdlib (net/http, runtime/debug, sync).
< 1.2 MB Memory: Low resident set size footprint with zero runtime reflection allocations.
No Sidecar Daemons: Zero external agents, CGO bindings, or background telemetry daemons.
Zero supply chain risk and effortless drop-in middleware integration.

Technical Comparison

Architecture and feature matrix for Go HTTP microservices

Tested on Go 1.26
CapabilityTriageSentry (sentry-go)Datadog (dd-trace-go)Bugsnag (bugsnag-go)
Panic InterceptionNon-blocking (4-worker queue)Synchronous panic hookSynchronous tracer spanSynchronous panic notifier
Code Context SlicingMulti-File AST (*ast.FuncDecl)5-line stack windowTrace spans & stacks only7-line raw text snippet
Diagnostic Tokens~240 tokens (>93% saved)3,000+ tokens (Seer AI)N/A (No AI diagnosis)N/A (No AI diagnosis)
Automated Bugfix PRs1-Click Verified PRManual review onlyAlert notification onlyError dashboard only
Crash DeduplicationSHA-256 Hash + Count BadgeHeuristic issue groupingTag aggregationError class hashing
Client Dependencies0 (Pure Go Standard Library)8+ external packages14+ external packages6+ external packages
AI Model FlexibilityGemini, OpenAI, Claude, LocalProprietary SaaS (Seer)Proprietary SaaS (Bits)None
Deployment Model1 Docker Container (Self-Hostable)30+ Helm pods or SaaSProprietary Cloud SaaS onlyEnterprise On-Prem / SaaS
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.