This is a plugin for the Backstage Project that provides a seamless way to display DORA Metrics in your developer portals.
Our goal is to provide an Open Source plugin that works with the Open Telemetry backend collecting your DORA metrics in a non-opinionated manner.
This plugin is currently loosely tied to GitHub and Loki DB, we plan to expand to GitLab and other platforms in the future
At A Glance
This offers you a quick view of the state of a component or team.
Depending on how you have set up your configuration for this plugin, it will show:
Deployment Frequency
- The average how often you are deploying, failed or successfulChange Lead Time
- The average of time merged to main
to deployment successChange Failure Rate
- The average number of changes that result in a failed deploymentRecovery Time
- The average of a failed deployment to the next successful deploymentHere are some examples:
Metric View with Details Always Showing | Metric View with Details on Hover |
---|---|
Overall Trend View | Overall Trend View with Individual Metric Trends |
---|---|
Charts
This is a set of charts that for the DORA metrics.
It has two different modes Team View
and Component View
:
Component View
- You will see this when you access a specific Component in the Catalog.Team View
- You will see this when you access the DORA Metrics
sidebar navigation.Here are some examples:
Component View | Team View |
---|---|
This plugin relies on the following dependencies:
In the dependencies
folder, you will find a docker-compose file. Using this will spin up the following in docker containers:
You will need to update the .env
file with your GitHub Org
, User
and PAT
(with full repo access) for the API to be able to return a list of teams
If you have a Kubernetes Cluster, we have a quick start guide that installs Loki DB
and Liatrio OTel Collector (among a few other tools) that can be found here
This quick start manifest does not set up the Liatrio DORA API or any other API which you would need to sit between this plugin and the Loki DB.
Once you have the dependencies configured and running, you will need to update your GitHub Organization to send events to the OTel Collector.
You can do this by setting up a new Webhook
and configuring the Webhook
to send the following events:
To Install this plugin you'll need to do the following:
Install the @liatrio/backstage-dora-plugin
package into the /packages/app
folder
npm install @liatrio/backstage-dora-plugin
yarn add @liatrio/backstage-dora-plugin
Update the /packages/app/src/App.tsx
file:
import { EntityDORACharts } from '@liatrio/backstage-dora-plugin';
FlatRoutes
element as a child:<Route path="/dora" element={<EntityDORACharts showTeamSelection />} />
Update the /packages/app/src/components/catalog/EntityPage.tsx
file:
import {
EntityDORACharts,
EntityDORAAtAGlance,
} from '@liatrio/backstage-dora-plugin';
const doraContent = (
<Grid container spacing={3} alignItems="stretch">
{entityWarningContent}
<EntityDORACharts showTeamSelection={false} />
</Grid>
);
serviceEntityPage
, websiteEntityPage
, defaultEntityPage
EntityLayoutWrapper
elements:<EntityLayout.Route path="/dora" title="DORA">
{doraContent}
</EntityLayout.Route>
overviewContent
Grid
:<Grid item md={6}>
<EntityDORAAtAGlance />
</Grid>
Update the app-config.yaml
:
proxy.endpoints
and use the correct URL for your API:/dora/api:
target: [URL_TO_DORA_API]
Add this root property dora
to the file and then add the following under it:
Required:
dataEndpoint
: This the endpoint on the proxy that provides the deployment data. If you are using the liatrio-dora-api
this will be data
teamListEndpoint
: This the endpoint on the proxy that provides the team and repo ownership data. If you are using the liatrio-dora-api
this will be teams
daysToFetch
: This is the number of days worth of data that will be fetched for the charts to have available for display
Optional:
showWeekends
: This boolean will toggle the Deployment Frequency Chart
to hide weekends or show them. The default is to hide them.
includeWeekends
: This boolean will toggle whether weekends are included in scoring your Deployment Frequency
and Change Lead Time
. The default is to exclude them.
showDetails
: This boolean will toggle whether or not the DORA At a Glance
shows the exact scores on hover or as static text. The default is to show them on hover.
showTrendGraph
: Enabling this field will change the DORA At a Glance
to be a Trend Graph rather than have Metric indicators
showIndividualTrends
: Enabling this field will add individual Metric Trends to the Trend Graph in the DORA At a Glance
component
rankThresholds
: This is an object to override the default rank thresholds for DORA Score Board and is fully optional all the way down to the individual ranks.
There are 4 scores, all are optional:
deployment_frequency
measured in hourschange_lead_time
measured in hourschange_failure_rate
measured as a percentagerecover_time
measured in hoursEach score has the following rank options:
elite
high
medium
Note: Anything outside medium
is considered low
The default rank thresholds are:
See Contributing to Backstage Dora Plugin