Monitoring GitHub Actions CI Workflows
Tags: devops, github, cicd, cloud
Published: 2022-09-12 13:09:33

## **Introduction**

Considering the importance of CI in the development cycle, gaining visibility into the CI pipeline/process is becoming more critical to achieving success. Software teams need to solve issues in pre-production before they become a problem in production. To achieve this, they require visibility in the continuous integration pipelines to know where the bottlenecks are or how to optimize them. And they need to know immediately. Without having visibility into it, when a CI workflow fails, software teams rely on guesswork and try to reproduce the error in their local machines to understand the error route cause.

Knowing the success/failure rate, duration, and cost of their CI workflows at a granular state, software teams tend to develop more securely and comfortably.

## **Challenges with CI Failures**

The need for monitoring the status of workflows grows as the number of managed repositories and processes expands for solo developers or big engineering teams. Almost none of the CICD providers focus on making your CI processes visible in appealing user interfaces. To understand the status of your builds, jobs, and workflow runs, you must travel through many tabs or just rely on guesswork.

The main challenge is that when a workflow run fails, it is difficult to quickly find out:

-   What is my workflow success rate?
-   Which tests are blocking the pipeline?
-   Which are the most costly workflows?
-   Which workflows failed the most in the last 30 days?
-   What is the average workflow run duration of my organization?

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9e02a2026f81c6e94d_B41M3PT6P4Z5Q20xKf_Bny5suCnWbSwS6xn17jopIv5DCr_8XFYVH0tWdB7_IGWLrDsVJTBtZw6R2D8KSug-Wb1nVTvz-JdEJN5IkMZbLv2juXbYw2Pp-ubu5lvtJNP08srVPwBExaezhASSGY_YAQ.png)

It's such a pain trying to understand which workflow fails the most, why it fails, what's the failure trend, are the durations and costs jumping high, etc.

Let's take a look at what actual people want to monitor.

## **Status of the workflows**

This is one of the most essential metrics that a developer would want to see.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9ee5c49209c1e9a3fd_t596ep1w_l0n-gQyU-OQMW3VkEo8d0Bj7-BEhSXLuoBQSUHYW3uS4nMtb3zvb33ZZIqsAQwMr7JWV-oJfiSUF7AvxfARFDmMsvX40oyh7lFViRb9kx1rFgEfPjaseBpzTEAsOLR7Q3GSkxPBS8ELXg.jpeg)

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9e66f970fda05e2bdc_wEve7ouPSaahN0MekgzV_nZfEYdtDVzjXzDy71Oy7sYNxN1YNOGCALGhr_30fapl27P7cpUI74AxfWP7TVC7zigp-B39rzrI3taYhiauz1hkSyKW83u1uAVsmFNCyqQ2bs6f9YUVvzHvDxHD1eg7dQ.jpeg)

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9e8c7f6c5b49b4c916_cMHTrqhXPZORVGrXZWqJjYNJ7MTfrNULWHWB4HnlM5trIIHxFeBeiui5chHIQVxAXGel9IH3Cfxq8fN-wKpJHCJ19tSIpv-wjX2xYdAr2SxHPJMd8JEKgZxTr6W2RLzR7nVDk1H5SbQAmN--9tEC8g.jpeg)

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9ea34c859574d71e6d_B1do4p9gnzD057JkmBqFqPMTb6NlikVh5wN4skontvtkBYmWJS_VH7VCDOd2UWprJKvTrkKQwuojZeB8zQpPmDBmjiHqrxWckRyWecC_iK5TWiaAGsBl-ZxFkGSqlQWIUl3JTT6XKRRyoFvExkY2QQ.jpeg)

As seen in the above tweets, optimizing the CI performance is a matter of enough visibility. Understanding and even preventing CI failures or optimizing the workflow run durations might be possible with having a bird's eye view of all your workflow runs.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9ef1ba397a9debc22f_WgUiQ56GYC83U2l0RrdJEBnCgF3kVo-EB1-XMkuypViwm8WNxDp9OFarUJ2_XbtmQ-bHh0DWUaRNeGUMvjiFAkRn8GQt83erkSwzcNSpvx7jWjUF7QKy_DLRv1lyXkSLXocpe-5IgoGeM-5AKZlZDA.png)

Keeping an eye on success and failures, and tracking how the workflows are performing can be pretty helpful to optimize CI pipelines.

Trying to investigate the workflow runs one by one is a daunting process. But if we group failed runs by their execution dates and see the workflow behavior, then it might be easier to take action.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9f66f970f5d15e2d90_nsTLwpU_8pl8Es2A2VqH8JB3chexNwjCFzm36E2lqvl43SdoR9u-SdSyQCKFoY1zdKcmXMuVsuLbtI5X-E7VVJivvlHfZFjf0P-yVtL6k7L_AhNSmudaPJz14x3z7TfEzV3VlZ9bvOROUUHum5Oz9g.png)

## **Cost is something to watch indeed!**

