Files
getting-started/spring-cloud/tracing
dzkaiten b070b3376b Spring Cloud Tracing Demo Fixes (#188)
* Spring Cloud Tracing Demo Fixes

* Update docker-compose.yml
2022-07-15 06:37:56 +10:00
..
2021-11-25 20:43:09 +11:00
2021-12-26 17:50:50 +11:00
2021-11-25 20:43:09 +11:00
2021-11-25 20:43:09 +11:00
2021-12-26 17:50:50 +11:00
2022-01-09 07:18:38 +11:00

Tracing with Spring Cloud Sleuth, OpenTelemetry and Logz.io

  • run ./mvnw clean install to build the two Spring Boot applications (api-service and customer-service)
  • run LOGZIO_REGION=<YOUR_LOGZIO_REGION> LOGZIO_TRACES_TOKEN=<YOUR_LOGZIO_TRACING_TOKEN> docker-compose up --build
  • call http://localhost:8080/customers/<ID> (where ID is a number from 1 to 50)

The above HTTP call goes to the api-service, which will call the customer-service for additional information. This will create a trace across both services, as should be evident in the logs with the same trace id.

The docker-compose command also starts up an OpenTelemetry Collector, to which the Spring Boot apps send their traces. The OpenTelemetry Collector, in turn, sends the traces to Logz.io.

Companion Article

Tracing with Spring Boot, OpenTelemetry, and Jaeger