Skip to content

candyleer/jaeger-java-hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jaeger-java-hello-world

simple example for jaeger tracing system, easy to understand, easy to develop

this project is an example for jaeger project which implement opentracing some basic concepts you may learn from here .

this is a custom code to trace for current example ,after learning about this,you may want to do the tracing by don't modify this business code,which means instrument quietly,this will be done in project jaeger-java-agent in the future.

Why this project exist?

when i know about jaeger, i have many question by how to start,how to understand these concepts in opentracing and jaeger i remember that i follow the nodejs code to start the java code. so i want to create these example to instruct some guys who need.

Steps:

  • download the jaeger environment by run docker command:
docker run -d -e \
  COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
  -p 5775:5775/udp \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 5778:5778 \
  -p 16686:16686 \
  -p 14268:14268 \
  -p 9411:9411 \
  jaegertracing/all-in-one:latest

this all-in-one docker will start three core component.jaeger-agent,jaeger-collector,jaeger-query visit the web page by http://localhost:16686

  • clone this project and run jaeger-demo-a and jaeger-demo-b by
 git clone https://github.com/candyleer/jaeger-java-hello-world.git
 
 cd jaeger-demo-a && mvn spring-boot:run

and start a new terminal to start jaeger-demo-b

 cd jaeger-demo-b && mvn spring-boot:run
  • curl this url to generate trace info
curl http://localhost:8080/a/hello
  • then visit http://localhost:16686 you will find some trace has been generated like this. example dag

About

simple example for jaeger tracing system, easy to understand, easy to develop

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published