ecourreges-orange / otel-demo

OpenTelemetry demo involving multiple microservices and Jaeger tracing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

otel-demo

OpenTelemetry auto-instrumentation demo. It features a microservices-based travel app and Jaeger running inside a Docker Compose environment.

Blog post: Auto-instrumentation with OpenTelemetry

Windows setup

Do the following from an elevated command shell:

  1. Install the Chocolatey package manager.
  2. Install OpenJDK: choco install openjdk.
  3. Install Make: choco install make.
  4. Install Docker Desktop for Windows: choco install docker-desktop. There's some setup, too:
    • You'll need to decide whether you want to use WSL 2 (Linux) or else Hyper-V as a Docker backend. I recommend WSL 2, as it has better performance. Either way, you'll need to restart your computer.
    • If you chose Hyper-V, go to Docker Desktop > Settings > Resources, and give yourself 8 GB of memory.
  5. Optional: If you want to play around with the app itself, install Visual Studio Code: choco install vscode. Include Java support, and install the Docker and Lombok extensions too. The Docker extension will make it easier to view container logs and shell into containers.

Build

From the top of the project directory, build the app and the Docker images using a single command:

$ make

Run

To start up all the containers, it's just:

$ docker-compose up

Endpoints

To try it out, just hit the sample app UI a few times, and then look at the traces in Jaeger.

OpenTelemetry vs spring sleuth bench

This version has the UI and jaeger disabled to save RAM and avoid swapping

Choose to activate OTEL or SLEUTH in docker-compose.yml
docker-compose up

In another terminal launch the test, it lasts 1 minute:
jmeter -n -t perftest.jmx

Get requests per minute and avg rtt in ms:
wc -l out.jtl &&awk -F, '{ total += $2; count++ } END { print total/count }' out.jtl

About

OpenTelemetry demo involving multiple microservices and Jaeger tracing


Languages

Language:Java 46.7%Language:Makefile 22.2%Language:Shell 17.0%Language:Dockerfile 9.5%Language:HTML 4.3%Language:CSS 0.3%