Queue wait times metric

Hello, @RRosa and welcome to the Buildkite Community Forum!

To find out the time elapsed between scheduling a job on a pipeline and the time it started, you can enable and use clusters for your Buildkite organization - this way you’ll have the access to queue metrics that display the information you are looking for. Keep it in mind that enabling clusters is irreversible!

Another way to get to this information is by using Amazon EventBridge and a Lambda example to get the metrics pushed to CloudWatch. Example event payloads in our documentation cover Job Scheduled and Job Started. You can then add an EventBridge dashboard to Grafana.

To outline all the possible options, I should mention that you could also use Buildkite’s GraphQL API and run the following query:

query {
  pipeline(slug: "your-org-slug/build-slug/build-number") {
    jobs(first:1) {
      edges {
        node {
          ... on JobTypeCommand {
            scheduledAt
            startedAt
          }
        }
      }
    }
  }
}

Best!

Karen