Skip to content

Support identifying referenced workflows and unique workflow runs #40944

Open
@astendal

Description

@astendal

Component(s)

receiver/github

Is your feature request related to a problem? Please describe.

At my enterprise, we maintain centralized reusable workflows. I would like to track usage of these workflows using traces produced by the githbureceiver.

Describe the solution you'd like

I would need two enhancements to achieve what I'm looking for:

1. To identify use of reusable workflows, the githubreceiver could ingest workflow_run.referenced_workflows and make that information available in the traces.

2. To identify unique workflow runs, the githubreceiver could ingest workflow_run.id which is unique for each workflow run within a given repository.

Alternatively, workflow_run.workflow_id, workflow_run.run_number, and the already implemented workflow_run.run_attempt can be similarly used in conjunction to identify unique workflow runs.

If all of the aforementioned fields are ingested, this would provide the greatest flexibility for identifying workflow runs.

Describe alternatives you've considered

I've considered instrumenting a custom observability solution in my reusable workflows.

Additional context

Here is an example of the referenced_workflows object in the workflow run webhook payload:

{
  "action: "completed",
  "workflow_run": { 
    ...
    "referenced_workflows": [
      {
        "path": "org/repo/.github/workflows/workflow-a.yml@v3",
        "sha": "a3b1c2d3e4f567890123456789abcdef12345678",
        "ref": "refs/tags/v3"
      },
      {
        "path": "org/re/.github/workflows/workflow-b.yml@v1.0.7",
        "sha": "b7e8f9a0b1c2d3e4f567890123456789abcdef12",
        "ref": "refs/tags/v1.0.7"
      }
    ],
  ...
  }
}

Ingesting only the path would be sufficient for my needs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions