fix(telemetry): nest product errors in app-started payload #605
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Development" | |
| on: [pull_request, workflow_dispatch, workflow_call] | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-22.04-arm | |
| container: | |
| image: datadog/docker-library:dd-trace-cpp-ci-23768e9-arm64 | |
| env: | |
| BUILD_DIR: .build | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Check format | |
| run: bin/check-format | |
| - name: Shellcheck | |
| run: find bin/ -executable -type f -print0 | xargs -0 shellcheck | |
| - name: Verify getenv usage | |
| run: bin/check-environment-variables | |
| - name: Configure | |
| run: bin/with-toolchain llvm cmake . -B ${BUILD_DIR} --preset ci-clang | |
| - name: Build | |
| run: cmake --build ${BUILD_DIR} -j --target config-inversion -v | |
| - name: Verify supported configurations metadata | |
| run: | | |
| tmp_dir="$(mktemp -d)" | |
| trap 'rm -rf "$tmp_dir"' EXIT | |
| ./${BUILD_DIR}/tools/config-inversion/config-inversion --output-file "${tmp_dir}/ci-supported-configurations.json" | |
| if ! diff -q "$tmp_dir/ci-supported-configurations.json" "supported-configurations.json" >/dev/null 2>&1; then | |
| echo "ERROR: supported-configurations.json got out of sync with implemented configurations. Please run `./config-inversion --output-file supported-configurations.json` locally." | |
| diff -u "$tmp_dir/supported-configurations.json" supported-configurations.json || true | |
| exit 1 | |
| fi | |
| build-linux-cmake: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: ["gnu", "llvm"] | |
| arch: ["arm64", "x64"] | |
| include: | |
| - runner: ubuntu-22.04-arm | |
| arch: arm64 | |
| docker-arch: arm64 | |
| - runner: ubuntu-22.04 | |
| arch: x64 | |
| docker-arch: amd64 | |
| needs: verify | |
| runs-on: ${{ matrix.runner }} | |
| container: | |
| image: datadog/docker-library:dd-trace-cpp-ci-23768e9-${{matrix.docker-arch}} | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| env: | |
| BUILD_DIR: .build | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Configure | |
| run: bin/with-toolchain ${{ matrix.toolchain }} cmake . -B .build --preset ci-clang | |
| - name: Build | |
| run: cmake --build ${BUILD_DIR} -j -v | |
| - name: Test | |
| run: cd ${BUILD_DIR} && test/tests -r junit -o report.xml | |
| env: | |
| ASAN_OPTIONS: alloc_dealloc_mismatch=0 | |
| - name: Get Datadog credentials | |
| if: ${{ !cancelled() && github.event_name != 'pull_request' }} | |
| uses: ./.github/actions/dd-sts-credentials | |
| id: dd-sts-credentials | |
| - name: Upload test report to Datadog | |
| if: ${{ !cancelled() && steps.dd-sts-credentials.outcome == 'success' }} | |
| env: | |
| DD_API_KEY: ${{ steps.dd-sts-credentials.outputs.api_key }} | |
| run: | | |
| curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-${{ matrix.arch }}" --output "/usr/local/bin/datadog-ci" && chmod +x /usr/local/bin/datadog-ci | |
| datadog-ci junit upload --service dd-trace-cpp --tags test.source.file:test/*.cpp .build/report.xml | |
| build-linux-bazel: | |
| needs: verify | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: ["gnu", "llvm"] | |
| arch: ["arm64", "x64"] | |
| bazelrc: [".bazelrc.absl", ".bazelrc.std"] | |
| include: | |
| - runner: ubuntu-22.04-arm | |
| arch: arm64 | |
| docker-arch: arm64 | |
| - runner: ubuntu-22.04 | |
| arch: x64 | |
| docker-arch: amd64 | |
| runs-on: ${{ matrix.runner }} | |
| container: | |
| image: datadog/docker-library:dd-trace-cpp-ci-23768e9-${{matrix.docker-arch}} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Build | |
| run: bin/with-toolchain ${{ matrix.toolchain }} bazelisk --bazelrc=${{ matrix.bazelrc }} build dd_trace_cpp | |
| build-windows-bazel: | |
| needs: verify | |
| runs-on: windows-2022 | |
| defaults: | |
| run: | |
| shell: powershell | |
| strategy: | |
| matrix: | |
| bazelrc: [".bazelrc.absl", ".bazelrc.std"] | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Dependency Manager (scoop) | |
| run: | | |
| Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
| Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |
| Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH | |
| - name: Install Dependencies | |
| run: scoop install main/cmake@4.0.1 main/ninja main/bazelisk | |
| - name: Build | |
| run: bazelisk.exe --bazelrc=${{ matrix.bazelrc }} build dd_trace_cpp | |
| build-windows-cmake: | |
| needs: verify | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: ["arm64", "amd64"] | |
| include: | |
| - runner: windows-11-arm | |
| arch: arm64 | |
| - runner: windows-2022 | |
| arch: amd64 | |
| runs-on: ${{ matrix.runner }} | |
| defaults: | |
| run: | |
| shell: powershell | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Dependency Manager (scoop) | |
| run: | | |
| Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
| Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |
| Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH | |
| - name: Install Dependencies | |
| run: scoop install main/cmake@4.0.1 main/ninja | |
| - name: Build | |
| run: | | |
| & 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\Launch-VsDevShell.ps1' -arch ${{ matrix.arch }} | |
| cmake --preset=ci-msvc -B build -DCMAKE_BUILD_TYPE=Debug . | |
| cmake --build build -j $env:MAKE_JOB_COUNT -v | |
| - name: Test | |
| run: | | |
| & 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\Launch-VsDevShell.ps1' -arch ${{ matrix.arch }} | |
| .\build\test\tests.exe -r junit -o report.xml | |
| - name: Get Datadog credentials | |
| if: ${{ !cancelled() && github.event_name != 'pull_request' }} | |
| uses: ./.github/actions/dd-sts-credentials | |
| id: dd-sts-credentials | |
| - name: Upload test report to Datadog | |
| if: ${{ !cancelled() && steps.dd-sts-credentials.outcome == 'success' }} | |
| env: | |
| DD_API_KEY: ${{ steps.dd-sts-credentials.outputs.api_key }} | |
| run: | | |
| Invoke-WebRequest -Uri "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_win-x64" -OutFile "datadog-ci.exe" | |
| ./datadog-ci.exe junit upload --service dd-trace-cpp --tags test.source.file:test/*.cpp report.xml | |
| coverage: | |
| needs: build-linux-cmake | |
| runs-on: ubuntu-22.04-arm | |
| container: | |
| image: datadog/docker-library:dd-trace-cpp-ci-23768e9-arm64 | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: bin/test --coverage --verbose | |
| - name: Get Datadog credentials | |
| if: success() && github.event_name != 'pull_request' | |
| uses: ./.github/actions/dd-sts-credentials | |
| id: dd-sts-credentials | |
| - name: Upload code coverage report to Datadog | |
| if: success() && steps.dd-sts-credentials.outcome == 'success' | |
| uses: DataDog/coverage-upload-github-action@d9548b1c3c4ab639d5d3ab29a1508af188975f77 # v1.0.5 | |
| with: | |
| api_key: ${{ steps.dd-sts-credentials.outputs.api_key }} | |
| files: .coverage/filtered.info | |
| format: lcov | |
| build-system-tests-artifact: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - run: mkdir binaries | |
| - run: echo "https://github.com/DataDog/dd-trace-cpp@${BRANCH_NAME}" > binaries/cpp-load-from-git | |
| env: | |
| BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
| - name: Save artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: system_tests_binaries | |
| path: ./binaries/**/* | |
| system-tests: | |
| needs: build-system-tests-artifact | |
| uses: DataDog/system-tests/.github/workflows/system-tests.yml@main | |
| permissions: | |
| contents: read | |
| id-token: write | |
| with: | |
| library: cpp | |
| binaries_artifact: system_tests_binaries | |
| parametric_job_count: 8 # dedicated parameter to speed up parametric job | |
| scenarios: PARAMETRIC | |
| push_to_test_optimization: true |