It is challenging to keep all of our CI pipelines at an optimum cost. Most of the time, we have trouble detecting which workflows are burning more money and why.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9fc8f4bd78b391b919_E4XXZ25IVRRg_N5KfjFwQDSIvFHhyVnDq61xtHk_R17u-bSM_bQqZmWGAimaJBjylq-tcxZfAz_1KOu2OPBc9yi1YSzdbQSJPEJtdqCW5UJAOLD9d6dVXbzynWVNvFQ2EcTRlKaZdwZMwg5j_7Cv2A.jpeg)

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9fc8f4bd547a91b920_TbkdwhZNRFk6TLb4kVf1woQtllWZQCnq8ZtNdO0yOSwHX_PzTY3GIGh_3-u9YV0AAubsqr5BGl0jTZ0_jXh1VI97g9vlPedezb7nMTSzl7a4x0YujcveL-VJPVnOdC5Czl_GPHSzsMKGn9wOz7cbsw.jpeg)

Monitoring cost peaks and downs is pretty essential. It is incontrovertible that any bug in production is more costly than the biggest pre-production failure. It is difficult to troubleshoot when a workflow run has a peak at cost unless you have the visibility into the reason why.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9f8c7f6cb81bb4cacb_H8UoBP0POHlGgpEON6V2WCtlD-4YNxqs2UsVe4RYDJd1i_o8c1xglqkx87pZdBjcfHkFx2YITJifRDIxo6_JWt0unPbgWQHVw227gZvYV6_Y9SyBVPRnJJR31ax_zLiL7lCicKFGzom8JacFnvpG3g.png)

Finding out which workflow runs are the top costly ones and focusing on those ones speed things up and save your CI costs.

## **Everlasting workflows can be annoying**

By effectively monitoring the CI pipelines, software teams can significantly reduce the time spent sustaining iterative software development. Knowing which workflow runs durations, the duration trends, and the reasons why workflow runs are failing or taking longer time than expected helps software teams to optimize their pipelines.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9f0f6360564b996a75_p-LciVndo9hkzycWUWnt7Wh8IM9D0j35uDodrcwSZBD1sCxCTV6h1bKbBL-nfI-NRhKpJLPzryrMtVS9w3GmJd8P0v3cM33psrQfmtSlpNKesuqrhfDjssNBfRcG7ujaiuo_MNXJppmdzzwKErHogw.jpeg)

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7eaa00f636055e4996aa1_1Ng0P0XPHfNqq5AtM9mKE6th_qx-fpUjDkbnWoswpiWqBL-SLOff6EvEbPNJaYkR5aAUtELTjHyoGVEuOyr_9KnSoTDotwihjI35Fzov0PDifWLoN4F-Q9KLkBc3sCJkMo5grzFRFf6Jmi80qPhYrg.jpeg)

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9f7ff162101cab49f5_dh_o9DsP-iOp8WZw0wLIDUetdY09x6bwW3FICoiOJE5MqzpGKbbyMAPy-URuN5Gvgny7zBqyFIMlMskKvuQOni6ZhoOyRCXD-6xDbF0lS048pscfPhNcWT4Lfkkn8z4AMdlogJiSLXdy_w9kvn-ChQ.jpeg)

DevOps, SRE, and development teams can be able to keep their master branch green along with the production itself without spending countless hours troubleshooting CI failures.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9f47e2b05169bc71dc_Ax-jJwMAMgk4tex2_jVV5AaZitFvAjQIW6I-Jtc0ntWdUHVD-oLP8Lnq2W1M_t4wHnn-4OhJDR5dZIY-BaoZHCQdKNO2eaPHwWqRf3Z-uW-MOXrRhuSbtJ9rgVnHPL4xb5fywdkxrOu2qAvUCNl6ww.png)

## **Conclusion**

Efficient CI processes require efficient visibility. Being able to successfully monitor the CI pipelines to reduce time and money spent and troubleshoot errors in workflows, builds, jobs, and tests are key to success.

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/62d7ea9f385d2bcda94f6982_X33SQo6xFmy9kBcQE--BKUL1nZKfXRmVrzcgLEGR5xfceEX2XiSDlZBlb-vqgYJ1G4AqtGwqGe4AYIKPd01rdQzQXz-LMXaXv5tW_qDZhArP3xerwb27pi74VF8gRqot9MZQPa07rDSY4BI2TJl7Tg.png)

Monitoring continuous integration pipelines allows developers to easily and securely understand/troubleshoot pipeline activity. By providing a comprehensive view into CI activity, it becomes easier to resolve bottlenecks, reduce CI costs, and deliver better software. There's an iterative, non-agile process required today for debugging failed CI workflows. Tools like  [**Foresight**](https://github.com/marketplace/thundra-foresight)  which are platform-agnostic, working on-prem, in the cloud, on containers, and on serverless code make it possible to boost productivity and successful production delivery.



> Save the date! 🕊️
> On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻
> **Take your seat before we launch on** [**Product Hunt**](https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions) **💜**
[](https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions)

![](https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png)