Skip to content

Commit 764db3a

Browse files
authored
Merge pull request #57 from DataDog/luke/merge-upstream
Merging upstream
2 parents d5add0c + 141744c commit 764db3a

File tree

131 files changed

+8959
-12886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+8959
-12886
lines changed

.env

+20-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11

22

33
# Demo App version
4-
IMAGE_VERSION=1.8.0
4+
IMAGE_VERSION=1.10.0
55
IMAGE_NAME=ghcr.io/open-telemetry/demo
66
DEMO_VERSION=latest
77

88
# Dependent images
9-
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.93.0
10-
GRAFANA_IMAGE=grafana/grafana:10.3.1
11-
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.53
12-
# must also update version field in /src/grafana/provisioning/datasources/opensearch.yml
13-
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.11.1
14-
POSTGRES_IMAGE=postgres:16.1
15-
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.49.1
9+
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.102.1
10+
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.10.2
11+
GRAFANA_IMAGE=grafana/grafana:10.4.3
12+
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.57
13+
# must also update version field in ./src/grafana/provisioning/datasources/opensearch.yml
14+
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.14.0
15+
POSTGRES_IMAGE=postgres:16.3
16+
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.52.0
1617
REDIS_IMAGE=redis:7.2-alpine
17-
TRACETEST_IMAGE_VERSION=v0.15.8
18-
TRACETEST_IMAGE=kubeshop/tracetest:${TRACETEST_IMAGE_VERSION}
18+
# must also update the version arg in ./test/tracetesting/Dockerfile
19+
TRACETEST_IMAGE=kubeshop/tracetest:v1.3.0
1920

2021
# Demo Platform
2122
ENV_PLATFORM=local
@@ -28,7 +29,7 @@ OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_
2829
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:8080/otlp-http/v1/traces
2930

3031
# OpenTelemetry Resource Definitions
31-
OTEL_RESOURCE_ATTRIBUTES="service.namespace=opentelemetry-demo"
32+
OTEL_RESOURCE_ATTRIBUTES=service.namespace=opentelemetry-demo,service.version=${IMAGE_VERSION}
3233

3334
# Metrics Temporality
3435
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative
@@ -56,16 +57,6 @@ CURRENCY_SERVICE_ADDR=currencyservice:${CURRENCY_SERVICE_PORT}
5657
EMAIL_SERVICE_PORT=6060
5758
EMAIL_SERVICE_ADDR=http://emailservice:${EMAIL_SERVICE_PORT}
5859

59-
# Feature Flag Service
60-
FEATURE_FLAG_SERVICE_PORT=8081
61-
FEATURE_FLAG_SERVICE_ADDR=featureflagservice:${FEATURE_FLAG_SERVICE_PORT}
62-
FEATURE_FLAG_SERVICE_HOST=feature-flag-service
63-
FEATURE_FLAG_GRPC_SERVICE_PORT=50053
64-
FEATURE_FLAG_GRPC_SERVICE_ADDR=featureflagservice:${FEATURE_FLAG_GRPC_SERVICE_PORT}
65-
66-
# flagd
67-
FLAGD_HOST=flagd
68-
6960
# Frontend
7061
FRONTEND_PORT=8080
7162
FRONTEND_ADDR=frontend:${FRONTEND_PORT}
@@ -75,6 +66,10 @@ FRONTEND_HOST=frontend
7566
ENVOY_PORT=8080
7667
FRONTEND_PROXY_ADDR=frontend-proxy:${ENVOY_PORT}
7768

69+
# Image Provider
70+
IMAGE_PROVIDER_HOST=imageprovider
71+
IMAGE_PROVIDER_PORT=8081
72+
7873
# Load Generator
7974
LOCUST_WEB_PORT=8089
8075
LOCUST_USERS=10
@@ -106,6 +101,10 @@ SHIPPING_SERVICE_ADDR=shippingservice:${SHIPPING_SERVICE_PORT}
106101
# ******************
107102
# Dependent Services
108103
# ******************
104+
# flagd
105+
FLAGD_HOST=flagd
106+
FLAGD_PORT=8013
107+
109108
# Kafka
110109
KAFKA_SERVICE_PORT=9092
111110
KAFKA_SERVICE_ADDR=kafka:${KAFKA_SERVICE_PORT}

.env.override

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# DO NOT PUSH CHANGES OF THIS FILE TO opentelemetry/opentelemetry-demo
2+
# PLACE YOUR .env ENVIRONMENT VARIABLES OVERRIDES IN THIS FILE

.github/workflows/assign-reviewers.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
jobs:
1414
assign-reviewers:
15+
if: github.repository == 'open-telemetry/opentelemetry-demo'
1516
runs-on: ubuntu-latest
1617
steps:
1718
- uses: dyladan/component-owners@main

.github/workflows/build-images.yml

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
3+
name: Test image generation
34

