diff --git a/.github/actions/setup-tracing/action.yml b/.github/actions/setup-tracing/action.yml index b23b594c02..b387b52b9b 100644 --- a/.github/actions/setup-tracing/action.yml +++ b/.github/actions/setup-tracing/action.yml @@ -6,6 +6,8 @@ runs: steps: - run: | set -e + # Jaeger is set up on Windows through an inline run step. If you update Jaeger here, don't forget to update + # the version set in .github/workflows/.windows.yml. 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}" diff --git a/.github/workflows/.windows.yml b/.github/workflows/.windows.yml index 895e81d505..b618033e95 100644 --- a/.github/workflows/.windows.yml +++ b/.github/workflows/.windows.yml @@ -271,6 +271,15 @@ jobs: uses: actions/checkout@v3 with: path: ${{ env.GOPATH }}/src/github.com/docker/docker + - + run: | + # Jaeger is set up on Linux through the setup-tracing action. If you update Jaeger here, don't forget to + # update the version set in .github/actions/setup-tracing/action.yml. + Invoke-WebRequest -Uri "https://github.com/jaegertracing/jaeger/releases/download/v1.46.0/jaeger-1.46.0-windows-amd64.tar.gz" -OutFile ".\jaeger-1.46.0-windows-amd64.tar.gz" + tar -zxvf ".\jaeger-1.46.0-windows-amd64.tar.gz" + Start-Process '.\jaeger-1.46.0-windows-amd64\jaeger-all-in-one.exe' + echo "OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append + shell: pwsh - name: Env run: | @@ -464,6 +473,13 @@ jobs: Sort-Object @{Expression="TimeCreated";Descending=$false} | ForEach-Object {"$($_.TimeCreated.ToUniversalTime().ToString("o")) [$($_.LevelDisplayName)] $($_.Message)"} | Tee-Object -file ".\bundles\daemon.log" + - + name: Download Jaeger traces + if: always() + run: | + Invoke-WebRequest ` + -Uri "http://127.0.0.1:16686/api/traces?service=integration-test-client" ` + -OutFile ".\bundles\jaeger-trace.json" - name: Upload reports if: always()