From 8a8deb8adbc62841cf9e27656e41dc70631ae082 Mon Sep 17 00:00:00 2001 From: Adam Charrett <73886859+adcharre@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:19:37 +0000 Subject: [PATCH] Add Jaeger to docker compose. (#56) Make it easier to view the Otel trace when developing Terrarium. --- docker-compose.yaml | 26 ++++++++++++++++++-------- docs/opentelemetry.md | 9 +++++++++ 2 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 docs/opentelemetry.md diff --git a/docker-compose.yaml b/docker-compose.yaml index 8e4f794..9db90af 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,7 +8,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50001:3001 networks: @@ -29,7 +29,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50002:3001 networks: @@ -50,7 +50,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50006:3001 networks: @@ -73,7 +73,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50008:3001 networks: @@ -94,7 +94,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50003:3001 networks: @@ -115,7 +115,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50004:3001 networks: @@ -136,7 +136,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50005:3001 networks: @@ -157,7 +157,7 @@ services: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION - - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_ENDPOINT=jaeger:4317 ports: - 50007:3001 networks: @@ -170,6 +170,16 @@ services: - "$AWS_SECRET_ACCESS_KEY" - "--aws-region" - "$AWS_DEFAULT_REGION" + jaeger: + image: jaegertracing/all-in-one:1 + container_name: jaeger + ports: + - 16686:16686 + - 4317:4317 + - 4318:4318 + networks: + - terrarium + networks: terrarium: name: terrarium diff --git a/docs/opentelemetry.md b/docs/opentelemetry.md new file mode 100644 index 0000000..c7db58c --- /dev/null +++ b/docs/opentelemetry.md @@ -0,0 +1,9 @@ +# OpenTelemetry +Terrarium is instrumented with OpenTelemetry to allow monitoring of the operations for diagnosing problems and collecting information on usage. +For more information on OpenTelemetry see [here](https://opentelemetry.io/). + +The docker compose file includes, for development a [Jaeger](https://www.jaegertracing.io/) all-in-one container to allow you to monitor traces. +To access the Jaeger UI goto http://localhost:16686 + +The jaeger container also exposes port 4317 (OTLP grpc) and 4318 (OTLP http) to the host to make it easy to push traces +into Jaeger when you're developing/debugging outside the docker network. \ No newline at end of file