Repository navigation
fix: label job histograms with job_name and the workflow's own name - #30
Merged
Merged
Conversation
Prometheus owns the job label (the scrape job), so the histograms' job label
arrived as exported_job and every dashboard row read github-actions-exporter.
Rename it to job_name.
Dependabot titles each run ("npm_and_yarn in / - Update #123") and the run's
name field carries that title, so every Dependabot run made new series. Take
the workflow label from the workflow list by ID instead, falling back to the
run's name only for a workflow no longer active.
The dashboard groups by job_name and drops NaN rows and empty legend entries
for jobs with no runs in the selected window.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two labelling bugs in the 1.2.0 job metrics, found from the live dashboard:
jobcollides with Prometheus's ownjoblabel (the scrape job). Prometheus stores ours asexported_job, so every "job" on the dashboard readgithub-actions-exporter, and the per-job table and legends grouped by the scrape job. The label is nowjob_name.workflowvalue each run. A run'snamefield carries Dependabot's per-run title (github_actions in /. - Update #1608293638), which creates new series every run; there were already 8 such values. The label now comes from the workflow list by ID, givingDependabot Updates, the same name the CI Health table uses. The run's own name is only used for a workflow that is no longer active.Dashboard:
job_name;>= 0, which drops NaN rows and empty legend entries for jobs with no runs in the selected window but keeps real 0s;> 0.README: the label table, the example PromQL and a note on both labels are updated.
Migration: any hand-written query using
exported_jobon these metrics needsjob_name. The old series age out of Prometheus.go test -race ./...passes, including a new test for the Dependabot naming. All 29 dashboard queries passpromtool check.