From d7c258e1649a90fd8df2606fc170b5829140150a Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Wed, 5 Feb 2025 08:51:01 -0500 Subject: [PATCH] Add telemetry (#652) Enables telemetry during CUVS CI runs. This is done by parsing GitHub Actions run log metadata and should have no impact on build or test times. xref rapidsai/build-infra#139 Authors: - Gil Forsyth (https://github.com/gforsyth) Approvers: - Mike Sarahan (https://github.com/msarahan) - Corey J. Nolet (https://github.com/cjnolet) URL: https://github.com/rapidsai/cuvs/pull/652 --- .github/workflows/pr.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index a5981fe1f..233b82f94 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -26,12 +26,23 @@ jobs: - wheel-build-cuvs - wheel-tests-cuvs - devcontainer + - telemetry-setup secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-25.02 if: always() with: needs: ${{ toJSON(needs) }} + telemetry-setup: + continue-on-error: true + runs-on: ubuntu-latest + env: + OTEL_SERVICE_NAME: 'pr-cuvs' + steps: + - name: Telemetry setup + if: ${{ vars.TELEMETRY_ENABLED == 'true' }} + uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main check-nightly-ci: + needs: telemetry-setup # Switch to ubuntu-latest once it defaults to a version of Ubuntu that # provides at least Python 3.11 (see # https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat) @@ -44,6 +55,7 @@ jobs: with: repo: cuvs changed-files: + needs: telemetry-setup secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@branch-25.02 with: @@ -77,10 +89,12 @@ jobs: - '!rust/**' - '!thirdparty/LICENSES/**' checks: + needs: telemetry-setup secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-25.02 with: enable_check_generated_files: false + ignored_pr_jobs: "telemetry-summarize" conda-cpp-build: needs: checks secrets: inherit @@ -162,6 +176,7 @@ jobs: script: ci/test_wheel_cuvs.sh devcontainer: secrets: inherit + needs: telemetry-setup uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-25.02 with: arch: '["amd64"]' @@ -170,3 +185,13 @@ jobs: sccache -z; build-all --verbose; sccache -s; + + telemetry-summarize: + # This job must use a self-hosted runner to record telemetry traces. + runs-on: linux-amd64-cpu4 + needs: pr-builder + if: ${{ vars.TELEMETRY_ENABLED == 'true' && !cancelled() }} + continue-on-error: true + steps: + - name: Telemetry summarize + uses: rapidsai/shared-actions/telemetry-dispatch-summarize@main