statsviz
statsviz copied to clipboard
π Visualise your Go program runtime metrics in real time in the browser
#119
It would be nice to be able to add graphs dynamically. For example, we wanted to convert Prometheus metrics to Statsviz graphs, with one graph per Prometheus label value. But...
We should add unit tests to verify the behaviour if we're trying to encode floating points equals to NaN or infinite, whether they come from runtime/metrics (if that's even possible)...
代η ε¦δΈοΌ ```golang package handler import ( "net/http/pprof" "github.com/arl/statsviz" "github.com/beego/beego/v2/server/web" "github.com/beego/beego/v2/server/web/context" ) func init() { // web.Router(defaultPprofPrefix, &PprofController{}, "*:Index") web.AutoPrefix(defaultPprofPrefix, &PprofController{}) // web.Router(defaultStatsvizPrefix, &PprofController{}, "*:StatIndex") // web.Router(defaultStatsvizPrefix+":path([\\w]+)", &PprofController{}, "*:StatPath") // web.Router(defaultStatsvizPrefix+"ws",...
Open 2 or more pages and you will see the phenomenon code like this: ```golang statsviz.NewServer(statsviz.TimeseriesPlot(func() statsviz.TimeSeriesPlot { plot, _ := statsviz.TimeSeriesPlotConfig{ Name: "testCall", Title: "testCall", Type: statsviz.Scatter, Series: []statsviz.TimeSeries{{...
With recent go1.20 and go1.21 metrics, the number of plots is starting to be important. I think users would benefit from a way to hide and show - 1. single...
Maybe it can be compatible with non-websocket mode? Some CDNs do not allow websocket connections.
If you use long polling, you will have the following advantages: better compatibility The server does not have multiple sets of time.Tick Have smaller dependencies
See https://github.com/plotly/plotly.js/pull/6574/files#diff-34e0af7d37f2e01e228d823f1edaf08b008458cc64ac14a17e02129917af7716
Is there any example to use statsviz with https://github.com/beego/beegoοΌ
pretty standard stuff, maybe reuse a template or use a template generator? Issue template should thank the user and ask them: - to run `go env` - to share Go...