# metrik
**Repository Path**: thoughtworks/metrik
## Basic Information
- **Project Name**: metrik
- **Description**: 自动化 DevOps 度量工具,内建 Dashboard。可以从持续集成(Jenkins、Bamboo等)、持续交付流水线中提取数据,分析四项关键 DevOps 度量指标:部署频率、变更前置时间、服务恢复时间、变更失败率。
- **Primary Language**: Kotlin
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 42
- **Forks**: 14
- **Created**: 2021-06-03
- **Last Updated**: 2025-07-09
## Categories & Tags
**Categories**: DevOps
**Tags**: None
## README
[](#contributors-)
[](https://github.com/thoughtworks/metrik/issues)
[](https://github.com/thoughtworks/metrik/blob/main/LICENSE.txt)
[](https://github.com/thoughtworks/metrik/actions/workflows/backend_test.yaml)
[](https://github.com/thoughtworks/metrik/actions/workflows/frontend_test.yaml)
[](https://github.com/thoughtworks/metrik/actions/workflows/build_release_docker_image.yaml)
[](https://github.com/thoughtworks/metrik/releases)
Maintained by SEA team, ThoughtWorks Inc.
*Read this in other languages:* [English](https://github.com/thoughtworks/metrik), [简体中文](https://github.com/thoughtworks/metrik/blob/main/README-CH.md)
Table of Contents
## About the Project
For development teams who wants to measure their software delivery and operational (SDO) performance, this is a tool that helps them collect data from CD pipelines and visualize the key metrics in a friendly format.
**The key differentiators:**
* One page configuration, quick and easy.
* The ability to work across different CD platforms.
* User can select the environment in which the analysis runs via a environment filter (Yes, production env is not the only one that matters)
[Don't know what are those four key metrics?](https://www.thoughtworks.com/radar/techniques/four-key-metrics)
### Integration roadmap
List of CD tools the product supports now/plan to support
- [x] Jenkins
- [x] Bamboo
- [ ] Github Actions
- [ ] CircleCI
...and more on the way
## Usage
Follow the two steps below to run the tool, and measure the four key metrics of your projects.
### Install and run
The product is released to an ECR Docker repository `public.ecr.aws/j2s5d3z8/4-key-metrics`. Please follow the steps:
1. Ensure [Docker](https://www.docker.com) has already installed on your OS.
2. Find available [release versions](https://github.com/thoughtworks/metrik/releases) in the release page.
Or, you can find all history versions from our [image repository](https://gallery.ecr.aws/j2s5d3z8/4-key-metrics)
3. Run the container locally via the following command:
``` bash
docker run -d -p 80:80 --name metrik public.ecr.aws/j2s5d3z8/4-key-metrics:${release_version}
```
*⚠️ We use port 80 to access the app. You may switch to any other port in case port 80 is occupied by other apps running on your machine.*
*⚠️ The `latest` tag matches the most recent version of this repository. Thus using public.ecr.aws/j2s5d3z8/4-key-metrics:latest or public.ecr.aws/j2s5d3z8/4-key-metrics will ensure you are running the most up to date version of this image.*
If you want to stick to a specific version tag, remember there no "v" in version name. e.g. public.ecr.aws/j2s5d3z8/4-key-metrics:1.1.10
### Configure your projects
After the container is running on your machine. Go to your favourite browser and open the app. If running in local that would be `http://localhost:80/`.
1. Start the configuration:
2. And the charts for each key metric will be available at the main page:
3. Also the full screen view if you want to put it on big screens:
### Advanced usage
If you would like to keep the 4-key-metrics data to avoid losing any data when remove container, you
can mount the database folder `/data/db` out. And logs are also available if you mount the log folder `/app/logs`. As shown in the example below:
``` bash
docker run -d -p 80:80 --name metrik -v "/path/to/local/directory:/data/db" -v "/path/to/another/directory:/app/logs" public.ecr.aws/j2s5d3z8/4-key-metrics:${release_version}
```
## How to compute
[See our Wiki page](https://github.com/thoughtworks/metrik/wiki)
## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Please check our contributing guideline form [HERE](https://github.com/thoughtworks/metrik/blob/main/CONTRIBUTING.md)
## Getting Started
The codebase comprises of three major components `frontend`, `backend`, `ci`.
* Frontend app is a web application built with:
* TypeScript
* ReactJS
* ReCharts
Go to [frontend folder](https://github.com/thoughtworks/metrik/tree/main/frontend) to find more details.
* Backend app is built with:
* Kotlin
* Spring Boot Web
* MongoDB
Go to [backend folder](https://github.com/thoughtworks/metrik/tree/main/backend) to find more details.
* Build/Package scripts lives in [ci folder](https://github.com/thoughtworks/metrik/tree/main/ci)
## License
Distributed under the MIT License. See [LICENSE](https://github.com/thoughtworks/metrik/blob/main/LICENSE.txt) for more information
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!