From c417bdb102acbceb7703b6b6857db295d78e32f0 Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Tue, 9 Jul 2024 04:59:29 -0400 Subject: [PATCH 1/2] [chore] fix build-images workflow (#1661) * fix build-images workflow * use consistent naming for workflows --- .github/workflows/build-images.yml | 2 +- .github/workflows/checks.yml | 2 +- .../{component_build-images.yml => component-build-images.yml} | 0 .github/workflows/nightly-release.yml | 2 +- .github/workflows/release.yml | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{component_build-images.yml => component-build-images.yml} (100%) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 687dc42232..f91f31103d 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -11,4 +11,4 @@ on: jobs: build_images: if: github.repository == 'open-telemetry/opentelemetry-demo' - uses: ./.github/workflows/component_build_images.yml + uses: ./.github/workflows/component-build-images.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 69512a8dc8..8628f944d6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,7 +11,7 @@ on: jobs: build_images: - uses: ./.github/workflows/component_build-images.yml + uses: ./.github/workflows/component-build-images.yml with: push: false version: 'dev' diff --git a/.github/workflows/component_build-images.yml b/.github/workflows/component-build-images.yml similarity index 100% rename from .github/workflows/component_build-images.yml rename to .github/workflows/component-build-images.yml diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index adbff97e29..7ecd338179 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -9,7 +9,7 @@ on: jobs: build_and_push_images: - uses: ./.github/workflows/component_build-images.yml + uses: ./.github/workflows/component-build-images.yml if: github.repository == 'open-telemetry/opentelemetry-demo' with: push: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e308af817b..4576ba661e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: build_and_push_images: - uses: ./.github/workflows/component_build-images.yml + uses: ./.github/workflows/component-build-images.yml if: github.repository == 'open-telemetry/opentelemetry-demo' with: push: true From a38aa6a55e23d70a213ba34c3c3a81602b463e4a Mon Sep 17 00:00:00 2001 From: Juliano Costa Date: Fri, 12 Jul 2024 20:11:17 +0200 Subject: [PATCH 2/2] Set OTLP receiver endpoint (#1662) * Set OTelCol receiver endpoint * changelog * Apply suggestions from code review Co-authored-by: Roger Coll * Add env vars to collector container --------- Co-authored-by: Roger Coll --- .env | 2 +- CHANGELOG.md | 2 ++ docker-compose-tests_include-override.yml | 5 +++++ docker-compose.minimal.yml | 3 +++ docker-compose.yml | 3 +++ src/otelcollector/otelcol-config.yml | 2 ++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.env b/.env index df84beb707..f316d96050 100644 --- a/.env +++ b/.env @@ -6,7 +6,7 @@ IMAGE_NAME=ghcr.io/open-telemetry/demo DEMO_VERSION=latest # Dependent images -COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.102.1 +COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.104.0 FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.10.2 GRAFANA_IMAGE=grafana/grafana:10.4.3 JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.57 diff --git a/CHANGELOG.md b/CHANGELOG.md index 591d16d361..6b4e29edf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ the release. ([#1634](https://github.com/open-telemetry/opentelemetry-demo/pull/1634)) * [otel-col] Add docker stats receiver ([#1650](https://github.com/open-telemetry/opentelemetry-demo/pull/1650)) +* [otel-col] Set OTLP receiver endpoint to avoid breaking changes + ([#1662](https://github.com/open-telemetry/opentelemetry-demo/pull/1662)) ## 1.10.0 diff --git a/docker-compose-tests_include-override.yml b/docker-compose-tests_include-override.yml index 3fea4d60cc..1a115b663f 100644 --- a/docker-compose-tests_include-override.yml +++ b/docker-compose-tests_include-override.yml @@ -5,6 +5,11 @@ services: otelcol: command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-tracetest.yml" ] + environment: + - ENVOY_PORT + - OTEL_COLLECTOR_HOST + - OTEL_COLLECTOR_PORT_GRPC + - OTEL_COLLECTOR_PORT_HTTP volumes: - ${DOCKER_SOCK}:/var/run/docker.sock:ro - ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index b4925dd742..be766578ad 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -596,6 +596,9 @@ services: logging: *logging environment: - ENVOY_PORT + - OTEL_COLLECTOR_HOST + - OTEL_COLLECTOR_PORT_GRPC + - OTEL_COLLECTOR_PORT_HTTP # Prometheus prometheus: diff --git a/docker-compose.yml b/docker-compose.yml index fba9299ee4..2ea73d55f8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -706,6 +706,9 @@ services: logging: *logging environment: - ENVOY_PORT + - OTEL_COLLECTOR_HOST + - OTEL_COLLECTOR_PORT_GRPC + - OTEL_COLLECTOR_PORT_HTTP # Prometheus prometheus: diff --git a/src/otelcollector/otelcol-config.yml b/src/otelcollector/otelcol-config.yml index 8901737b5c..62b6b481ce 100644 --- a/src/otelcollector/otelcol-config.yml +++ b/src/otelcollector/otelcol-config.yml @@ -5,7 +5,9 @@ receivers: otlp: protocols: grpc: + endpoint: ${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_GRPC} http: + endpoint: ${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_HTTP} cors: allowed_origins: - "http://*"