Tracepanel

Tracepanel for Go

See what your Go app does on every request, with its SQL and the line of your code that ran it, its logs, calls and panics.

Go Reference Go

Tracepanel for Go is the github.com/tracepanel/tracepanel-go module. It records each request of your app with its SQL, its log records, its calls to HTTP APIs and Redis, its Kafka messages and its panics, what the request carried and, when you ask, its CPU time and memory. It sends each trace to the agent. The agent finds the issues and serves the panel and the console.

go get github.com/tracepanel/tracepanel-go@v0.10.0
db, err := sql.Open(tracepanel.Driver("pgx"), dsn)
http.ListenAndServe(":8080", tracepanel.WrapHandler(mux))

It works with net/http and any router on it: ServeMux, chi, gorilla, gin and Echo. It records any database on database/sql, pgx and GORM. The core module has no dependencies. Each library integration is a module of its own. Fiber runs on fasthttp, not net/http, and isn't supported yet.

Tracepanel records in development only: when the app runs under go run, with TRACEPANEL_ENABLED=1, or with Config.Enabled. A binary built with go build records nothing, unless you start it with tracepanel run.