A random duration response app to test prometheus exemplar.
- clone code and build app
git clone git@github.com:songjiayang/prometheus-exemplar.git
cd prometheus-exemplar
go mod vendor
docker-compose build- start app
docker-compose up
- stop app
docker-compose down
- use wrk to send requests
wrk -c 2 -d 3000 http://localhost:8080/v1/books
wrk -c 2 -d 3000 http://localhost:8080/v1/books/1
- Query exemplar with prometheus console
- visit
http://localhost:9090/graph - choose
Graphtab - type
histogram_quantile(0.95, rate(http_durations_histogram_seconds_bucket{}[1m]))to the query input text.
- add Prometheus
- create http duration panel
- create log panel with
traceIDvariable
- query with traceID










