This repo shows how to use annotations on method level to create spans and export the traces to see the Distributed tracing for End to End transaction. Uses AspectJ features to create traces for the methods applied with Annotations.
Creates new trace spans and makes the span as current span.
Adds spans to current context and makes the span as current span.
Adds spans as child span to current context.
- Docker
- JAVA 8
- Maven
To run the demo, switch to the docker directory and run(Windows machine, Haven't tried in MAC or Linux):
docker compose up -dThe demo exposes the following backends:
- Jaeger at http://localhost:16686
- Zipkin at http://localhost:9411
- Prometheus at http://localhost:9090
- Kibana at http://localhost:5601
To run java application, navigate to root of the project and open command prompt to run command:
mvn packageThe target folder will be generated upon succesfull build. Run the jar file:
java -jar opentelemetry-annotations-0.0.1-SNAPSHOT-jar-with-dependencies.jarTraces should be exported to Zipkin, Jaeger and Elastic (Kibana)..
To clean up any docker container from the demo run docker compose down from
this directory.