- Docker
- Java 8+
- Maven
- VSCode Plugins
- Lombok
- Java Extension
- Docker
- Docker Compose
- From Command Window, login to docker hub
> docker login
- Bring up Kafka , Zookepper & Cassandra containers
> docker-compose up -d
- Create keyspace and table
> docker exec -it cassandra cqlsh
cqlsh> CREATE KEYSPACE reactive WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : '1'};
cqlsh> USE reactive;
cqlsh:reactive> CREATE TABLE item (id int, itemname text, amount text, primary key(id));
cqlsh:reactive> CREATE TABLE message (msgoffset text, message text, offset text, topic text, primary key(msgoffset));
cqlsh:reactive> DESCRIBE TABLE item;
- Install and run Otel Exporters: Zipkin, Jaegar, and AWSXRay
> cd otel-collector
> docker-compose up
> curl -I http://localhost:9411/zipkin/
> curl -I http://localhost:16686
- Run Consume Microservice
> cd consumeMicroService
> mvn install
> export AWS_PROFILE=adfs; OTEL_RESOURCE_ATTRIBUTES=service.name=consume OTEL_EXPORTER=otlp OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:55680 java -javaagent:../otel-collector/opentelemetry-javaagent-all-v1.0.0.jar -jar target/*.jar
- Run Adapter Microservice
> cd itemAdapterMicroService
> mvn install
> export AWS_PROFILE=adfs; OTEL_RESOURCE_ATTRIBUTES=service.name=itemAdapter OTEL_EXPORTER=otlp OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:55680 java -javaagent:../otel-collector/opentelemetry-javaagent-all-v1.0.0.jar -jar target/*.jar
- Run Shopingcart Microservice
> cd shoppingCartService
> mvn install
> export AWS_PROFILE=adfs; OTEL_RESOURCE_ATTRIBUTES=service.name=shoppingCart OTEL_EXPORTER=otlp OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:55680 java -javaagent:../otel-collector/opentelemetry-javaagent-all-v1.0.0.jar -jar target/*.jar
- Invoke Shopingcart Service
> curl http://localhost:9090/shop
- Check traces and metrics!