diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2fdaf1750a8..64bf5dcf91b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -883,3 +883,35 @@ jobs: name: integration-container-logs path: container-logs retention-days: 30 + otel-cicd-action: + if: always() + name: OpenTelemetry Export Trace + runs-on: ubuntu-latest + needs: # must run when all jobs are completed + - build + - check_generated_railjson_sync + - check_railjson_generator + - check_commits + - final_newline_lint + - check_integration_tests + - check_osrd_schema + - check_toml + - check_infra_schema_sync + - check_front_rtk_sync + - check_core + - check_editoast_tests + - check_editoast_lints + - check_editoast_openapi + - check_gateway + - check_front + - integration_tests + steps: + - name: Export workflow + uses: corentinmusard/otel-cicd-action@v1 + with: + otlpEndpoint: grpc://api.honeycomb.io:443/ + # Example value for HONEYCOMB_OTLP_HEADERS: + # x-honeycomb-team=YOUR_API_KEY,x-honeycomb-dataset=YOUR_DATASET + otlpHeaders: ${{ secrets.HONEYCOMB_OTLP_HEADERS }} + githubToken: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/telemetry.yml b/.github/workflows/telemetry.yml index a12b4b524d4..7ac33629ad7 100644 --- a/.github/workflows/telemetry.yml +++ b/.github/workflows/telemetry.yml @@ -1,11 +1,9 @@ name: Export workflow to Honeycomb on: - workflow_run: - workflows: - # The name of the workflow(s) that triggers the export - - "build" - types: [completed] + push: + branches: + - "wsl/ci/ci-telemetry" jobs: otel-export-honeycomb: @@ -20,4 +18,4 @@ jobs: # x-honeycomb-team=YOUR_API_KEY,x-honeycomb-dataset=YOUR_DATASET otlpHeaders: ${{ secrets.HONEYCOMB_OTLP_HEADERS }} githubToken: ${{ secrets.GITHUB_TOKEN }} - runId: ${{ github.event.workflow_run.id }} + runId: ${{ github.run_id }}