45
on:
56
push:
67
paths:
78
- 'src/**'
89
- 'test/**'
9-
workflow_call:
10-
inputs:
11-
push:
12-
description: Should the images be pushed
13-
default: false
14-
required: false
15-
type: boolean
16-
version:
17-
description: The version used when tagging the image
18-
default: 'dev'
19-
required: false
20-
type: string
2110

2211
jobs:
2312
build_and_push_images:

.github/workflows/checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build_images:
11-
uses: ./.github/workflows/build-images.yml
11+
uses: ./.github/workflows/component_build-images.yml
1212
with:
1313
push: false
1414
version: 'dev'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
push:
8+
description: Should the images be pushed
9+
default: false
10+
required: false
11+
type: boolean
12+
version:
13+
description: The version used when tagging the image
14+
default: 'dev'
15+
required: false
16+
type: string
17+
dockerhub_repo:
18+
description: Docker Hub repository
19+
default: 'otel/demo'
20+
required: false
21+
type: string
22+
ghcr_repo:
23+
description: GHCR repository
24+
default: 'ghcr.io/open-telemetry/demo'
25+
required: false
26+
type: string
27+
28+
jobs:
29+
build_and_push_images:
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
packages: write
34+
35+
env:
36+
RELEASE_VERSION: "${{ github.event.release.tag_name }}"
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
file_tag:
42+
- file: ./src/accountingservice/Dockerfile
43+
tag_suffix: accountingservice
44+
context: ./
45+
setup-qemu: true
46+
- file: ./src/adservice/Dockerfile
47+
tag_suffix: adservice
48+
context: ./
49+
setup-qemu: true
50+
- file: ./src/cartservice/src/Dockerfile
51+
tag_suffix: cartservice
52+
context: ./
53+
setup-qemu: false
54+
- file: ./src/checkoutservice/Dockerfile
55+
tag_suffix: checkoutservice
56+
context: ./
57+
setup-qemu: true
58+
- file: ./src/currencyservice/Dockerfile
59+
tag_suffix: currencyservice
60+
context: ./
61+
setup-qemu: true
62+
- file: ./src/emailservice/Dockerfile
63+
tag_suffix: emailservice
64+
context: ./src/emailservice
65+
setup-qemu: true
66+
- file: ./src/frauddetectionservice/Dockerfile
67+
tag_suffix: frauddetectionservice
68+
context: ./
69+
setup-qemu: true
70+
- file: ./src/frontend/Dockerfile
71+
tag_suffix: frontend
72+
context: ./
73+
setup-qemu: true
74+
- file: ./src/frontendproxy/Dockerfile
75+
tag_suffix: frontendproxy
76+
context: ./
77+
setup-qemu: true
78+
- file: ./src/frontend/Dockerfile.cypress
79+
tag_suffix: frontend-tests
80+
context: ./
81+
setup-qemu: true
82+
- file: ./src/imageprovider/Dockerfile
83+
tag_suffix: imageprovider
84+
context: ./
85+
setup-qemu: true
86+
- file: ./src/kafka/Dockerfile
87+
tag_suffix: kafka
88+
context: ./
89+
setup-qemu: true
90+
- file: ./src/loadgenerator/Dockerfile
91+
tag_suffix: loadgenerator
92+
context: ./
93+
setup-qemu: true
94+
- file: ./src/paymentservice/Dockerfile
95+
tag_suffix: paymentservice
96+
context: ./
97+
setup-qemu: true
98+
- file: ./src/productcatalogservice/Dockerfile
99+
tag_suffix: productcatalogservice
100+
context: ./
101+
setup-qemu: true
102+
- file: ./src/quoteservice/Dockerfile
103+
tag_suffix: quoteservice
104+
context: ./
105+
setup-qemu: true
106+
- file: ./src/recommendationservice/Dockerfile
107+
tag_suffix: recommendationservice
108+
context: ./
109+
setup-qemu: true
110+
- file: ./src/shippingservice/Dockerfile
111+
tag_suffix: shippingservice
112+
context: ./
113+
setup-qemu: true
114+
- file: ./test/tracetesting/Dockerfile
115+
tag_suffix: traceBasedTests
116+
context: ./
117+
setup-qemu: true
118+
119+
steps:
120+
- uses: actions/checkout@v4
121+
with:
122+
fetch-depth: 0
123+
- name: Check for changes and set push options
124+
id: check_changes
125+
run: |
126+
DOCKERFILE_DIR=$(dirname ${{ matrix.file_tag.file }})
127+
FILES_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- $DOCKERFILE_DIR)
128+
FORCE_PUSH=${{ inputs.push }}
129+
if [ "$FORCE_PUSH" = true ]; then
130+
echo "Force push is enabled, proceeding with build."
131+
echo "skip=false" >> "$GITHUB_OUTPUT"
132+
elif [ -z "$FILES_CHANGED" ]; then
133+
echo "No changes in ${{ matrix.file_tag.context }}, skipping build."
134+
echo "skip=true" >> "$GITHUB_OUTPUT"
135+
else
136+
echo "Changes detected in ${{ matrix.file_tag.context }}, proceeding with build."
137+
echo "skip=false" >> "$GITHUB_OUTPUT"
138+
fi
139+
- name: Log in to the Container registry
140+
uses: docker/login-action@v3
141+
with:
142+
registry: ghcr.io
143+
username: ${{ github.repository_owner }}
144+
password: ${{ secrets.GITHUB_TOKEN }}
145+
if: ${{ inputs.push }}
146+
- name: Log in to Docker Hub
147+
uses: docker/login-action@v3
148+
with:
149+
username: ${{ secrets.DOCKER_USERNAME }}
150+
password: ${{ secrets.DOCKER_PASSWORD }}
151+
if: ${{ inputs.push }}
152+
- name: Set up QEMU
153+
if: ${{ matrix.file_tag.setup-qemu }}
154+
uses: docker/setup-qemu-action@v3
155+
with:
156+
image: tonistiigi/binfmt:master
157+
- name: Set up Docker Buildx
158+
uses: docker/setup-buildx-action@v3
159+
with:
160+
buildkitd-config-inline: |
161+
[worker.oci]
162+
max-parallelism = 2
163+
- name: Matrix Build and push demo images
164+
if: steps.check_changes.outputs.skip == 'false'
165+
uses: docker/build-push-action@v5.4.0
166+
with:
167+
context: ${{ matrix.file_tag.context }}
168+
file: ${{ matrix.file_tag.file }}
169+
platforms: linux/amd64,linux/arm64
170+
push: ${{ inputs.push }}
171+
tags: |
172+
${{ inputs.dockerhub_repo }}:${{ inputs.version }}-${{matrix.file_tag.tag_suffix }}
173+
${{ inputs.dockerhub_repo }}:latest-${{matrix.file_tag.tag_suffix }}
174+
${{ inputs.ghcr_repo }}:${{ inputs.version }}-${{ matrix.file_tag.tag_suffix }}
175+
${{ inputs.ghcr_repo }}:latest-${{ matrix.file_tag.tag_suffix }}
176+
cache-from: type=gha
177+
cache-to: type=gha

