Skip to content

Spring App tracing and monitoring (Grafana, Zipkin, SBA)

Notifications You must be signed in to change notification settings

bitxon/java-spring-monitoring

Repository files navigation

Java Spring Monitoring

Run

In Kubernetes (skaffold)

  1. Start cluster
    • minikube start
  2. Run apps:
    • skaffold dev (No Grafana yet...)
  3. Run load-test:
    • artillery run artillery-load-test.yml

In Docker

  1. Start containers
    • docker-compose up -d
  2. Run apps:
    • mvn -pl price-service -am spring-boot:run
    • mvn -pl order-service -am spring-boot:run
    • mvn -pl spring-boot-admin -am spring-boot:run
  3. Run load-test:
    • artillery run artillery-load-test.yml

Test

Open - Zipkin
Open - Spring Admin
Open - Prometheus
Open - Grafana

curl --location 'http://localhost:8090/price/iphone' \
--header 'x-request-id: A8j24hu81b33' \
--header 'x-application-id: Web'
curl --location 'http://localhost:8080/order' \
--request POST \
--header 'Content-Type: application/json' \
--header 'x-request-id: Ju439a8o1yr4' \
--header 'x-application-id: Web' \
--data '{
  "productIdentifier": "iphone",
  "productName": "N/A",
  "quantity": 3
}'

Useful Links

Spring Boot Grafana Dashboards
Spring Boot 3 Dashboard file for Grafana
Get Artillery