Skip to content

Commit

Permalink
feat: add conclusion label to generated metrics (#165)
Browse files Browse the repository at this point in the history
* feat: add conclusion label to generated metrics

* push to GAR

* Add aborted job status (#166)

* make generate

* Remove parentheses

* Add more job conclusions

* add basic logging for debugging

* add run_id, id, name & workflow_name to log

* rename metric

* Fix tests

* Revert "push to GAR"

This reverts commit 1f12b1a.

---------

Co-authored-by: dsotirakis <[email protected]>
  • Loading branch information
Elfo404 and dsotirakis authored Nov 19, 2024
1 parent f796444 commit 4c33125
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 62 deletions.
5 changes: 3 additions & 2 deletions receiver/githubactionsreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metrics:
enabled: false
```
### workflow_jobs_total
### workflow.jobs.count
Number of jobs.
Expand All @@ -26,4 +26,5 @@ Number of jobs.
| ---- | ----------- | ------ |
| vcs.repository.name | Repository name | Any Str |
| ci.github.workflow.job.labels | Job labels. | Any Str |
| ci.github.workflow.job.status | Job status | Str: ``completed``, ``in_progress``, ``queued``, ``waiting`` |
| ci.github.workflow.job.status | Job status | Str: ``completed``, ``in_progress``, ``queued``, ``waiting``, ``aborted`` |
| ci.github.workflow.job.conclusion | Job Conclusion | Str: ``success``, ``failure``, ``cancelled``, ``neutral``, ``null``, ``skipped``, ``timed_out``, ``action_required`` |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
default:
all_set:
metrics:
workflow_jobs_total:
workflow.jobs.count:
enabled: true
none_set:
metrics:
workflow_jobs_total:
workflow.jobs.count:
enabled: false
16 changes: 15 additions & 1 deletion receiver/githubactionsreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,23 @@ attributes:
- in_progress
- queued
- waiting
- aborted
type: string
ci.github.workflow.job.conclusion:
description: Job Conclusion
enum:
- success
- failure
- cancelled
- neutral
- "null"
- skipped
- timed_out
- action_required
type: string

metrics:
workflow_jobs_total:
workflow.jobs.count:
enabled: true
description: Number of jobs.
unit: "{job}"
Expand All @@ -44,4 +57,5 @@ metrics:
vcs.repository.name,
ci.github.workflow.job.labels,
ci.github.workflow.job.status,
ci.github.workflow.job.conclusion,
]
Loading

0 comments on commit 4c33125

Please sign in to comment.