Skip to content

Commit 95b2963

Browse files
committed
Auto merge of #125771 - Kobzol:ci-datadog-metrics, r=<try>
[CI] Upload CI metrics to DataDog This PR tests integration of Datadog CI custom metrics. My goal is to take various useful statistics (like the duration of stage 1 build, stage 2 build, and test execution) that we already gather into `metrics.json` and upload them as [custom metrics](https://docs.datadoghq.com/continuous_integration/pipelines/custom_commands/) into Datadog, so that we can observe job duration on a more granular level. r? `@jdno`
2 parents 99cb42c + ddae1fa commit 95b2963

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,16 @@ jobs:
218218
# erroring about invalid credentials instead.
219219
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
220220

221+
- name: Upload Datadog metrics
222+
if: needs.calculate_matrix.outputs.run_type == 'try'
223+
env:
224+
DATADOG_SITE: datadoghq.com
225+
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
226+
DD_GITHUB_JOB_NAME: ${{ matrix.name }}
227+
run: |
228+
npm install -g @datadog/datadog-ci
229+
datadog-ci measure --level job --measures "build-duration-test:100"
230+
221231
# This job isused to tell bors the final status of the build, as there is no practical way to detect
222232
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
223233
outcome:

src/ci/github-actions/jobs.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ pr:
8989
# These jobs automatically inherit envs.try, to avoid repeating
9090
# it in each job definition.
9191
try:
92-
- image: dist-x86_64-linux
93-
env:
94-
CODEGEN_BACKENDS: llvm,cranelift
95-
<<: *job-linux-16c
92+
- image: mingw-check-tidy
93+
<<: *job-linux-4c
94+
# - image: dist-x86_64-linux
95+
# env:
96+
# CODEGEN_BACKENDS: llvm,cranelift
97+
# <<: *job-linux-16c
9698

9799
# Main CI jobs that have to be green to merge a commit into master
98100
# These jobs automatically inherit envs.auto, to avoid repeating

0 commit comments

Comments
 (0)