Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.01 KB

README.md

File metadata and controls

50 lines (33 loc) · 1.01 KB

Goal

This repository provides a docker-compose for Go runtime metrics stack on your local computer. It is using influxdb and grafana, it based on the project http://github.com/tevjef/go-runtime-metrics

Quick run

1- Start docker-compose

Start metric stack:

make start

2- Insert metrics Go code

import (
	metrics "github.com/tevjef/go-runtime-metrics"
)

func main() {
	err := metrics.RunCollector(metrics.DefaultConfig)
	
	if err != nil {
	   // handle error
	}
	
	...
}

you may need to add this to your go.mod: replace gonum.org/v1/gonum => github.com/gonum/gonum v0.9.3

3- Access dashboard 'Go runtime'

Wait for metrics collection and go to the dashboard Go runtime. If not selected, choose the right measurement in the dashboard top drop down list.

http://localhost:3000/d/1/go-runtime?orgId=1&from=now-15m&to=now&refresh=5s

Download Dashboard

4- Stop docker-compose

When done, stop the metric stack:

make stop