expvar package
Canonical docs for publishing numeric and structured variables over HTTP for lightweight application metrics.
Canonical docs for publishing numeric and structured variables over HTTP for lightweight application metrics.
- Author: Go Team
- Authority: primary
- Kind: package-doc
- URL: https://pkg.go.dev/expvar
What it covers
- published variables
- HTTP metrics endpoint
- basic application instrumentation
Why authoritative
Official package documentation for Go’s lightweight built-in metrics export package.
Use when
- how should I expose basic metrics in Go
- when should I use expvar
- how do I publish counters or gauges in Go
Keywords
- expvar, metrics, debug vars, instrumentation, http