ci: Setup otel tracing for windows integration tests
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
670bc0a46c
commit
5a83bebf76
2 changed files with 18 additions and 0 deletions
2
.github/actions/setup-tracing/action.yml
vendored
2
.github/actions/setup-tracing/action.yml
vendored
|
@ -6,6 +6,8 @@ runs:
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
set -e
|
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
|
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.]+')"
|
docker0_ip="$(ip -f inet addr show docker0 | grep -Po 'inet \K[\d.]+')"
|
||||||
echo "OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318" >> "${GITHUB_ENV}"
|
echo "OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318" >> "${GITHUB_ENV}"
|
||||||
|
|
16
.github/workflows/.windows.yml
vendored
16
.github/workflows/.windows.yml
vendored
|
@ -271,6 +271,15 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ env.GOPATH }}/src/github.com/docker/docker
|
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
|
name: Env
|
||||||
run: |
|
run: |
|
||||||
|
@ -464,6 +473,13 @@ jobs:
|
||||||
Sort-Object @{Expression="TimeCreated";Descending=$false} |
|
Sort-Object @{Expression="TimeCreated";Descending=$false} |
|
||||||
ForEach-Object {"$($_.TimeCreated.ToUniversalTime().ToString("o")) [$($_.LevelDisplayName)] $($_.Message)"} |
|
ForEach-Object {"$($_.TimeCreated.ToUniversalTime().ToString("o")) [$($_.LevelDisplayName)] $($_.Message)"} |
|
||||||
Tee-Object -file ".\bundles\daemon.log"
|
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
|
name: Upload reports
|
||||||
if: always()
|
if: always()
|
||||||
|
|
Loading…
Reference in a new issue