Skip to content

Add created_at field to workflow_job event #1881

@npalm

Description

@npalm

Describe the enhancement
At field created_at toworkflow_job event to calculate time that it takes start jobs from the moment the event was created.

Code Snippet
n/a

Additional information
We are creating some metrics to keep track of our fleet of self-hosted runners. For our users one of the most important things is, is the time it takes to start a job from the moment the event was created. This indicator indicates the time it takes from the moment a job is triggered it got start on the agent. For our self-hosted runners it means the time it takes to potentially create an istance start the agent. See also issue

The workflow jobs event sent when the job is queued contains a field started_at. This is the moment the job is triggerd. Later we got an event when the job is started. Now the field started_at is updated. The diff between two timestamps is the time it takes to start the job. Calculationg the diff seems trivvial, but requires keep track on the state and or matching the events. The actions/runs API contains a created_at timestamp. Looks like the suite created for the job once the job was started.

To calculate the time in uncomplicated way it would be very helpfull when the created_at time is added to the workflow_job events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Actions FeatureFeature requires both runner, pipelines service and launch changesenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions