Skip to content

Add ADR052 on storing analytics - #263

Open
theseanything wants to merge 1 commit into
mainfrom
ADR-business-analytics-storage-options
Open

theseanything wants to merge 1 commit into
mainfrom
ADR-business-analytics-storage-options

Conversation

@theseanything

Copy link
Copy Markdown
Contributor

We want to measure submissions over time and the number of live forms, keeping the data for at least two years.

Existing tools (OTel and Classic CloudWatch metrics, GA4, Splunk, Logs Insights, the runner database) fall short on accuracy, cost, cardinality, retention or ownership.

This record sets out the two credible options, S3 Tables queried with Athena or a separate Aurora cluster, for the team to choose between. It is marked Proposed until that choice is made.

We want to measure submissions over time and the number
of live forms, keeping the data for at least two years. Existing
tools (OTel and Classic CloudWatch metrics, GA4, Splunk, Logs
Insights, the runner database) fall short on accuracy, cost,
cardinality, retention or ownership.

This record sets out the two credible options, S3 Tables queried
with Athena or a separate Aurora cluster, for the team to choose
between. It is marked Proposed until that choice is made.
@theseanything
theseanything requested review from a team, cadmiumcat and whi-tw September 8, 2026 09:28
- Table schemas are defined in Terraform, but the provider does not support partitioning yet (not a big concern at our scale).
- Athena queries take seconds, too slow for the request path. Showing per-form statistics in forms-admin would need a faster way to query.

### Option B: a separate Aurora PostgreSQL cluster for analytics

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is my preferred option atm - as whilst it's more expensive, it's a comparatively small infra cost. We are unlikely to run into performance issues at our scale and is more flexible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a sense of how other teams do it?

- Unfamiliar services: S3 Tables, Firehose and Athena.
- Firehose delivery is at-least-once, so queries may need de-duplication or the transform needs an idempotency key.
- Table schemas are defined in Terraform, but the provider does not support partitioning yet (not a big concern at our scale).
- Athena queries take seconds, too slow for the request path. Showing per-form statistics in forms-admin would need a faster way to query.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a reasonable demand for funnel analytics from form creators, and we've been talking about adding metrics for save and return.

I think it's a reasonable assumption that certain metrics/analytics we make available to form creators we'll also want to use for internal performance analytics.

So I think a solution that works for both purposes seems best, otherwise we have to maintain emitting metrics from forms-runner in 2 different ways.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

I think it's worth adding our requirements for these to the context. In the context of KPIs this last point wouldn't be a so much of a con.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants