This project provides real-time live charting of internal metrics for applications that use the rcrowley/go-metrics metrics library. It began as a fork of github.com/mkevac/debugcharts, until it seemed cleaner to keep it separate.
This is intended as a simple live view of metrics in a single process without the need for an entire metrics stack - it can be useful when developing and testing locally. All third party dependencies are loaded from a CDN to keep the amount of embedded data to a minimum.
go get github.com/aalpern/go-metrics-charts
import "github.com/aalpern/go-metrics-charts" metricscharts.Register()
You must have metrics exposed via expvars, as rather than having a
binary depedency on the metrics package, the UI works by hitting the
/debug/metrics JSON endpoint exposed by that package.
import "github.com/rcrowley/go-metrics/exp" exp.Exp(metrics.DefaultRegistry)
The live charts page will be registered at
- better handling of long list of metrics
- set refresh period
- limit the data to a rolling window of data points
- Chart options - add stacked area, display data points
- Responsive chart
- merge runtime stats into metrics list for unified UI
- implement filtering of metrics list
- URL handling/generation