triage

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTelemetryMetrics

func GetTelemetryMetrics() (queued uint64, processed uint64, dropped uint64)

GetTelemetryMetrics returns current telemetry queue statistics.

func Middleware

func Middleware(apiKey, engineURL string) func(http.Handler) http.Handler

Middleware returns an HTTP middleware that intercepts panics, isolates the crash site, and dispatches telemetry asynchronously to your self-hosted Triage engine.

engineURL is the full telemetry endpoint of your Triage engine, e.g.:

"https://triage.yourcompany.com/api/v1/telemetry"
"http://localhost:8080/api/v1/telemetry"

Usage:

handler := triage.Middleware(apiKey, engineURL)(mux)

Types

type TelemetryJob

type TelemetryJob struct {
	EngineURL  string
	APIKey     string
	Commit     string
	File       string
	Line       int
	StackTrace string
	TraceID    string
}

type TelemetryPayload

type TelemetryPayload struct {
	APIKey     string `json:"api_key"`
	Commit     string `json:"commit,omitempty"`
	File       string `json:"file"`
	Line       int    `json:"line"`
	StackTrace string `json:"stack_trace"`
	TraceID    string `json:"trace_id,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL