diff --git a/.github/actions/setup-runner/action.yml b/.github/actions/setup-runner/action.yml index 0c730ca813..dfb1cffaae 100644 --- a/.github/actions/setup-runner/action.yml +++ b/.github/actions/setup-runner/action.yml @@ -25,3 +25,12 @@ runs: - run: | docker info shell: bash + # TODO: Remove this step once the separate action is merged + # Github doesn't let you add a composite action and use it in the same PR (apparently) + # Ref: https://github.com/moby/moby/actions/runs/5581571995/jobs/10199909170?pr=45652#step:9:1 + - run: | + set -e + docker run -d --net=host --name jaeger -e COLLECTOR_OTLP_ENABLED=true jaegertracing/all-in-one:1.46 + docker0_ip="$(ip -f inet addr show docker0 | grep -Po 'inet \K[\d.]+')" + echo "OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318" >> "${GITHUB_ENV}" + shell: bash diff --git a/.github/actions/setup-tracing/action.yml b/.github/actions/setup-tracing/action.yml new file mode 100644 index 0000000000..b23b594c02 --- /dev/null +++ b/.github/actions/setup-tracing/action.yml @@ -0,0 +1,12 @@ +name: 'Setup Tracing' +description: 'Composite action to set up the tracing for test jobs' + +runs: + using: composite + steps: + - run: | + set -e + docker run -d --net=host --name jaeger -e COLLECTOR_OTLP_ENABLED=true jaegertracing/all-in-one:1.46 + docker0_ip="$(ip -f inet addr show docker0 | grep -Po 'inet \K[\d.]+')" + echo "OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318" >> "${GITHUB_ENV}" + shell: bash diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98ed19f067..fd8b1e0e4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -226,6 +226,8 @@ jobs: tar -xzf /tmp/reports.tar.gz -C /tmp/reports sudo chown -R $(id -u):$(id -g) /tmp/reports tree -nh /tmp/reports + + curl -sSLf localhost:16686/api/traces?service=integration-test-client > /tmp/reports/jaeger-trace.json - name: Test daemon logs if: always() @@ -333,6 +335,8 @@ jobs: tar -xzf /tmp/reports.tar.gz -C $reportsPath sudo chown -R $(id -u):$(id -g) $reportsPath tree -nh $reportsPath + + curl -sSLf localhost:16686/api/traces?service=integration-test-client > $reportsPath/jaeger-trace.json - name: Send to Codecov uses: codecov/codecov-action@v3 @@ -462,6 +466,8 @@ jobs: tar -xzf /tmp/reports.tar.gz -C $reportsPath sudo chown -R $(id -u):$(id -g) $reportsPath tree -nh $reportsPath + + curl -sSLf localhost:16686/api/traces?service=integration-test-client > $reportsPath/jaeger-trace.json - name: Send to Codecov uses: codecov/codecov-action@v3