Skip to content

Commit

Permalink
Merge pull request #48 from ebmdatalab/adr-timescale-for-metrics
Browse files Browse the repository at this point in the history
Adr timescale for metrics
  • Loading branch information
lucyb authored Nov 27, 2023
2 parents 99121e8 + 97bd452 commit dd7aef8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/adr/0000-record-architecture-decisions.md
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

Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0001-use-grafana-for-dashboards.md
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

Expand Down
23 changes: 23 additions & 0 deletions docs/adr/0002-use-timescale-for-metrics
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.

0 comments on commit dd7aef8

Please sign in to comment.