Record submission counts#2147
Open
theseanything wants to merge 5 commits into
Open
Conversation
Copilot stopped reviewing on behalf of
theseanything due to an error
June 4, 2026 19:38
lfdebrux
reviewed
Jun 5, 2026
theseanything
force-pushed
the
theseanything/submission-number-metrics
branch
from
June 18, 2026 14:21
82471a3 to
70c1c91
Compare
theseanything
force-pushed
the
theseanything/submission-number-metrics
branch
from
July 2, 2026 15:03
70c1c91 to
f5c3ea3
Compare
theseanything
force-pushed
the
theseanything/submission-number-metrics
branch
3 times, most recently
from
July 6, 2026 10:26
1a4b8c2 to
26b26d0
Compare
theseanything
force-pushed
the
theseanything/submission-number-metrics
branch
from
July 6, 2026 13:53
ace0f57 to
760424f
Compare
Record counts with an incrementing counter at submission creation time, exported via PeriodicMetricReader, instead of periodically aggregating submission counts from the database.
Submissions to forms used for automated platform testing (capybara, smoke test and s3 test forms) were counted with their real mode, mixing them in with genuine user submissions. Label them as "test" so dashboards can exclude them without name-based filters.
The submission count metric was incremented when the submission record was created, before the delivery job was enqueued. If enqueueing failed the submission was destroyed but the counter had already been bumped, inflating the KPI. Move the metric call to after the enqueue block so it only counts submissions that were successfully queued for delivery.
Use OpenTelemetry semantic conventions for the counter name, unit and attribute keys so the metric is consistent with other instrumented services and standard dashboards.
The deployment.environment.name attribute is upserted by the OTel collector, so we don't need to manually add an environment label to every metric we record.
theseanything
force-pushed
the
theseanything/submission-number-metrics
branch
from
July 24, 2026 09:58
760424f to
3a1dc61
Compare
Contributor
|
🎉 A review copy of this PR has been deployed! It is made of up two components It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Records a SubmissionCount metric using an OpenTelemetry counter, incremented as each submission is created and exported through the OTel collector (metrics support enabled in govuk-forms/forms-deploy#2182).
This allows as to track platform usage over time without manual reporting and is one of our key KPIs used to drive product development. We get stats exported every minute.
We are using Otel instead of standard CloudWatch Metrics as it's significantly cheaper. Allows us to have high cardinality and get granular submission counts per form.
Submissions to automated test forms (capybara, smoke test and s3 test forms) are labelled with mode test, so dashboards can exclude them without repeating name-based filters in every query.
Trello card: https://trello.com/c/b3cNvzu5/3136-record-kpis-in-cloudwatch
tested in dev.