.github/workflows/gradle-wrapper-validation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- uses: gradle/wrapper-validation-action@v2.1.1
18+
- uses: gradle/wrapper-validation-action@v3.3.2

.github/workflows/label-pr.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
# adds a label to a pull request if certain files are changed
4+
name: Label Pull Requests
5+
6+
on:
7+
pull_request_target:
8+
types: [opened, synchronize, reopened]
9+
10+
jobs:
11+
label:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pull-requests: write
15+
contents: read
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Check for changed files
21+
id: file_changes
22+
uses: dorny/paths-filter@v2
23+
with:
24+
list-files: shell
25+
filters: |
26+
docsUpdateRequired:
27+
- 'src/flagd/**'
28+
helmUpdateRequired:
29+
- '.env'
30+
- 'docker-compose*.yml'
31+
- 'src/flagd/**'
32+
- 'src/grafana/**'
33+
- 'src/otelcollector/**'
34+
- 'src/prometheus/**'
35+
36+
- name: "Add Label: docs-update-required"
37+
if: steps.file_changes.outputs.docsUpdateRequired == 'true'
38+
uses: actions/github-script@v7
39+
with:
40+
script: |
41+
const issue_number = context.issue.number;
42+
github.rest.issues.addLabels({
43+
issue_number: issue_number,
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
labels: ['docs-update-required']
47+
})
48+
49+
- name: "Add Label: helm-update-required"
50+
if: steps.file_changes.outputs.helmUpdateRequired == 'true'
51+
uses: actions/github-script@v7
52+
with:
53+
script: |
54+
const issue_number = context.issue.number;
55+
github.rest.issues.addLabels({
56+
issue_number: issue_number,
57+
owner: context.repo.owner,
58+
repo: context.repo.repo,
59+
labels: ['helm-update-required']
60+
})

.github/workflows/nightly-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
build_and_push_images:
12-
uses: ./.github/workflows/build-images.yml
12+
uses: ./.github/workflows/component_build-images.yml
1313
if: github.repository == 'open-telemetry/opentelemetry-demo'
1414
with:
1515
push: true

.github/workflows/release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88

99
jobs:
1010
build_and_push_images:
11-
uses: ./.github/workflows/build-images.yml
11+
uses: ./.github/workflows/component_build-images.yml
12+
if: github.repository == 'open-telemetry/opentelemetry-demo'
1213
with:
1314
push: true
1415
version: ${{ github.event.release.tag_name }}

0 commit comments

Comments
 (0)