Skip to content

mhalbritter/spring-boot-and-opentelemetry

Repository files navigation

Spring Boot and OpenTelemetry

This project showcases the OpenTelemetry integration in Spring Boot.

Preparation

docker compose up

Start services

Start all three services: user-service, greeting-service and hello-service.

Call hello-service

curl localhost:8080/api/1

You can request different users:

curl localhost:8080/api/2

or

curl localhost:8080/api/3

You can also request the greeting in different languages:

curl -H "Accept-Language: de" localhost:8080/api/1

It knows about English, German and Spanish.

Observability signals

The applications are configured to send logs, metrics and traces to the Grafana LGTM stack, which is running in Docker Compose.

Architecture

user-service knows the users, greeting-service knows the greetings. hello-service calls the user-service to get the user for a given id, then calls the greeting-service to get the greeting for a given locale, then combines the two to create a greeting and returns it.

About

Showcase of Spring Boot using OpenTelemetry

Resources

Stars

Watchers

Forks

Contributors

Languages