# Pipelines dashboard: custom pipeline metrics

**URL:** <https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433>\
**Category:** Features Requests\
**Created:** [January 29, 2021, 6:08pm UTC](https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433 "2021-01-29T18:08:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbarrau](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@pbarrau](https://forum.buildkite.community/u/pbarrau)\
**Post date:** [January 29, 2021, 6:08pm UTC](https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433/1 "2021-01-29T18:08:43Z")

</div>

The pipelines dashboard currently displays 3 metrics per pipeline:

- Speed,
- Reliability,
- Builds per week

 ![Screenshot 2021-01-29 at 11.02.21](https://us1.discourse-cdn.com/flex016/uploads/buildkite1/original/1X/664e4a2bfe342045cbb8e04dec795ebf4a298d16.png)

I would love to have a way to personalize what metrics are displayed per pipeline and be able to display custom metrics such as code coverage for unit tests.

---

<div class="post-metadata">

**Author:** ![anon57234190](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@anon57234190](https://forum.buildkite.community/u/anon57234190)\
**Post date:** [February 1, 2021, 12:02am UTC](https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433/2 "2021-02-01T00:02:03Z")

</div>

Hi @pbarrau! Thanks for this, it’s an interesting idea. I’m really curious as to what information you’d personally prioritise here, in addition to the aforementioned code coverage metric.

---

<div class="post-metadata">

**Author:** ![pbarrau](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@pbarrau](https://forum.buildkite.community/u/pbarrau)\
**Post date:** [February 1, 2021, 6:18pm UTC](https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433/3 "2021-02-01T18:18:17Z")

</div>

Hi Eleanor,

Test coverage is what I’d need the most. It would let me see at a glance which projects don’t have enough tests, and public shame the owning team 😃

Now, we could imagine many other metrics worth monitoring: the time to perform a specific step in the pipeline, the size of the artifacts, …

Here is a proposal on how this could work:

I believe we could leverage the meta-data functionality to define builds custom metrics. Something like that:

```auto
# pipeline.yaml

steps:
  - label: Run tests
     command: run_tests.sh

statistics:
  - label: Code coverage
     unit: percent
     meta-data: code_coverage

```

```auto
# run_tests.sh

<perform tests + collect coverage metric>

buildkite-agent meta-data set "code_coverage" "$COVERAGE"

```

---

<div class="post-metadata">

**Author:** ![jl-applied](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jl-applied/32/995_2.png) [@jl-applied](https://forum.buildkite.community/u/jl-applied)\
**Post date:** [February 5, 2021, 6:48am UTC](https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433/4 "2021-02-05T06:48:18Z")

</div>

Agent wait time would be huge! Average job time would also be pretty useful.

Job retries (basically [https://buildkite.com/organizations/org/reports/job-retries](https://buildkite.com/organizations/org/reports/job-retries)) could also be really convenient there.

Could even see number of skipped builds being useful.

Also, org-wide metrics would be really helpful. First that come to mind are pending/running builds + number of pending steps. This might even be even more of a separate feature request, but an org-wide equivalent of the [buildkite.com/applied-intuition/org/builds?state=running](http://buildkite.com/applied-intuition/org/builds?state=running) page (adding it here in case it makes sense in a sidebar :) ).

---

<div class="post-metadata">

**Author:** ![kogulan](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kogulan](https://forum.buildkite.community/u/kogulan)\
**Post date:** [November 17, 2022, 5:07am UTC](https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433/5 "2022-11-17T05:07:02Z")

</div>

I would like to see these pipeline-specific metrics like total time taken by step. This would really help us know where we need to improve.

---

<div class="post-metadata">

**Author:** ![benmc](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/benmc/32/1159_2.png) [@benmc](https://forum.buildkite.community/u/benmc)\
**Post date:** [November 17, 2022, 5:44am UTC](https://forum.buildkite.community/t/pipelines-dashboard-custom-pipeline-metrics/1433/6 "2022-11-17T05:44:49Z")

</div>

@kogulan thanks for the message and welcome to the community!

Have you explored the GraphQL API, or the REST API? Job times, retries, and so on can be calculated using the API response.

Cheers,

Ben
