generated from opensafely-core/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from ebmdatalab/adr-timescale-for-metrics
Adr timescale for metrics
- Loading branch information
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 1. Record architecture decisions | ||
# 0. Record architecture decisions | ||
|
||
Date: 2023-11-16 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 1. Record architecture decisions | ||
# 1. Use self-hosted Grafana for dashboards | ||
|
||
Date: 2023-11-16 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 2. Use Timescale with PostgreSQL for Metrics | ||
|
||
Date: 2023-11-24 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
We need to store certain metrics data, such as details about pull requests and issues from GitHub and support requests from Slack. We're unable to get this information on demand using the APIs, because there's either no support with an existing Grafana plugin, it's not fast enough or it doesn't provide all the information we need. | ||
|
||
In same cases, we need to store a large amount of timeseries data. The Timescale extension to PostgreSQL allows us to query that data in a very performant way and provides some nice functions so that we can perform operations, like bucketing the data, on the database server rather than when loading the dashboard. | ||
|
||
## Decision | ||
|
||
We will use PostgreSQL with the Timescale extension to store our metrics data. | ||
|
||
## Consequences | ||
|
||
We'll be able to store all the different types of data that are needed for our dashboards. | ||
|
||
The PostgreSQL database will be hosted using a managed Digital Ocean service and backed up using Snapshooter. We believe this will keep the operational burden to a minimum. |