statsviz is a free, open source monitoring & observability project written in Go and released under MIT. It has 3,648 GitHub stars, 126 forks and 10 open issues, and was last pushed 5 days ago. On this registry it ranks #117 of 270 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available. It gained 2 stars over the last 30 tracked days.

What is statsviz?

Statsviz is an MIT-licensed Go library that streams a running program's runtime/metrics over a WebSocket into a live browser dashboard, built for Go developers and operators who need to watch heap, goroutine, garbage-collector and scheduler behaviour without standing up an external monitoring stack.

What it is

Statsviz lives in the Go runtime-observability corner of the ecosystem, alongside the language's own runtime/metrics package. It ships as a library rather than a standalone daemon: the program registers Statsviz HTTP handlers with its own http.ServeMux, and the library serves both a user interface and a WebSocket endpoint from inside the process it is measuring. Internally it is two parts — the Index HTTP handler serves the dashboard at /debug/statsviz, and the Ws handler serves a WebSocket endpoint that pushes the program's runtime/metrics to the browser once per second.

The concrete problem is that runtime/metrics is a low-level API that yields raw numeric values, which are awkward to interpret in flight. Statsviz turns those same values into continuous plots of allocation and free rate, live bytes, live objects, goroutines, GC cycles and pauses, scheduling events, mutex wait, CGO calls and CPU broken out by GC, overall and scavenger. That means replacing hand-rolled introspection of raw metric values with a browser view that updates continuously, without introducing a separate metrics backend for runtime statistics alone.

Key capabilities

  • statsviz.Register(mux) wires the handlers into any http.ServeMux, serving the dashboard at /debug/statsviz.
  • statsviz.NewServer() exposes Index() and Ws() handler functions for custom mount paths such as /foo/bar, middleware wrapping, and https:// instead of http://.
  • A WebSocket connection carries runtime/metrics data points to the browser once per second.
  • Roughly twenty built-in plots cover Goroutines, Live Objects, Live Bytes, Heap (Details), GC Pauses, GC Cycles, GC Scan, GC Stack Size, Scheduling Events, Mutex Wait, Runnable Time, CGO Calls, Memory Classes, Size Classes, MSpan/MCache, and CPU (GC), CPU (Overall) and CPU (Scavenger).
  • The interface provides a category selector for filtering plots, a visible time-range selector, a show/hide toggle for vertical GC event lines, and a pause/resume control for updates.
  • Since v0.6, User Plots let an application add its own metrics to the dashboard beside runtime metrics, demonstrated in the _example/userplots/main.go example.
  • Which plots appear depends on the Go version in use, since newer versions expose metrics that older ones do not.

Who uses it and how

  • Developers debugging a single Go process locally, registering handlers and opening http://localhost:8080/debug/statsviz to watch GC pauses and heap growth while reproducing an issue.
  • Teams running services behind echo, fasthttp, fiber or gin, where the examples directory shows registration with each framework.
  • Services that need Statsviz at a non-default path or behind middleware, using statsviz.NewServer() and its Index() and Ws() handlers.
  • Deployments serving the dashboard over https://, where the example set covers TLS configuration.

Getting started

Install with go get github.com/arl/statsviz@latest, register statsviz.Register(mux) with your http.ServeMux, and open http://localhost:8080/debug/statsviz in a browser.

How it compares

No competing or paid products are named in the facts provided for this entry. On the evidence available, Statsviz stands alone in this registry among runtime-visualisation tools, and it does not position itself against any commercial monitoring product.

When to use it — and when not to

Statsviz is an in-process library, so a self-hoster operates no database, object store or SMTP service to run it — the cost is exposing an internal debug endpoint from the application itself, which needs deliberate handling in production. It is the wrong choice for anyone who needs fleet-wide aggregation, long-term metric retention or alerting, because the data is streamed to a single browser and no persistence is described. The catalogue is also modest — 10 open issues, 124 forks and a last push in September 2026 — so teams wanting a broadly maintained, multi-language observability platform should look elsewhere.

project readme (upstream, from github) — read inline



