Skip to content

A random duration response app to test prometheus exemplar.

Notifications You must be signed in to change notification settings

GlqEason/prometheus-exemplar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prometheus-exemplar

A random duration response app to test prometheus exemplar.

Installation

  1. clone code and build app
git clone [email protected]:songjiayang/prometheus-exemplar.git
cd prometheus-exemplar
go mod vendor
docker-compose build
  1. start app
docker-compose up
  1. stop app
docker-compose down

How to test

  1. 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
  1. Query exemplar with prometheus console
  • visit http://localhost:9090/graph
  • choose Graph tab
  • type histogram_quantile(0.95, rate(http_durations_histogram_seconds_bucket{}[1m])) to the query input text.

image

All in one with Grafana

Add data sources

  • add Prometheus

image

  • add Jaeger image

  • add Loki with Derived fields

image

image

Create dashboard

  • create http duration panel

image

  • create log panel with traceID variable

image

image

Query with traceID

  • query with traceID

image

  • jump to jaeger trace view image

  • spit view with loki and jaeger

image

About

A random duration response app to test prometheus exemplar.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.3%
  • Dockerfile 1.7%