From b8e36d40fef5daeda074b02ce0320bc1aa037a8b Mon Sep 17 00:00:00 2001 From: Mikko Viitanen <74129181+mviitane@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:53:19 +0200 Subject: [PATCH] Align env variables for OTLP ports (#1353) * Align env variables for OTLP ports. No functional changes. * Add CHANGELOG --------- Co-authored-by: Juliano Costa --- CHANGELOG.md | 2 ++ docker-compose.minimal.yml | 12 ++++++------ docker-compose.yml | 12 ++++++------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54e62b9e35..0ca90faf9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,8 @@ the release. ([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352)) * [kafka] Major version update for Java instrumentation, version 2.0.0 ([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352)) +* Align env variables for OTLP ports + ([#1353](https://github.com/open-telemetry/opentelemetry-demo/pull/1353)) ## 1.7.2 diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index 850a1876ba..a76e1bf606 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -166,7 +166,7 @@ services: environment: - APP_ENV=production - EMAIL_SERVICE_PORT - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}/v1/traces - OTEL_RESOURCE_ATTRIBUTES - OTEL_SERVICE_NAME=emailservice depends_on: @@ -371,7 +371,7 @@ services: ports: - "${QUOTE_SERVICE_PORT}" environment: - - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 + - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP} - OTEL_PHP_AUTOLOAD_ENABLED=true - QUOTE_SERVICE_PORT - OTEL_RESOURCE_ATTRIBUTES @@ -433,7 +433,7 @@ services: environment: - SHIPPING_SERVICE_PORT - QUOTE_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_GRPC}/v1/traces - OTEL_RESOURCE_ATTRIBUTES - OTEL_SERVICE_NAME=shippingservice depends_on: @@ -479,7 +479,7 @@ services: restart: unless-stopped ports: - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port + - "${OTEL_COLLECTOR_PORT_GRPC}" environment: - METRICS_STORAGE_TYPE=prometheus logging: *logging @@ -515,8 +515,8 @@ services: - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml ports: - - "4317" # OTLP over gRPC receiver - - "4318" # OTLP over HTTP receiver + - "${OTEL_COLLECTOR_PORT_GRPC}" + - "${OTEL_COLLECTOR_PORT_HTTP}" depends_on: - jaeger logging: *logging diff --git a/docker-compose.yml b/docker-compose.yml index 06ff382461..684f4715ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -197,7 +197,7 @@ services: environment: - APP_ENV=production - EMAIL_SERVICE_PORT - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}/v1/traces - OTEL_RESOURCE_ATTRIBUTES - OTEL_SERVICE_NAME=emailservice depends_on: @@ -465,7 +465,7 @@ services: ports: - "${QUOTE_SERVICE_PORT}" environment: - - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 + - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP} - OTEL_PHP_AUTOLOAD_ENABLED=true - QUOTE_SERVICE_PORT - OTEL_RESOURCE_ATTRIBUTES @@ -530,7 +530,7 @@ services: environment: - SHIPPING_SERVICE_PORT - QUOTE_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_GRPC}/v1/traces - OTEL_RESOURCE_ATTRIBUTES - OTEL_SERVICE_NAME=shippingservice depends_on: @@ -632,7 +632,7 @@ services: restart: unless-stopped ports: - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port + - "${OTEL_COLLECTOR_PORT_GRPC}" environment: - METRICS_STORAGE_TYPE=prometheus logging: *logging @@ -668,8 +668,8 @@ services: - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml ports: - - "4317" # OTLP over gRPC receiver - - "4318" # OTLP over HTTP receiver + - "${OTEL_COLLECTOR_PORT_GRPC}" + - "${OTEL_COLLECTOR_PORT_HTTP}" depends_on: - jaeger logging: *logging