Skip to content

Metrics aggregation for workflows#501

Description

@Liam-hunter

Hey 馃憢

I have self-hosted GitHub actions runners, deployed the github_exporter am trying to collect metrics on two specific points of interest.

  1. What is the average queue time of jobs in each runner group. I can get that from this exporter with the following expression: avg by(runner_group_name) (github_workflow_job_started_timestamp-github_workflow_job_created_timestamp{runner_group_name!=""})
  2. Which repo's are running the most workflow jobs. I can get that from this exporter with the following expression: topk(10, count by(repo,owner) (github_workflow_job_created_timestamp{runner_group_name="default"}))

However, we are running many workflows/jobs and the cardinality of this data is too much for our prometheus instance. I have tried excluding labels to reduce cardinality however, as the data is reported as individual timestamps I am unable to reduce cardinality enough for prometheus scraping.

I was wondering if it could be possible to do more of this aggregation on the exporter itself?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocsRelated to documentationenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions