Project Insights
Video Tutorial: How to use Project Insights
Project Insights provides productivity metrics about your CI pipelines. You can, for instance, how long your pipelines take on average or create a dashboard to track deployment activity.
How to view project insights
Project Insights are available in the Insights tab on your project. Data is loaded automatically from your CI workflow activity, however, you can configure Insights to ensure you're seeing the data accurately.
You can select which metric to view using the left-side menu.
On the right side, you can change the date range for the data shown.
How to configure insights
Semaphore tries to guess which is the main branch in your project. However, to be sure the metrics are shown accurately, it's recommended to configure the branch and pipeline file in the settings menu.
The Project Insights settings are split into two sections:
- Continuous Integration: this is your project's main pipeline. It should build and run your tests
- Continuous Deployment: optional. This pipeline deploys your application to production
Follow the steps below to set up Project Insights:
- Open the Insights tab
- Click on the Gear Icon on the left side
- Set the main branch name for your project in the Continuous Integration and Continuous Deployment sections
- Set the name of the pipeline file in the Continuous Integration and Continuous Deployment sections
- Press Save Changes
The pipeline file path should be relative to the repository's root.
After you save changes, Semaphore will start collecting metrics for Project Insights.
Metrics available
The available metrics are performance, frequency, and reliability. Each metric shows the data for Continuous Integration and Continuous Deployment. You can also create custom dashboards to refine your views.
Metrics data is held for 30 days and updated every 24 hours.
Performance
Performance metrics show how long pipelines take to run on average. The graph shows the median time (p50) and the standard deviation.
Below the Continuous Integration graph, you can select which branch to view.
If you have configured Continuous Deployment insights, you can also see data for the deployment branch.
Frequency
Frequency metrics show the number of pipelines run per week and the total number of runs for all pipelines per day.
Below the Continuous Integration graph, you can select which branch to view.
If you have configured Continuous Deployment insights, you can also see data for the deployment branch.
Reliability
Reliability metrics provide an overview of the pipeline pass rate. In other words, it tells you how frequently the pipeline was disrupted by a job failure. The graph also shows the mean time it takes to recover from a failed pipeline run and when the last successful run was.
If you have configured Continuous Deployment insights, you can also see data for the deployment branch.
Although you can specify a branch when creating a reliability metric, the actual branch used is defined under the "Insight" settings in a project.
How to create custom dashboards
Create your own visualization with custom dashboards. You can add any metric already available on the Project Insights page to the dashboard.
To create a Dashboard:
- Open the Project Insights
- On the left side, click on the plus sign (+)
- Enter the name of the dashboard
- Press Create
You can also create dashboards using the command line. See Semaphore Command Line and Dashboard YAML reference for more details.
Once created, you can add metrics to the dashboard following these steps:
-
Open the custom dashboard on the left side
-
Press the Add metric button
-
Fill the form:
- (A) Type the metric name
- (B) Select the metric type to show from the
- (C) Type the branch name you want to visualize
- (D) Type the pipeline file path for the pipeline you want to visualize
- (E) Type an optional description
-
Press Save
After you save, a new Metric chart will appear on the Dashboard. It may take up to two days for data to populate the new chart.