跳到主要内容

Prometheus metrics

Run prometheus

window users need to change the layotto in prometheus.yml to 'docker.for.windows.localhost:34903'

cd ${project_path}/demo/prometheus

docker-compose -f prometheus-docker-compose.yaml up -d

Run layotto

A layotto server can be started as follows.

cd ${project_path}/cmd/layotto

Build it:

go build -o layotto

Run it:

./layotto start -c ../../configs/config_standalone.json

Run Demo

The corresponding call-side code is in client.go, and running it calls layotto's SayHello interface.

 cd ${project_path}/demo/flowcontrol/

Build the demo client:

 go build -o client

Run the demo client:

 ./client

Access http://127.0.0.1:9090/graph?g0.expr=grpc_request_total

Release resources

cd ${project_path}/demo/prometheus

docker-compose -f prometheus-docker-compose.yaml down