Go Reference Latest tag Mentioned in Awesome Go

Linux CI Others CI Codecov

Statsviz

Visualize real time plots of your Go program runtime/metrics including heap, objects, goroutines, GC pauses, scheduler and more.

statsviz ui statsviz ui

Install

Get the latest version:

go get github.com/arl/statsviz@latest

Usage

Register Statsviz HTTP handlers with your application http.ServeMux.

mux := http.NewServeMux()
statsviz.Register(mux)

go func() {
    log.Println(http.ListenAndServe("localhost:8080", mux))
}()

Open your browser at http://localhost:8080/debug/statsviz

Examples

If you check any of the boxes below:

  • you use some HTTP framework
  • you want Statsviz to be located at /my/path/to/statsviz rather than /debug/statsviz
  • you want Statsviz under https:// rather than http://
  • you want Statsviz behind some middleware

Then you should call statsviz.NewServer() (with or without options depending on your use case) in order to access the Index() and Ws() methods.

srv, err := statsviz.NewServer(); // Create server or handle error
if err != nil { /* handle error */ }

// Do something with the handlers.
srv.Index()     // UI (dashboard) handler func
srv.Ws()        // Websocket handler func

Examples for the following cases, and more, are found in the _example directory:

  • use of http.DefaultServeMux or your own http.ServeMux
  • wrap HTTP handler behind a middleware
  • register the web page at /foo/bar instead of /debug/statsviz
  • use https:// rather than http://
  • register Statsviz handlers with various Go HTTP libraries/frameworks:

How Does That Work?

Statsviz is made of two parts:

  • The Ws serves a Websocket endpoint. When a client connects, your program's runtime/metrics are sent to the browser, once per second, via the websocket connection.

  • the Index http handler serves Statsviz user interface at /debug/statsviz at the address served by your program. When served, the UI connects to the Websocket endpoint and starts receiving data points.

Documentation

Go API

Check out the API reference on pkg.go.dev.

Web User Interface

Top Bar
webui-annotated
Category Selector
menu-categories

Each plot belongs to one or more categories. The category selector allows you to filter the visible plots by categories.

Visible Time Range
menu-timerange

Use the time range selector to define the visualized time span.

Show/Hide GC events
menu-gc-events

Show or hide the vertical lines representing garbage collection events.

Pause updates
menu-play

Pause or resume the plot updates.

Plot Controls
webui-annotated

Plots

Which plots are visible depends on:

  • your Go version,since some plots are only available in newer versions.
  • what plot categories are currently selected. By default all plots are shown.
Allocation and Free Rate
alloc-free-rate
CGO Calls
cgo
CPU (GC)
cpu-gc
CPU (Overall)
cpu-overall
CPU (Scavenger)
cpu-scavenger
Garbage Collection
garbage-collection
GC Cycles
gc-cycles
GC Pauses
gc-pauses
GC Scan
gc-scan
GC Stack Size
gc-stack-size
Goroutines
goroutines
Heap (Details)
heap-details
Live Bytes
live-bytes
Live Objects
live-objects
Memory Classes
memory-classes
MSpan/MCache
mspan-mcache
Mutex Wait
mutex-wait
Runnable Time
runnable-time
Scheduling Events
sched-events
Size Classes
size-classes
GC Pauses
gc-pauses

User Plots

Since v0.6 you can add your own plots to Statsviz dashboard, in order to easily visualize your application metrics next to runtime metrics.

Please see the userplots example.

Questions / Troubleshooting

Either use GitHub's discussions or come to say hi and ask a live question on #statsviz channel on Gopher's slack.

Contributing

Please use issues for bugs and feature requests.
Pull-requests are always welcome!
More details in CONTRIBUTING.md.

Changelog

See CHANGELOG.md.

License: MIT

See LICENSE

Frequently asked questions

Is statsviz free to use?

statsviz is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does statsviz do?

Visualise Go runtime metrics in real time

What is statsviz written in?

statsviz is primarily written in Go. Its source is publicly available at https://github.com/arl/statsviz, and it has 3,648 GitHub stars.